Skip to main content
reopt Handbook
reopt Handbook
LLMOps and AgentOps in Production

Architecture and Release

Ch1. System ArchitectureCh2. Versioning and ReleaseCh3. Evaluation Framework

Operational Reliability

Ch4. Online GuardrailsCh5. Observability and SLOsCh6. Cost and Latency Optimization

Growth and Response

Ch7. Experiment OperationsCh8. Incident Management Runbook

Verification

Verification ReportVerification ArchiveUpdates
Handbook›LLMOps and AgentOps›Ch3. Evaluation Framework
한국어English

Ch3. Evaluation Framework

Connect offline benchmarks with online operating signals

Key takeaways

  • Production evaluation must clear quality, safety, efficiency, and reliability together, not a single accuracy number.
  • Combine a weighted composite score (0.4Q + 0.3S + 0.2E + 0.1R) with hard gates that block release on PII exposure, unauthorized tool execution, or successful prompt injection.
  • Manage evaluator reliability with inter-rater agreement κ ≥ 0.6 and 100% golden-set coverage of core scenarios.
  • Reconstruct failures from real production traces, then promote high-signal cases into repeatable trace-derived eval datasets.
  • Treat LLM-as-a-Judge as one signal: lock the judge prompt, model, rubric version, and human calibration set as release artifacts.

Evaluation does not end with a single accuracy score.
In production, quality, safety, cost, and latency must all pass together.

Four-Axis Evaluation Model

AxisKey QuestionExample Metrics
QualityDoes the answer accomplish the task?Task Success, Human score
SafetyDoes the workflow avoid disallowed behavior?Policy violation rate
EfficiencyAre cost and speed within budget?Unit cost, p95 latency
ReliabilityDoes behavior hold under change?Drift, Error budget burn

Composite Score Example

Composite Score=0.4Q+0.3S+0.2E+0.1R\text{Composite Score} = 0.4Q + 0.3S + 0.2E + 0.1RComposite Score=0.4Q+0.3S+0.2E+0.1R
  • Q: quality score
  • S: safety score
  • E: efficiency score
  • R: reliability score

Evaluation Reliability

LLM evaluation is vulnerable to evaluator bias and sample bias.
Manage evaluation reliability alongside scores.

Inter-rater Agreement=κ\text{Inter-rater Agreement} = \kappaInter-rater Agreement=κ
Reliability MetricRecommended Threshold
Inter-rater agreement (κ)>= 0.6
Golden set coverage100% of core scenarios
Regression case reproducibility>= 95%

2026 Evaluation Framework Ecosystem

ToolStrong AreaOperating Point
DeepEvalpytest-style regression evals, RAG/agent metricsGood CI fit, but lock scorer versions
RAGASRAG quality, faithfulness, context precision/recallUseful for separating retrieval and generation issues
Inspect AI (UK AISI)Sandbox-based model and agent evaluationStrong fit for risky work and code execution tests
LangSmithTrace, experiment, Fleet agent operationsEasy to promote production traces into eval datasets
BraintrustLogging, evals, scorers, Loop agentUseful for exploring failure modes and drafting scorers in natural language

LLM-as-a-Judge

LLM-as-a-Judge is widely used in 2026, but it should not be treated as a single source of truth. Lock the judge prompt, judge model, rubric version, and human calibration set as release artifacts.

Trace-First Evaluation Loop

Agent workflows hide failure causes if you inspect only the final answer. Start by reconstructing actual execution from traces, then promote high-signal cases into repeatable evals.

Collect representative production traces, including model calls, tool calls, handoffs, guardrails, and approvals.
Classify failed traces into grader criteria and regression dataset candidates.
Re-evaluate prompt, model, and routing changes against the same trace-derived dataset.
Apply the same grader to online samples after release to detect drift.

Trace-Derived Eval Case Example

