LLM evaluation · Concept
Evaluating a RAG bot before launch
Practise this out loud
Say your answer out loud to an AI interviewer that follows up, and get a score for it.
Practise by voiceThe interviewer asks
You've built a RAG bot for HR policies. Before launch, how do you evaluate it? What does your evaluation set look like, and who makes it?
Then
Follow-ups the interviewer asks next
- How many examples are enough to start?
- Where do questions come from before the product is live?
- Do you score retrieval, the answer, or both?
- Which checks can be plain code, with no model?
- How do you stop the set from going stale?
The answer
What a strong answer covers
- A golden dataset: real or realistic questions (from HR tickets, emails, the HR team), each with the expected answer or its key facts and the source document and section. Include easy, hard, multi-document, unanswerable and adversarial questions (injection, off-topic), in every supported language. Start with 50–200 and grow it from production failures.
- Who: the HR team writes or checks expected answers; engineers add edge cases; questions generated by a model from the documents improve coverage but need human review.
- Score retrieval separately (recall@k, MRR: did the right chunk come back?) and the answer (correct key facts, faithful to the retrieved text, correct citations, declines when it should, right format).
- Code checks first: valid JSON, cited ids exist, required numbers present, reply language matches, length. A model judge with a written rubric for fuzzier qualities. People review a sample.
- Run it on every change (prompt, model, chunking, retriever) and compare with the last run, per category, not only one average.
- Keep it fresh: add every confirmed production failure, version the set, review it when policies change.
The red pen
Common traps
Avoid:"we tested it by hand with ten questions"; one overall score; no unanswerable questions in the set.
Practise this out loud
Say your answer out loud to an AI interviewer that follows up, and get a score for it.
Practise by voicePractise questions like this out loud
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.