AI Agent Evaluation With Real User Traffic: Sampling, Labelling and Regression Tests

Hand-written tests catch the problems you imagined. Real user traffic catches the rest. Learn to sample traces, label failures, and run regression tests.

By Galactic News Editorial · Published 2026-11-24T04:44:24+00:00 · Updated 2026-11-24T04:44:24+00:00

AI agent evaluation real user traffic sampling labelling regression tests

AI Agent Evaluation With Real User Traffic: Sampling, Labelling and Regression Tests

Hand-written test cases catch the problems you imagined. Real user traffic catches the problems you did not. The strongest agent evaluation loop starts from production: sample real conversations, label what went right and wrong, turn the failures into regression tests, and run those tests before every deploy. The loop is simple to describe and easy to skip. This guide shows how to build it.

AI agent evaluation real user traffic gives you the ground truth no synthetic dataset can: the actual distribution of requests, the real failure modes, and the exact traces where your agent went wrong.

Why Real Traffic Beats Synthetic Tests

Synthetic tests are clean. Real traffic is not. Users ask ambiguous questions, change their minds mid-conversation, paste broken formatting, and request things outside your agent's scope. A test set written by the team that built the agent shares the team's blind spots. Production traffic does not.

Three properties make real traffic valuable. First, it shows the true distribution of inputs, including the long tail of rare requests that dominate support costs. Second, it exposes failure modes nobody predicted, such as the agent confidently answering from a stale tool result. Third, it gives you exact traces: the full sequence of model calls, tool calls, and retrievals behind each outcome. A trace is the only honest record of what the agent did.

The workflow has four stages: trace, sample, label, and test. Each stage has its own tooling and its own pitfalls.

AI Agent Evaluation Real User Traffic: Trace Everything, Sample Smartly

Start by recording full traces of production runs. Platforms like LangSmith and Braintrust capture every step: the prompt, the model output, each tool call and its result, latency, and token cost. LangSmith turns tracing on with environment variables, and no agent code changes are needed to log a trace. Braintrust logs production requests in the same format as its evals, so a poor production answer can become a test case with one click.

Do not keep everything. Full retention gets expensive and slow to search. Sample deliberately instead.

Stage 2: Labelling — Turn Traces Into Ground Truth

A trace is raw material, not a test case. Labelling adds the expected behaviour: what the agent should have done, and what counts as correct.

LangSmith's annotation queues show each example's inputs alongside reference outputs, and reviewers attach named assertions describing what a correct answer should or should not include. Its Engine feature goes further: it detects issues in a tracing project, proposes a diagnosis with supporting traces, and generates ground-truth dataset examples from the production inputs for offline evaluation.

Braintrust's Loop assistant can draft datasets and scorers from a plain description, and its playground lets you run a modified prompt against production traces to see how scores shift before deploying.

Labelling is the slowest stage, and it is the one teams most often rush. Three rules keep it honest. First, label with the people who own the product behaviour, not only engineers. Second, write assertions about outcomes, not about exact wording: the agent should quote the price including tax, not produce a specific sentence. Third, label a small set well rather than a large set carelessly. Fifty carefully labelled failures beat five hundred unreviewed ones.

Stage 3: Scorers and Regression Tests

Once cases are labelled, you need scorers: functions that rate the agent's output. Choose the scorer to match the question type.

Scorer typeBest forExample
Code-based checksDeterministic outputsJSON schema validity, exact match, tool called with correct arguments
LLM-as-judgeNuanced qualitiesFaithfulness, relevance, tone, safety, scored against a rubric
Trajectory evaluatorsAgent behaviourDid the tool sequence make sense, were unnecessary calls avoided
Human reviewHigh-stakes or ambiguous casesFinal sign-off on a small, critical subset

Run the labelled dataset as a regression suite. In LangSmith, the pattern is traces to datasets to evals: run the dataset through a new prompt or model version, compare scores with the baseline, and ship only if nothing regressed. In Braintrust, the same loop is data plus task plus scorers: run the eval, sort by the examples whose scores dropped, open their traces, and read what changed.

Wire the suite into CI. A prompt change, a model swap, or a tool description edit should trigger the eval automatically. Block the release when a regression appears. A suite that runs but never blocks anything is a dashboard, not a test.

Stage 4: Close the Loop

Evaluation is a loop, not a milestone. After each release, new traces arrive. Review the worst runs of the week. Add the new failures to the dataset with labels. Retire cases that no longer reflect the product. Watch the score trends, not just the latest run.

Two habits keep the loop healthy. First, run the evaluation before the deploy, not after. An eval that runs in CI catches a regression while it is still cheap to fix. Second, treat dataset growth as maintenance. A dataset frozen in January will not protect a product that changed in March.

One warning: a rising score can mislead. If your dataset only contains cases the agent already passes, the score climbs while real quality falls. Keep adding fresh failures from production. The dataset should get harder over time, not easier.

Bottom Line

Real user traffic is the best evaluation data you have. Trace production runs with LangSmith or Braintrust, sample failures and a slice of normal traffic, label the cases with outcome-based assertions, and run them as regression tests in CI before every deploy. The loop is unglamorous work: sampling, labelling, scoring, and re-running. It is also the difference between an agent that looks good in a demo and one that survives contact with real users.