Skip to the page

Evaluating LLM apps · core

Golden sets, eval scripts and prompt changes

An eval is a set of test questions with expected facts that runs before every prompt, model or config change. It scores retrieval and answers separately and blocks regressions in critical categories.

The notes

What you must know

  • A golden dataset has real or realistic questions, each with the expected answer or its key facts and the source document. Include easy, hard, multi-document, unanswerable and adversarial questions, in every supported language.
  • Start with 50 to 200 cases and add every production failure. The domain team checks the expected answers. Model-made questions add coverage but need human review.
  • Score retrieval separately (recall@k, MRR) and the answer (key facts, faithfulness, citations, declining when it should, format).
  • Code checks first: valid JSON, cited ids exist, required numbers present, reply language, length. A model judge with a written rubric covers fuzzy qualities.
  • Run evals in CI for every change to a prompt, model or config. Keep prompts versioned and log the prompt version in each response so you can roll back.
  • Handle noise: low temperature, several samples for borderline cases, thresholds with margin, and compare question by question, not only totals.
  • Read results by category. An equal overall score can hide a worse result on refunds or unanswerable questions, and longer answers cost more.
  • A small eval script: load cases, retrieve, answer, normalise text (7 days and seven days), check facts, cache judge calls, limit concurrency, and exit with an error on regressions.

The red pen

Common traps: mistake → fix

  • Mistake: A higher overall pass rate means ship

    Fix: check critical categories, noise and cost first.

  • Mistake: A friendlier prompt cannot break anything

    Fix: a shorter warm prompt made the bot drop the 7-day condition.

  • Mistake: Eval once before launch

    Fix: run on every change.

Easy to hard

Questions interviewers ask, easy to hard

  1. How do you evaluate a RAG bot before launch?
  2. What goes in a golden set and who makes it?
  3. A prompt change broke refund answers. How do you handle it and prevent it?
  4. Build a small eval script.
  5. Prompt B has a higher total but is worse on refunds. Do you ship?

Practise

Practise with these questions

Your first interview is free

Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.

Start your free interview