AI·News
뒤로

에이전트 관찰성: 학습을 강화하기 위한 피드백의 필요성

https://www.langchain.com/blog/agent-observability-needs-feedback-to-power-learning

대부분의 팀은 에이전트 가시성을 디버깅 도구로 생각하기 시작합니다. 무언가 잘못되었으므로 추적을 열고 단계를 검사하여 에이전트가 잘못된 결정을 어디서 내렸는지 파악합니다.

이것은 유용합니다. 하지만 너무 좁은 관점입니다.

에이전트 가시성의 더 깊은 역할은 학습을 강화하는 것입니다. 하지만 추적만으로는 그러한 루프를 만들지 못합니다. 또한 피드백이 필요합니다. 에이전트의 행동이 유용했는지, 수용되었는지, 거부되었는지, 비효율적인지, 위험한지, 아니면 잘못되었는지를 알려주는 신호입니다.

모델 훈련의 의미에서만의 학습이 아니라, 전체 에이전트 시스템에 걸친 학습입니다: 모델이 무엇을 해야 하는지, 하네스가 어떻게 안내해야 하는지, 어떤 컨텍스트가 필요한지, 어떤 실패 모드가 반복되는지, 그리고 사용자를 위해 실제로 어떤 행동이 작동하는지.

추적은 단순히 무엇이 일어났는지에 대한 기록이 아니며, 피드백은 끝에서의 평가만이 아닙니다. 함께, 그들은 시스템을 개선하기 위한 원자재입니다.

여러 수준에서 학습이 일어납니다

에이전트 시스템이 "학습"하고 시간이 지남에 따라 개선할 수 있는 여러 가지 방법이 있습니다. 우리는 여기에서 이에 대해 썼습니다:

학습은 모델 수준에서 발생할 수 있습니다. 모델이 일관되게 요청을 잘못 분류하거나, 잘못된 도구를 선택하거나, 정책을 따르지 못하는 예시를 발견할 수 있습니다. 이러한 추적은 SFT 또는 RL을 통해 모델 가중치 자체를 업데이트하는 데 사용될 수 있습니다.

학습은 하네스 수준에서 발생할 수 있습니다. 하네스는 모델 주변의 모든 것입니다: 프롬프트, 도구 스키마, 권한 확인, 제어 흐름, 메모리 업데이트 로직, 라우팅, 재시도 및 가드레일입니다. 추적은 에이전트가 올바른 모델 기능을 가지고 있지만 잘못된 스캐폴딩을 가지고 있었음을 보여줄 수 있습니다. 도구 설명이 모호했을 수도 있습니다. 에이전트가 읽기 전 쓰기 제약 조건이 필요했을 수도 있습니다. 시스템 프롬프트가 잘못된 절충을 만들었을 수도 있습니다.

학습은 컨텍스트 수준에서도 발생할 수 있습니다. 에이전트는 주어진 정보에 매우 민감합니다: 검색된 문서, 메모리, 사용자 선호도, 도구 결과, 이전 턴, 환경 상태. 추적은 모델이 나쁘거나 누락된 컨텍스트가 주어진 상황에서 합리적인 결정을 내렸음을 보여줄 수 있습니다. 이 경우, 학습 루프는 어떤 컨텍스트가 검색되고, 저장되고, 압축되거나 버려지는지 개선해야 합니다. 이것을 일반적으로 메모리라고 합니다.

중요한 점은 이 모든 학습 루프가 추적에 의해 강화된다는 것입니다. 에이전트가 무엇을 봤는지, 무엇을 했는지, 다음에 무엇이 일어났는지 모르면, 무엇을 개선해야 하는지 확실하게 알 수 없습니다.

이것이 에이전트 가시성이 에이전트 평가를 강화하는 이유입니다. 추적은 에이전트 행동이 가시화되는 곳입니다.

학습은 자동화되거나 수동으로 진행될 수 있습니다