eval_case:
  id: support-refund-approval-001
  source_trace_id: tr_01hx9...
  user_segment: enterprise
  expected:
    tool_sequence:
      - lookup_order
      - request_human_approval
      - issue_refund
    approval_required: true
    pii_exposed: false
  graders:
    tool_order: exact_match
    approval_boundary: must_pause_before_side_effect
    final_answer: rubric_v20260517

2026 Benchmarks

BenchmarkEvaluation AreaNotes
LiveCodeBenchCode generationContinuously updated benchmark designed to reduce data contamination
AIME 2026Mathematical reasoningBased on the American Invitational Mathematics Examination
TAU-bench RetailAgent tasksMeasures agent task success and tool-use efficiency in retail workflows
JBDistillSafetySafety benchmark based on distilled jailbreak attacks

Benchmark Use

General benchmark scores rarely map directly to production performance. Use them only alongside your own domain-specific evaluation set.

Evaluation Dataset Operations

  • Golden set: required business scenarios.
  • Red-team set: policy bypass and malicious inputs.
  • Regression set: past incidents and failures.
  • Cost stress set: high-token and multi-tool scenarios.

Safety Evaluation Extension

Safety Dimensions

DimensionWeightEvaluation Items
System integrity30%System prompt modification, role impersonation
Data protection30%PII extraction, cross-customer data access
Permission control20%Privilege escalation, tool permission bypass
Content safety20%Harmful content, deliberate misinformation

Threat Scenarios

  • Prompt injection: system-instruction bypass, RAG poisoning, tool-result manipulation.
  • Data leakage: customer data extraction, cross-session information leakage.
  • Permission abuse: destructive actions and unauthorized refunds.

Practical Decision Rules

ItemRelease Threshold
Quality delta (ΔQ)>= -1%
Safety violation rate<= 0.2%
Cost delta (ΔCost)<= +5%
Latency delta (ΔLatency)<= +10%

Separate Hard Gates from Average Scores

Block the release before scoring when any of these occur:

  • PII or secret exposure.
  • Unauthorized tool execution, including refunds, payments, deployments, or other side effects.
  • Successful prompt injection, RAG poisoning, or tool-output manipulation.
  • High-risk regression limited to a specific tenant or customer segment.

Decision Principle

Do not approve a release solely because the average score improved. A single high-risk scenario can block the release until that risk class passes.

Baseline and Sources

ItemBaseline DateRecheck ByPrimary Source
OpenAI trace grading/evals2026-05-172026-06-16https://developers.openai.com/api/docs/guides/agent-evals
Agents SDK tracing2026-05-172026-06-16https://developers.openai.com/api/docs/guides/agents/integrations-observability
Braintrust Loop2026-05-172026-06-16https://www.braintrust.dev/docs/loop

Related docs

References

Vercel Enterprise AI Platform · Source categories for adapting the Vercel enterprise AI platform handbook.

Observability and Evaluation

Vercel Enterprise AI Platform · Connect traces, prompts, tool calls, quality scores, latency, and cost.

Deployment and AI CI/CD

Vercel Enterprise AI Platform · Ship AI systems with preview checks, evaluations, canaries, kill switches, and rollback.

Ch2. Versioning and Release

Release prompts, models, tools, and policies as traceable artifacts

Ch7. Experiment Operations

Repeat prompt, model, and workflow experiments quickly and safely

Ch2. Versioning and Release

Release prompts, models, tools, and policies as traceable artifacts

Ch4. Online Guardrails

Design real-time policy enforcement, blocking, fallback, and human approval loops

On this page

Four-Axis Evaluation ModelComposite Score ExampleEvaluation Reliability2026 Evaluation Framework EcosystemTrace-First Evaluation LoopTrace-Derived Eval Case Example2026 BenchmarksEvaluation Dataset OperationsSafety Evaluation ExtensionSafety DimensionsThreat ScenariosPractical Decision RulesSeparate Hard Gates from Average ScoresBaseline and Sources