Technical walkthrough

One plausible answer can hide a retrieval failure that changes the decision.

This worked example applies the RAG Evaluation Framework to a synthetic travel-policy assistant. It shows why the evaluator must inspect required evidence, retrieval, individual claims, citations, and release gates separately.

Demonstration boundary

The documents, question, results, and scores below are synthetic.

They illustrate an evaluation method; they are not client material, production measurements, or a benchmark claim. The example is intentionally small enough to audit by hand.

Scenario

An internal assistant answers employee questions using approved travel and operations policies.

Test case

Can a field engineer book a $240 hotel for an emergency deployment without prior approval?

Expected behavior

Give the default rule and the emergency exception. Explain that retroactive approval is allowed only with an incident code, approved booking portal, and regional operations director approval within two business days.

Risk

Medium operational and financial risk. An incomplete answer could delay emergency travel or cause an employee to violate policy.

Required evidence

Both the general lodging threshold and the emergency-deployment exception must be retrieved and cited.

Step 1 · Corpus

Verify that answerable, approved evidence exists.

TRAVEL-3.2 · RequiredStandard lodging approval

“Lodging above $200 per night requires manager approval before booking.”

OPS-7.4 · RequiredEmergency field deployment exception

“When an official incident code is assigned, a field engineer using the approved portal may obtain regional operations director approval within two business days after booking.”

TRAVEL-1.8 · Context onlyBooking portal instructions

“Employees should attach the incident code and itemized receipt to the trip record.”

Corpus coverage: pass Required evidence: 2 of 2 present
Step 2 · Retrieval version A

The system finds the general rule but misses the exception.

RankRetrieved passageNeeded?Evaluation
1TRAVEL-3.2 · Standard lodging approvalYesRelevant required evidence
2TRAVEL-1.8 · Booking portal instructionsNoRelated context, but not the exception
3FINANCE-2.1 · Expense reimbursement timingNoKeyword overlap; not useful
Required-evidence recall: 1 of 2 Critical retrieval miss: OPS-7.4
Diagnosis

The corpus is not the problem. Retrieval failed to connect “emergency deployment” with the operations exception. Prompt tuning alone cannot supply evidence the model never received.

Step 3 · Candidate answer A

A fluent answer reaches the wrong operational conclusion.

Assistant response

“No. A $240 hotel exceeds the $200 nightly threshold, so the employee must obtain manager approval before booking. [TRAVEL-3.2]”

Citation correctness: pass

The citation supports the default rule.

Answer completeness: fail

The answer omits the applicable emergency exception.

Release gate: fail

A medium-risk decision cannot pass while required evidence is missing.

Step 4 · Targeted correction

Fix the retrieval failure, then rerun the same locked test.

Metadata

Tag OPS-7.4 by role, emergency status, travel workflow, and policy precedence.

Query handling

Expand “emergency deployment” to the controlled incident-response terminology used in the policy.

Ranking

Boost current policy exceptions when the query contains a matching role and incident context.

Regression

Keep the original question unchanged so improvement is measured rather than demonstrated selectively.

Step 5 · Retrieval version B

The revised system retrieves both parts of the policy.

RankRetrieved passageNeeded?Evaluation
1OPS-7.4 · Emergency field deployment exceptionYesRelevant required evidence
2TRAVEL-3.2 · Standard lodging approvalYesRelevant required evidence
3TRAVEL-1.8 · Booking portal instructionsNoUseful supporting context
Required-evidence recall: 2 of 2 Risk-slice retrieval gate: pass
Step 6 · Candidate answer B

The corrected answer preserves both the rule and exception.

Assistant response

“Normally, no: lodging above $200 requires approval before booking. [TRAVEL-3.2] For an emergency field deployment, the engineer may book first only when an official incident code is assigned and the approved portal is used; a regional operations director must then approve it within two business days. [OPS-7.4]”

Grounding: pass
Citation correctness: pass
Citation completeness: pass
Answer completeness: pass

These are manual illustrative judgments for this synthetic test case, not measured production results.

Release decision

One corrected case is evidence of a fix, not evidence that the system is ready.

This test may pass after the correction, but the release still depends on performance across the full versioned set: routine questions, exceptions, missing evidence, conflicting policies, restricted documents, paraphrases, and adversarial requests.

Decision

Merge the correction into the candidate build, rerun every regression slice, and release only if all critical gates and defined quality thresholds pass.

What this demonstrates

Layered evaluation makes the corrective action visible.

Do not score only the answer

The initial response looked supported until required evidence was compared with retrieval.

Do not average away risk

A critical exception miss deserves its own gate even if common questions perform well.

Do not stop at the fix

Every change must be tested against other cases for regressions in relevance, safety, cost, and latency.