어떤 학습은 수동 기반입니다. 개발자가 추적을 보고 에이전트가 잘못된 도구를 호출했음을 알아채고 프롬프트 또는 도구 스키마를 업데이트합니다. PM이 실패한 대화의 집합을 검토하고 제품이 새로운 워크플로우가 필요함을 깨닫습니다. 주석자가 추적에 라벨을 붙여 팀이 더 나은 평가 데이터셋을 구축할 수 있도록 합니다.

이것도 여전히 학습입니다. 단지 루프 안에 인간이 있을 뿐입니다.

다른 학습은 자동화됩니다. 시스템은 프로덕션 추적을 샘플링하고, 온라인 평가를 실행하고, 알려진 실패 패턴을 감지하고, 데이터셋에 예시를 추가하거나, 뭔가 잘못 보일 때 검토 큐를 트리거할 수 있습니다. 에이전트가 학습 루프가 자동화되기 위해 자동으로 자신을 개선할 필요는 없습니다. 자동화는 단순히 어떤 추적이 주의할 가치가 있는지 식별하고 그들을 구조화된 피드백으로 변환할 수 있습니다.

어느 쪽이든, 프로세스는 추적에 의해 강화됩니다.

하나의 에이전트에서 낮은 볼륨의 경우, 수동 검토로 충분할 수 있습니다. 많은 에이전트에 대해, 또는 대용량 프로덕션 트래픽의 경우, 이것은 인프라 문제가 됩니다. 추적을 캡처하고, 필터링하고, 점수를 매기고, 라우팅하고, 중요한 것들을 보존해야 합니다.

추적은 필요하지만 충분하지 않습니다

추적은 무엇이 일어났는지 알려줍니다. 그것은 그 자체로, 일어난 일이 좋은지를 알려주지 않습니다.

그 구별이 중요합니다. 에이전트는 40단계로 작업을 완료할 수 있지만, 아마도 같은 작업은 6단계만 필요할 것입니다. 확신 있는 최종 답변을 생산할 수 있지만, 아마도 사용자가 거부했을 것입니다. 오류를 발생시키지 않을 수 있지만, 여전히 사용자의 의도에 실패할 것입니다. 올바른 도구를 호출할 수 있지만, 미묘하게 잘못된 인수로 호출할 것입니다.

추적에서 배우려면, 피드백이 그들에게 부착되어 있어야 합니다.

피드백은 가시성을 수동적인 기록에서 훈련 신호, 디버깅 신호, 제품 신호 또는 평가 신호로 바꾸는 것입니다. 피드백이 없으면, 큰 궤적 더미가 있습니다. 피드백이 있으면, 유용한 질문을 하기 시작할 수 있습니다:

- 어떤 추적이 성공을 나타냅니까?

- 어떤 추적이 실패를 나타냅니까?

- 어떤 실패가 모델, 하네스 또는 컨텍스트로 인한 것입니까?

- 어떤 실패가 평가로 전환할 가치가 있습니까?

- 어떤 행동이 시간이 지남에 따라 개선되고 있습니까?

이것은 핵심 요구사항입니다: 에이전트 가시성 데이터와 함께 피드백을 저장하십시오.

피드백은 많은 곳에서 올 수 있습니다

피드백은 인간이 모든 추적을 수동으로 등급을 매기는 것을 의미할 필요는 없습니다. 실제로, 유용한 피드백은 여러 형태로 옵니다.

가장 명백한 것은 직접 사용자 피드백입니다: 엄지손가락 위, 엄지손가락 아래, 별 등급 또는 서면 수정. 이 신호는 이해하기 쉽지만, 일반적으로 드뭅니다. 대부분의 사용자는 명시적 피드백을 남기지 않습니다.

그 다음은 간접 사용자 피드백입니다. 코딩 에이전트의 경우, 이것은 수용된 코드 라인, 되돌려진 diffs, 편집 후 통과한 테스트 또는 사용자가 생성된 변경을 유지했는지 여부일 수 있습니다. 지원 에이전트의 경우, 사용자가 티켓을 다시 열었는지 여부일 수 있습니다. 연구 에이전트의 경우, 사용자가 답변을 복사했거나 같은 질문을 다시 물었는지 여부일 수 있습니다. 이 신호는 명시적 등급보다 더 시끄럽지만, 종종 훨씬 더 풍부합니다.

