Goblin News
Goblin NewsAI news, distilled.
← Back to feed
6

LangChain Guide: How to Start and Structure Agent Evals, From First Dataset to Production

Products1 source·2d ago

Summary

  • • Guide advises starting agent evals with one behavior and 10-20 examples drawn from real traces
  • • Offline evals run before shipping; online evals monitor production, and new failures become dataset examples
  • • Code evaluators preferred where possible, LLM judges otherwise, with human review checking both
  • • Multi-step agents should be evaluated on full threads, trajectories, and final state
Adjust signal

Details

Tech Info

An agent eval scores the outputs and behavior of agent runs

The guide treats the run, the full execution of an agent on a task, as the unit being scored rather than a single model response.

Context

Agents are hard to test because outputs vary and several answers can be correct

Exact-match checks break down. A correct-looking output can still come from a wrong path, such as an unneeded tool call or an action taken without permission.

Strategy

Recommended start: pick one behavior and build a dataset of 10-20 examples from real traces

The guide favors a small realistic starting set, and says to run a baseline experiment first so later changes can be compared against a known score.

Tech Info

Offline evals are used before shipping; online evals are used in production

Offline evals test changes against a fixed dataset. Online evals score live traffic and catch failures the dataset did not anticipate.

Strategy

New production failures should be turned into dataset examples

This closes the loop between online and offline evaluation, so each observed failure becomes a regression test.

Tech Info

Use code evaluators where possible and LLM judges where not, with human review checking both

Code checks are deterministic for verifiable criteria. LLM judges cover subjective criteria, and human review verifies both are scoring accurately.

Tech Info

Multi-step agents should be evaluated at three levels: full threads, trajectories, and final state

Trajectory checks address correct answers reached via the wrong path, such as unneeded tool calls.

Tech Info

Benchmarks like Terminal-Bench are offline evals with longer tasks and their own environments

The guide frames public benchmarks as a kind of offline eval rather than a separate category.

Infrastructure

Harbor runs benchmark evals and logs results to LangSmith experiments

This lets benchmark runs be tracked alongside a team's own eval experiments in the same tooling.

Tech Info = how evals work, Context = background, Strategy = recommended practice, Infrastructure = tooling

What This Means

This is vendor guidance for teams building AI agents, and it argues that evaluation can start small rather than waiting for a large test suite. Its central point is that judging an agent only by its final answer can miss wrong-path behavior like unneeded or unauthorized actions, so checking the steps taken matters too. Teams shipping agents may find the loop of testing before release, monitoring in production, and turning failures into new test cases a practical template.

Sources

Similar Events