A RAG system without an eval loop is a system whose quality nobody can state. This playbook designs the loop as a first-class architecture element: a golden set, Ragas-class metrics gating changes in CI, production sampling, and drift alerts — specified before launch, not bolted on after the first quality incident.
Tier: Core · Hands-on time: ~35 minutes
The posting evidence is verbatim: "RAGAS evaluation" appears in the job descriptions this track is built from, and the design principle it encodes is that evaluation is part of the system architecture, not a QA afterthought. The architect's deliverable here is an eval architecture design — what gets measured, where the gates sit, who owns the golden set — that the build team implements and the operations track runs.
Define what "good" means for this system, in metrics. The Ragas-class core: faithfulness (answer grounded in retrieved context), context precision and recall (retrieval quality), answer relevance. Add workload-specific checks — citation presence, refusal-on-unknown behavior, tenant-scoping. Each metric gets a target and an owner.
Design the golden set as a maintained asset. Size it honestly (30–100 items to start), source questions from real usage, have SMEs verify reference answers against source passages, and — critically — assign ownership and a refresh cadence. A golden set nobody owns is stale in one quarter.
Draft the set with AI, curate by hand. Anita seeds orbit-docs-copilot's set from support tickets:
Here are 60 support tickets that our docs copilot should have been able
to answer (attached, sanitized). Draft a golden evaluation set:
- For each viable ticket: the user question (cleaned), the doc sections
a correct answer must draw from, and a 2-3 sentence reference answer.
- Mark every item where you are not certain the reference answer is
fully supported by the cited sections — a human will verify all items,
but flag the doubtful ones for extra scrutiny.
- Include 8 out-of-scope questions where the correct behavior is
refusal with a pointer, not an answer.
Every reference answer is then human-verified against the docs. The out-of-scope items matter: refusal behavior regresses silently if it is never measured.
Place the offline gate in CI. Any change to chunking, embeddings, prompts, retrieval config, or model version triggers the eval run; the merge blocks if a headline metric drops beyond a set threshold. Decide the thresholds and the override path (who may ship past a red eval, and what they must record) at design time.
Design production sampling. CI catches what the golden set covers; production catches what it doesn't. Specify the sample rate, what gets scored (the same metrics where computable without references, plus judge-scored quality per pb-46), where scores land (Langfuse/Phoenix traces), and the PII handling for sampled prompts and answers.
Wire drift alerts. Two drifts matter: quality drift (sampled metrics trending down — alert thresholds and an owner) and corpus drift (the golden set no longer resembling live questions — schedule a quarterly comparison of sampled production questions against golden-set coverage, feeding the refresh).
Draw the loop and ship the design. One diagram: golden set → CI gate → deploy → production sampling → drift alerts → golden-set refresh, with owners on each edge. Plus the metric table (metric, target, threshold, gate location). Hand the operational dashboards to the platform/DevOps side — they run it; you designed it.
Golden sets built from client tickets carry client data — sanitize before any external assistant sees them, per the MSA. Where real tickets are off-limits entirely, generate synthetic questions from the document corpus structure with SME review standing in for user reality, and label the set's provenance honestly in the design. The eval loop itself runs fine inside restricted boundaries: Ragas and promptfoo are open source, judge calls can route to client-tenancy endpoints (Bedrock or Azure OpenAI in the client subscription), and a fully local loop with Ollama-served models works for the strictest classes — at reduced judge quality, which the design should state.
The eval loop is drawn on the architecture diagram like any other component — a curated golden set, a CI gate that has demonstrably blocked a bad deploy, production sampling with drift alerts, and named owners on every edge.