LLM-as-judge로도 피드백을 생성할 수 있습니다. 판사는 답변이 도움이 되었는지, 에이전트가 정책을 따랐는지, 또는 궤적이 의심스러워 보이는지를 점수할 수 있습니다. 이것은 특히 프로덕션 추적에 대한 온라인 평가자로서 규모에서 실행될 수 있기 때문에 유용합니다. 그것은 완벽하지 않고, 보정되어야 하지만, 인간 검토가 너무 느릴 곳에서 구조화된 피드백을 만드는 방법을 팀에 제공합니다.

마지막으로, 피드백은 결정론적일 수 있습니다. 규칙과 정규식은 과소평가됩니다. 실패 패턴을 알면, 인코딩하십시오. 에이전트가 승인 없이 파괴적 명령을 호출해서는 안 되는 경우, 확인하십시오. 응답에 인용이 포함되어야 하는 경우, 검증하십시오. 코딩 에이전트가 사용자 좌절의 징후를 보이면, 감지하십시오.

Claude Code 누출이 이것을 구체화했습니다. 여러 보고서에서 Claude Code가 userPromptKeywords.ts에서 정규식을 사용하여 사용자 프롬프트에서 좌절 단어 및 구문을 감지했음을 발견했습니다. PCWorld는 정규식이 "wtf," "horrible," "awful," 및 "this sucks"와 같은 용어를 찾았다고 보도했습니다. Slashdot의 요약에는 같은 패턴이 포함되어 있으며, Blake Crosley의 분석은 이것을 LLM 추론이 아닌 정규식 기반 좌절 감지로 설명합니다.

엔지니어링 관점에서, 패턴은 지시적입니다. 모든 피드백 신호가 모델 호출을 필요로 하지는 않습니다. 저렴한 규칙이 유용한 신호를 캡처하면, 저렴한 규칙을 사용하십시오—그리고 그 신호가 어떻게 저장되고 사용되는지 명확하게 하십시오.

당신의 가시성 플랫폼이 필요한 것

가시성이 학습을 강화하려면, 플랫폼은 세 가지가 필요합니다.

첫째, 추적을 저장해야 합니다. 이것이 기본 계층입니다. 에이전트가 한 일의 전체 궤적이 필요합니다: 모델 호출, 도구 호출, 입력, 출력, 메타데이터, 타이밍, 오류 및 중간 상태. 이상적으로, 사용하는 스택에서 추적을 수집할 수 있으며, 하나의 프레임워크뿐만 아니라. LangSmith는 30개 이상의 다른 프레임워크에서 추적을 지원하며, OpenTelemetry 추적을 통해 OpenTelemetry 호환 애플리케이션에서도 추적을 수집할 수 있습니다.

둘째, 피드백을 저장해야 합니다. 피드백은 추적과 연결 해제된 별도 스프레드시트 또는 분석 시스템에 남지 않아야 합니다. 평가하는 실행, 추적 또는 스레드에 직접 첨부되어야 합니다. 이를 통해 피드백으로 필터링하고, 좋은 궤적과 나쁜 궤적을 비교하고, 실제 실패에서 데이터셋을 구축하고, 변경이 중요한 행동을 개선하는지 추적할 수 있습니다. LangSmith는 피드백 캡처 및 추적과의 연결을 지원합니다.

셋째, 피드백을 생성해야 합니다. 일부 피드백은 사용자에게서 올 것이지만, 많은 유용한 피드백은 시스템 자체에 의해 생성되어야 합니다. 여기에는 규칙, 평가자, 샘플링, 주석 큐, 경고 및 역사적 추적에 대한 백필이 포함됩니다. LangSmith는 자동화 규칙온라인 평가, 프로덕션 추적에서 실행되는 LLM-as-judge 평가자를 포함하여 지원합니다.

이것은 에이전트 팀이 필요한 제품 모양입니다: 추적을 저장하고, 피드백을 저장하고, 피드백을 생성하십시오.

