Agent Evaluation: Causal Tracking with Real-Session Behavioral Signals
This article explains how to evaluate AI agents using verifiable behavioral signals from real sessions instead of user preference votes, and how randomized causal tracking can estimate net improvement rates. It covers session signal extraction, stratified randomization, metric design, and production practices for building reproducible and auditable long-horizon agent evaluations.
Agent Evaluation: From Human Votes to Real Behavioral Signals
Traditional agent capability evaluation often relies on users voting for their preferred response between two answers. This approach is simple to implement, but it has clear biases: users may compare only the final text while ignoring state changes across multi-turn tool calls; vote results are affected by prompt wording, presentation order, and user fatigue; and in long-horizon tasks, the real error may have occurred much earlier but be obscured by the final answer. A more reliable evaluation therefore needs to return to the actual usage process, extract verifiable behavioral signals from agent sessions, and use statistical methods to estimate a model’s net improvement rate relative to the average.
1. Evaluation Paradigm: Session Evidence Rather Than Votes
Real agent sessions contain rich observable events. Compared with single-turn preference judgments, the following signals are closer to task-execution evidence:
- Explicit confirmation: The user indicates that the task is complete, the result is usable, or no further changes are needed. This is a relatively strong positive signal.
- Praise: The user expresses satisfaction, but the strength is weaker than explicit confirmation. Avoid mistaking polite remarks for task success.
- Complaint: The user points out that the result is wrong, incomplete, unusable, or that the experience is abnormal. This is usually a negative signal.
- Correction instruction: The user asks to change direction, add steps, roll back an operation, or re-execute. This may indicate a model error or a requirement change, so attribution requires context.
- Command execution error: A terminal command fails, returns a non-zero status, or produces output that does not match expectations. This signal is relatively objective, but it is still necessary to distinguish missing environment dependencies and insufficient permissions from model-generated errors.
From an engineering perspective, a long-horizon session can be treated as one analysis unit. Signals should be extracted by turn while preserving timestamps, task phases, tool-call results, and user-feedback types. Signal extraction should follow the principles of being interpretable, auditable, and reproducible, and should avoid replacing contextual judgment with simple keyword matching.
# Pseudocode: session signal extractionfunction extract_signals(session):signals = []for turn in session.turns:if is_explicit_confirmation(turn.user_text):signals.append({type: "confirm", turn: turn.id, weight: +1.0})if contains_praise(turn.user_text):signals.append({type: "praise", turn: turn.id, weight: +0.5})if contains_complaint(turn.user_text):signals.append({type: "complaint", turn: turn.id, weight: -1.0})if is_correction_instruction(turn.user_text):signals.append({type: "correction", turn: turn.id, weight: -1.0})if turn.tool_result.status != "success":signals.append({type: "exec_error", turn: turn.id, weight: -0.8})return aggregate_by_task_phase(signals)
2. Causal Tracking: Estimating Net Improvement Rates with Randomized Inference
Counting signal frequencies alone is still insufficient to determine which model is better. High-quality sessions may come from simpler tasks, complaints may come from more complex scenarios, and user preferences can also affect interaction patterns. The core of causal tracking is to reduce confounding through randomized assignment: under the same or comparable task distribution, different models receive approximately random exposure opportunities, and then the difference between each model’s outcome and the overall average is estimated.
Let the observed outcome of model i be Y, the randomized adjusted mean outcome be E[Y|i], and the global mean be E[Y|avg]. The net improvement rate can be expressed as:
net_gain(i) = adjusted_mean(Y | model = i) - adjusted_mean(Y | all_models)
Here, Y can be obtained by weighted aggregation of signals such as confirmation, praise, complaints, corrections, and command errors. The value of randomized inference is that it does not require assuming that a given model naturally faces the same difficulty; instead, through the assignment mechanism and stratified adjustment, it makes comparisons closer to “relative improvement under equivalent conditions.” In practice, confidence intervals, sample sizes, and task-stratified results should also be reported to avoid interpreting small differences as stable rankings.
# Pseudocode: randomized comparisonfor unit in randomized_units:model = assign_randomized_model(unit)reward = estimate_reward(unit.signals, unit.task_profile)record(model, reward, unit.strata)for model in all_models:adjusted = stratify_adjust(records[model])net_gain[model] = adjusted.mean - global_adjusted_meanreport(model, net_gain[model], confidence_interval(records[model]))
3. Metric Design: Combine Net Improvement Rate with Granular Capabilities
The overall net improvement rate is suitable for answering “whether the model is better overall,” but it cannot explain “why it is better.” Granular metrics are therefore needed, such as terminal command execution reliability, direction adjustment and correction capability, task completion, rollback cost, and multi-turn consistency. Command execution reliability focuses on whether tool calls are stable and whether errors are recoverable. Steerability focuses on whether the model can quickly converge according to user corrections instead of repeatedly making the same type of mistake.
Metric design should avoid being gameable: it should not reward only “the user said thanks,” nor penalize only “an error occurred.” Instead, it should combine error severity, recovery cost, and final task state. For open-weight and closed models, leaderboard rankings should be understood as relative positions under a specific task distribution and sampling period, not as absolute conclusions about capability. In public evaluations, leading open-weight models may perform strongly in some categories, but full rankings are still affected by toolchains, long-range memory, and correction capability, and should be interpreted together with granular metrics.
4. Production Implementation and Best Practices
For production deployment, it is recommended to establish a five-stage pipeline: collection, de-identification, extraction, statistics, and auditing. Logging services should retain session events and tool results, object storage should save de-identified samples, and monitoring and alerting should track anomalies in signal extraction. All randomized assignments should record seeds and stratification fields to ensure reproducibility. Ranking publications should include sample sizes, confidence intervals, and task-distribution descriptions, so that a live blind-test leaderboard is not treated as a one-time absolute conclusion.
In summary, an evaluation method based on real-session behavioral signals and randomized causal tracking can reduce human-voting bias and improve the objectivity of long-horizon agent task assessment. The key is not to chase a single ranking, but to build an evaluation system that is interpretable, reproducible, and continuously iterable.
