A candidate learns the test set's wording
Detect: Held-out and production cases show weaker performance.
Recover: Refresh representative cases and preserve a protected evaluation split.
Evaluate agent and RAG behavior with versioned datasets, component metrics, calibrated judges, and release criteria tied to actual task outcomes.
Evaluation frameworks organize datasets, execution traces, scoring, and comparisons across application versions. TruLens and Ragas provide useful evaluation capabilities, but the architecture must still define what success means for the product. A metric is a measurement instrument with assumptions, not an automatic release decision.
For RAG, distinguish retrieval relevance, answer relevance, and support by retrieved evidence. Faithfulness to a retrieved passage does not prove that the passage is true or current. For agents, add tool selection, argument correctness, authorization, side-effect outcomes, and completion criteria. Evaluate the trajectory when the final answer hides an unsafe or wasteful path.
A prototype needs a small representative set with reviewed expected behavior. Include unanswerable questions and tool failures, not only successful demonstrations.
Production versions datasets, prompts, models, judge configurations, and scoring code. Calibrate model judges against human labels and retain uncertainty rather than treating every score as exact.
At scale, combine offline release tests with sampled production evaluation. Segment results by tenant, language, intent, and risk so aggregate improvements cannot hide critical regressions.
Contains representative inputs, expected behavior, evidence, and meaningful failure cases.
Captures retrieval, tool calls, model versions, and outcomes with appropriate data minimization.
Computes deterministic checks and model-assisted scores for distinct quality dimensions.
Establishes agreement and failure modes of automated judges.
Applies risk-weighted thresholds and compares candidates with a versioned baseline.
flowchart LR
D["Versioned case dataset"] --> R["Candidate runner"]
R --> T["Execution traces"]
T --> M["Component and outcome metrics"]
H["Human calibration labels"] --> M
M --> C["Baseline comparison"]
C --> G["Release criteria"]
G --> P["Production sampling"]
P --> DTranslate product requirements into observable success and failure criteria.
Sample realistic workloads and add adversarial, missing-evidence, and degraded-dependency examples.
Execute identical cases with pinned application and data versions where feasible.
Separate retrieval, grounding, task completion, safety, latency, and cost measurements.
Review disagreements and estimate uncertainty for model-based metrics.
Apply release criteria, preserve evidence, and compare production drift against the baseline.
Enterprise SaaS · Illustrative enterprise scenario, not a reported customer outcome.
A software vendor updates retrieval and prompts for an assistant that diagnoses integration errors.
A higher average answer score can conceal incorrect tool arguments and regressions on rare authentication failures.
The assistant must resolve supported cases with correct evidence and safe tool usage under practical latency and cost limits.
A versioned evaluation suite combines RAG metrics, deterministic tool-contract checks, and analyst-labeled resolution outcomes.
If the judge model changes, the team recalibrates scores rather than interpreting a shifted scale as product improvement.
Track resolution quality, unsupported claims, tool accuracy, judge agreement, and cost per successful case. Framework scores are diagnostic signals, not universal quality guarantees.
| Decision | Benefit | Cost |
|---|---|---|
| Model judges | Semantic evaluation scales beyond exact string matching. | Bias, inconsistency, and correlated errors require calibration. |
| Large datasets | More workload variation can be represented. | Execution and review costs increase. |
| Strict release gates | Important regressions are caught before deployment. | Noisy metrics can block useful changes without uncertainty handling. |
Detect: Held-out and production cases show weaker performance.
Recover: Refresh representative cases and preserve a protected evaluation split.
Detect: Segment analysis reveals concentrated failures.
Recover: Block release for that criterion and repair the affected path.
Check source authority and task correctness separately.
Pin or recalibrate the judge to preserve comparability.
Evaluate tools, evidence, permissions, and external effects.