학습 루프는 추적 플러스 피드백에 의존합니다

가시성의 요점은 단지 추적을 보는 것만이 아닙니다. 요점은 그들로부터 배우는 것입니다.

추적은 무엇이 일어났는지 알려줍니다. 피드백은 그것이 무엇을 의미하는지 알려줍니다. 함께, 그들은 모델, 하네스 및 컨텍스트를 개선할 수 있게 합니다. 그들은 수동 기반 디버깅 및 자동화된 평가를 지원합니다. 그들은 프로덕션 행동을 데이터셋, 규칙, 경고 및 회귀 테스트로 변환합니다.

피드백 없는 에이전트 가시성은 불완전합니다. 행동을 검사할 수 있지만, 체계적으로 배울 수는 없습니다.

에이전트 가시성을 최대한 활용하려면, 추적과 함께 피드백을 저장하십시오. 이것이 에이전트 추적을 로그에서 학습 시스템으로 변환하는 것입니다.

Most teams start thinking about agent observability as a debugging tool. Something went wrong, so you open the trace, inspect the steps, and figure out where the agent made a bad decision.

That is useful. But it is too narrow.

The deeper role of agent observability is to power learning. But traces alone do not create that loop. You also need feedback: signals that tell you whether the agent’s behavior was useful, accepted, rejected, inefficient, risky, or wrong.

Not just learning in the model-training sense, but learning across the whole agent system: what the model should do, how the harness should guide it, what context it needs, which failure modes are recurring, and which behaviors are actually working for users.

Traces are not just records of what happened, and feedback is not just a rating at the end. Together, they are the raw material for improving the system.

Learning happens at multiple levels

There are several ways that agentic systems can "learn" and improve over time. We wrote about them here:

Learning can happen at the model level. You may discover examples where the model consistently misclassifies a request, chooses the wrong tool, or fails to follow a policy. Those traces can be used to update the model weights themselves, via SFT or RL.

Learning can happen at the harness level. The harness is everything around the model: prompts, tool schemas, permission checks, control flow, memory update logic, routing, retries, and guardrails. A trace might show that the agent had the right model capability but the wrong scaffolding. Maybe the tool description was ambiguous. Maybe the agent needed a read-before-write constraint. Maybe the system prompt made the wrong tradeoff.

Learning can also happen at the context level. Agents are extremely sensitive to the information they are given: retrieved docs, memory, user preferences, tool results, prior turns, environment state. A trace can show that the model made a reasonable decision given bad or missing context. In that case, the learning loop should improve what context is retrieved, stored, compressed, or discarded. This is commonly called memory.

The important point is that all of these learning loops are powered by traces. If you do not know what the agent saw, what it did, and what happened next, you cannot reliably know what to improve.

This is why agent observability powers agent evaluation. The trace is where agent behavior becomes visible.

Learning can be automated or hand-driven

Some learning is hand-driven. A developer looks at a trace, notices that the agent called the wrong tool, and updates the prompt or tool schema. A PM reviews a set of failed conversations and realizes the product needs a new workflow. An annotator labels traces so the team can build a better eval dataset.

This is still learning. It just has a human in the loop.

Other learning is automated. A system can sample production traces, run online evaluations, detect known failure patterns, add examples to a dataset, or trigger review queues when something looks wrong. The agent does not need to improve itself automatically for the learning loop to be automated. The automation may simply identify which traces deserve attention and turn them into structured feedback.

Either way, the process is powered by traces.

For one agent, with low volume, manual review may be enough. For many agents, or for high-volume production traffic, this becomes an infrastructure problem. You need to capture the traces, filter them, score them, route them, and preserve the ones that matter.

Traces are necessary, but not sufficient

A trace tells you what happened. It does not, by itself, tell you whether what happened was good.

That distinction matters. An agent can complete a task in 40 steps, but maybe the same task should have taken 6. It can produce a confident final answer, but maybe the user rejected it. It can avoid throwing an error, but still fail the user’s intent. It can call the right tool, but with subtly wrong arguments.

