Skip to main content

Evaluation Engineering: All Planes, All Methods

This is the implementation guide for eval engineering. Principles live in G.A.I.N Evaluation. This series explains how to build a control system that covers every plane, every failure mode, every data source, and every execution mode, without pretending a single end-of-pipeline score is enough.

THE CLAIM

A robust eval framework scores every plane on static golden sets, synthetic cases, production replay, and user feedback, using automated checks, calibrated LLM-as-judge, and human review, in offline CI gates and online sampling, with incidents feeding the dataset continuously.

What you are building

A production eval framework is six connected capabilities on eight planes:

  1. Plane-aware harness: replay production paths and score each stage, not just the final answer
  2. Data sources: golden, synthetic, replay, and feedback loops (see below)
  3. Scoring stack: automated checks, LLM-as-judge, human review on shared rubrics
  4. Offline gates: CI/CD blocks promotion on regression
  5. Online eval: sample, shadow, canary, drift detection after ship
  6. Improvement loop: failures promote to datasets within days

The eight eval surfaces:

  1. Plane ① Input: parsing, injection, intent, PII
  2. Plane ② Data: freshness, lineage, access
  3. Plane ③ Context: retrieval, scope, abstention
  4. Plane ④ Reasoning: faithfulness, conclusions, tools
  5. Plane ⑤ Tool: selection, args, errors
  6. Plane ⑥ Memory: isolation, TTL, leakage
  7. Plane ⑦ Action: policy, authorization, audit
  8. Plane ⑧ Outcome: task success, clarity, trust

PlaneEval focusWhen
① InputParsing, injection, intent, PIIEvery request, before inference
② DataFreshness, lineage, accessIndex, corpus, and source changes
③ ContextRetrieval, scope, abstentionEvery retrieval pack
④ ReasoningFaithfulness, conclusions, toolsEvery model plan or synthesis
⑤ ToolSelection, args, errorsEvery tool proposal
⑥ MemoryIsolation, TTL, leakageCross-turn and cross-session
⑦ ActionPolicy, authorization, auditEvery side effect
⑧ OutcomeTask success, clarity, trustFinal user-visible result

Eval modes & data sources

Scorers answer how you grade. Modes and sources answer when and from what.

Offline (CI)Online (production)
Golden (static)Primary gate datasetCompare drift vs baseline
SyntheticEdge + adversarial expansionUsually offline only
Production replayNightly + pre-releaseShadow path on live copies
User feedbackPromoted to goldenReal-time triage queue
DecisionShip or rejectDrift alert · canary rollback

Deep dives: Golden Datasets · Synthetic Generation · Online & Dynamic Eval

Static vs replay (do not conflate)

Static goldenProduction replay
OriginExpert + sampled + syntheticFull trace from prod
StrengthStable regression baselinePredicts real path behavior
WeaknessAges without refreshNeeds trace infra + redaction
Gate useEvery PRModel/index/tool changes + nightly

The three scoring methods (use all three)

MethodBest forNever use it alone for
Automated checksSchema, policy, latency, recall@k, tool argsNuance, tone, partial correctness
LLM-as-judgeGrounding, completeness, reasoning at scaleCompliance sign-off, novel failures
Human reviewCalibration, high-risk, audit samplesEvery PR at enterprise scale

Calibration rule: Humans anchor ground truth on a fixed sample. Judge tuned to κ ≥ 0.7. Automation encodes non-negotiables.

See Human Review and LLM-as-Judge.

Inside “automated checks” (specialized scorers)

“Automated” is not only if json.valid. Name these explicitly in your harness:

Specialized scorerPlanevs LLM-as-judge
Policy / PDP replayActionDeterministic verdict match
Schema & type validationTool, InputHard fail
Retrieval metricsContextrecall@k, scope violations: math on IDs
NLI / entailmentReasoningClaim ↔ chunk support (optional model)
Safety / injection classifiersInputTrained classifier, not rubric
Property / invariant testsAll“Never call tool X without ALLOW”
Latency / cost budgetsSystemSLO assertions

Compliance and money movement never rely on judge alone: policy replay + human.

Comparative eval (pairwise)

ModeWhen
PointwiseDefault CI gate: absolute rubric thresholds
PairwisePick better prompt/model when both pass pointwise
Shadow pairwiseNew stack vs prod on same live inputs

Documented in LLM-as-Judge.


Plane ①: Input

Parse and classify before inference. Playbook: Input.

Plane ① bar

If injection or ambiguous intent passes Input, no amount of retrieval quality will save the outcome.

Five capabilities

  1. Intent classification: correct task route on the golden set
  2. Injection resistance: no instruction override on the adversarial set
  3. PII detection: sensitive fields flagged or redacted per policy
  4. Input schema: malformed payloads rejected with a safe error
  5. Locale / encoding: no corruption of non-ASCII content

Eval: Input. Related: Intent router.


Plane ②: Data

Source of truth behind the model. Playbook: Data.

Plane ② bar

The vector store is a component in Data, not the whole plane. Stale sources, missing tombstones, and cross-env catalogs fail here, not in Context.

Five capabilities

  1. Freshness: indexed version matches the authoritative source within SLA
  2. Lineage: every chunk maps to source id, version, and transform step
  3. Access: only entitled documents exist in the searchable set
  4. Correctness: facts in indexed extracts match domain reference
  5. Deletion: revoked material absent from the index within SLA

