"The bot seems better" is not a measurement. A golden set — real user questions with verified correct answers — turns RAG quality into an engineering loop: score the system, classify each failure as retrieval, generation or content, fix with the matching lever, and re-measure. No fix ships on vibes.
Tier: Advanced · Workflow area: Assistants & RAG · ~45 minutes
This playbook builds the evaluation discipline for any KB-grounded assistant — the pb-38 build, a vendor virtual agent, Copilot over SharePoint: construct a golden Q&A set from real tickets and searches, run it through the system, diagnose failures by category, and iterate chunking, article rewrites and synonym coverage with before/after numbers. (UC-41)
Mine 50 real questions. From ticket subjects/descriptions, portal search logs, and (if live) bot transcripts, pull questions in users' actual phrasing. Cover the volume distribution — mostly top intents, a tail of rare-but-answerable, plus 5–8 questions the KB deliberately cannot answer (the refusal set). Deduplicate near-identical phrasings with AI's help, keeping the most colloquial variant of each.
Attach verified ground truth to each row. For every question: the correct answer (verified by a human against current reality — not just against the article, which may be wrong), and the source article(s) that should be retrieved. Golden-set columns: id, question, expected_answer, expected_sources, category, notes. The refusal set's expected answer is the refusal. This verification pass is the expensive step and the whole point — a golden set with unverified answers just measures agreement with your KB's errors.
Run the set and capture everything. Script it against your system (trivial for the pb-38 build; for vendor bots, run manually or via API): for each question record the retrieved chunks/sources, the generated answer, and the citations. Fifty questions is a lunch break.
Grade with an LLM judge, spot-checked by you.
For each row: QUESTION, EXPECTED_ANSWER, EXPECTED_SOURCES,
RETRIEVED_SOURCES, GENERATED_ANSWER.
Grade:
- retrieval_hit: did RETRIEVED_SOURCES include EXPECTED_SOURCES? (Y/N)
- answer_quality: CORRECT / PARTIAL / WRONG / REFUSED, judged
against EXPECTED_ANSWER only — not your own knowledge
- faithful: is every claim in the answer supported by the retrieved
chunks? (Y/N)
Output one row per question plus a summary table of counts.
Manually re-grade 10 of the 50 each run; if you disagree with the judge more than once or twice, tighten the grading prompt before trusting the totals. (Ragas-class frameworks automate these metrics — faithfulness, answer relevancy, context precision/recall — worth adopting once the manual loop has taught you what the numbers mean.)
Classify every failure with the two-question test. For each non-CORRECT row ask: Did retrieval bring back the right chunks? and Is the correct answer actually in the KB?
Typical first-run distribution is heavily retrieval and content — which is why prompt-fiddling alone rarely moves the score.
Fix the biggest cluster with its matching lever, one change at a time. The classic retrieval-failure fix: vocabulary mismatch. Users say "wifi keeps dropping", the article says "intermittent 802.1X disconnection". Two remedies, both cheap: add a user-phrasing summary block to the top of the article ("Users describe this as: wifi dropping, wifi broken, laptop keeps disconnecting"), or enable hybrid retrieval so literal keywords get a vote. For chunking-shaped failures (answers split across chunk boundaries), adjust size/overlap or add heading-aware splitting. Change one lever, note it in a changelog.
Re-run, compare, keep or revert. Same set, new scores, side by side. Retrieval hit rate up, faithfulness flat, refusals intact? Keep. Anything regressed — including the refusal set, which quietly breaks when you widen retrieval — revert and try the next lever. Each accepted change gets one changelog line: date, change, score before/after. That log is your evidence when someone asks whether the bot is actually getting better, and your map of which levers move your system.
Golden sets are built from real tickets and searches — they inherit real names, systems and occasionally sensitive request details, so sanitize questions before committing the set anywhere widely readable, and grade with tenant-approved AI tools, not public chat.
Real questions, verified answers, failures classified as retrieval vs generation vs content, one lever changed, re-measured — that loop is retrieval-quality engineering, it works identically on your local build and your vendor's black box, and it is the only alternative to "the bot seems better".