To learn from traces, you need feedback attached to them.

Feedback is what turns observability from a passive record into a training signal, debugging signal, product signal, or evaluation signal. Without feedback, you have a large pile of trajectories. With feedback, you can start asking useful questions:

- Which traces represent success?

- Which traces represent failure?

- Which failures are caused by the model, the harness, or the context?

- Which failures are worth turning into evals?

- Which behaviors are improving over time?

This is the core requirement: store feedback with your agent observability data.

Feedback can come from many places

Feedback does not have to mean a human manually grading every trace. In practice, useful feedback comes in several forms.

The most obvious is direct user feedback: thumbs up, thumbs down, a star rating, or a written correction. This signal is easy to understand, but it is usually sparse. Most users do not leave explicit feedback.

Then there is indirect user feedback. For a coding agent, this might be lines of code accepted, diffs reverted, tests passed after edits, or whether the user kept the generated change. For a support agent, it might be whether the user reopened the ticket. For a research agent, it might be whether the user copied the answer or asked the same question again. These signals are noisier than explicit ratings, but often much more plentiful.

You can also generate feedback with an LLM-as-judge. A judge can score whether an answer was helpful, whether an agent followed policy, or whether a trajectory looks suspicious. This is useful because it can run at scale, especially as an online evaluator over production traces. It is not perfect, and it should be calibrated, but it gives teams a way to create structured feedback where human review would be too slow.

Finally, feedback can be deterministic. Rules and regexes are underrated. If you know a failure pattern, encode it. If the agent should never call a destructive command without approval, check for it. If a response should contain a citation, validate it. If a coding agent shows signs of user frustration, detect it.

The Claude Code leak made this concrete. Multiple reports found that Claude Code used a regex in userPromptKeywords.ts to detect frustration words and phrases in user prompts. PCWorld reported that the regex looked for terms like “wtf,” “horrible,” “awful,” and “this sucks.” Slashdot’s summary includes the same pattern, and Blake Crosley’s analysis describes this as regex-based frustration detection rather than LLM inference.

From an engineering standpoint, the pattern is instructive. Not every feedback signal needs a model call. If a cheap rule captures a useful signal, use the cheap rule—and be clear about how that signal is stored and used.

What your observability platform needs

If observability is going to power learning, the platform needs three things.

First, it needs to store traces. This is the base layer. You need the full trajectory of what the agent did: model calls, tool calls, inputs, outputs, metadata, timing, errors, and intermediate state. Ideally, you can ingest traces from whatever stack you are using, not only one framework. LangSmith supports tracing from 30+ different frameworks, and can also ingest traces from OpenTelemetry-compatible applications through OpenTelemetry tracing.

Second, it needs to store feedback. Feedback should not live in a separate spreadsheet or analytics system disconnected from the trace. It should attach directly to the run, trace, or thread it evaluates. That lets you filter by feedback, compare good and bad trajectories, build datasets from real failures, and track whether changes improve the behaviors that matter. LangSmith supports capturing feedback and associating it with traces.

Third, it needs to generate feedback. Some feedback will come from users, but a lot of useful feedback should be produced by the system itself. That includes rules, evaluators, sampling, annotation queues, alerts, and backfills over historical traces. LangSmith supports automation rules and online evaluations, including LLM-as-judge evaluators that run on production traces.

This is the product shape that agent teams need: store traces, store feedback, generate feedback.

The learning loop depends on traces plus feedback

The point of observability is not just to look at traces. The point is to learn from them.

Traces tell you what happened. Feedback tells you what it meant. Together, they let you improve the model, the harness, and the context. They support hand-driven debugging and automated evaluation. They turn production behavior into datasets, rules, alerts, and regression tests.

Agent observability without feedback is incomplete. You can inspect behavior, but you cannot systematically learn from it.

To get the most out of agent observability, store feedback with your traces. That is what turns agent traces from logs into a learning system.

원문 보기 https://www.langchain.com/blog/agent-observability-needs-feedback-to-power-learning