Eval: Data.


Plane ③: Context

What reached the model for this call. Playbook: Context.

Plane ③ bar

Data owns corpus health. Context owns whether this user, this question, got the right chunks in the pack.

Five capabilities

  1. Recall@k: required docs in the top-k
  2. Precision@k: share of top-k that is relevant
  3. Scope: out-of-policy chunks never enter the pack
  4. Abstention: no answer when evidence is below threshold
  5. Attribution: cited chunks support the claims

Eval: Context. Related: G.A.I.N RAG.


Plane ④: Reasoning

Plan, synthesize, decide next steps. Playbook: Reasoning.

Plane ④ bar

Context can be perfect and reasoning can still fail. Score faithfulness (stays on evidence) separately from correctness (draws the right conclusion).

Five capabilities

  1. Faithfulness: claims overlap supporting chunks
  2. Logical consistency: conclusions follow from the pack
  3. Tool selection: proposed tool matches the expected family
  4. Uncertainty: thin evidence is expressed, not hidden
  5. Hallucination: no unsupported claims

Eval: Reasoning.


Plane ⑤: Tool

How agents touch the real world. Playbook: Tool.

Plane ⑤ bar

Most production incidents are tool misuse, not bad prose. Schema, selection, and composition are automated gates.

Five capabilities

  1. Selection: the correct tool from the scoped manifest
  2. Schema: args match JSON schema
  3. Semantics: args valid for the domain (human on money paths)
  4. Idempotency: keys present where retries exist
  5. Allowlist: no disallowed or invented tools

Eval: Tool.


Plane ⑥: Memory

State across turns, isolated by session. Playbook: Memory.

Plane ⑥ bar

Memory eval proves isolation and freshness, not how well the assistant "remembers" in a demo thread.

Five capabilities

  1. Session isolation: User A state invisible to User B
  2. TTL expiry: stale memory dropped per policy
  3. Consistency: same fact across turns unless updated
  4. Write policy: only allowed keys persisted
  5. Forget / delete: erase propagates (GDPR and similar)

Eval: Memory.


Plane ⑦: Action

Proposal is not permission. Playbook: Action.

Plane ⑦ bar

Eval here is mostly deterministic: PDP replay, principal match, audit-before-act. Never judge-only for money movement.

Five capabilities

  1. PDP verdict: ALLOW, DENY, or STEP_UP matches golden scenarios
  2. Principal: acting subject matches the token
  3. Policy pin: policy_version recorded on the verdict
  4. Order: side effect only after ALLOW
  5. Audit: immutable record before execution

Eval: Action. Related: Governance Blueprint.


Plane ⑧: Outcome

What the user sees, after every upstream plane is scored. Playbook: Outcome.

Plane ⑧ bar

Outcome is the integration test across all planes. It is never the only test.

Five capabilities

  1. Task success: user goal achieved (domain-defined)
  2. Completeness: all parts of the question addressed
  3. Clarity: actionable, unambiguous language
  4. Usefulness: a practitioner would act on this
  5. Trust: appropriate confidence and citations

Eval: Outcome.

Golden case schema (every plane)

Golden eval case schema (JSON)
{
"id": "eval-2026-07-001",
"plane": "context",
"scenario": "representative | edge | adversarial | incident_replay",
"status": "draft | active",
"input": { "user_message": "...", "principal": "...", "session": "..." },
"expected": {
"must_retrieve": ["doc-id-1"],
"must_not_retrieve": ["doc-id-9"],
"abstain": false
},
"rubric": ["grounding", "scope", "ranking"],
"failure_class": null,
"source": "production_replay | synthetic | manual | user_feedback",
"risk_tier": "low | medium | high"
}

Only status: active cases gate releases. High-risk → human regardless of judge score.

Per-plane eval recipe

  1. Define failure taxonomy for the plane
  2. Instrument traces on every production request
  3. Build dataset slice (representative + edge + adversarial per use case)
  4. Automated checks + specialized scorers where applicable
  5. Judge rubric (3-5 dimensions, anchored 1-5)
  6. Calibrate judge vs human (κ ≥ 0.7)
  7. Set offline gate thresholds per plane
  8. Online sample + drift alerts for same plane metrics
  9. Incident → case within one week

Release gate matrix

Change typePlanes to re-runOffline gateOnline follow-up
Model swapContext, Reasoning, OutcomeGolden + replay; no judge driftShadow 24h before full cutover
Prompt changeReasoning, OutcomeRubric ≥ baselineSample judge scores 48h
Retrieval / indexData, Contextrecall@k; scope = 0 on adversarialRetrieval metric dashboard
Tool / ACLTool, ActionSchema 100%; PDP replay 100%Policy violation alert
Memory storeMemory, ReasoningLeakage = 0Session isolation monitor

Ownership

RoleOwns
Product / domainRubrics, representative cases, business thresholds
AI platformHarness, judge pipelines, score store, CI + online pipelines
GovernancePolicy cases, audit sampling, high-risk human queue
SRE / reliabilityReplay infra, drift alerts, incident-to-case SLA

Further reading (external)

Third-party articles, guides, and tool docs, curated by topic and mapped to each page in this series. By other practitioners, not this site.

Further reading (external) →

Series index

Foundations

Eval planes

Reference