Hirestack
Hirestack
Chapter 11

RAG Systems · Evaluating RAG and LLM systems

📖 2 min read · 6 sections · May 2026

Why this matters

Without an eval set, every prompt change is vibes-based. With one, you can ship confidently. The teams that win at LLM apps in 2026 are the ones who invested in eval infrastructure before they invested in fancy retrieval.

The eval hierarchy

LevelWhat it isWhen to use
Unit / golden tests30-100 hand-picked Q&A pairs you know the right answer toEvery PR; CI/CD gate
LLM-as-judgeA bigger LLM scores your app's outputs against rubricsContinuous integration on bigger sets
RAGAS metricsFaithfulness, answer relevance, context precision/recallRAG-specific; great for tracking drift
Online samplingScore a % of real production trafficDetecting drift, regressions; not as gate
Human reviewDomain expert grades outputsCalibrating the LLM-as-judge; periodic

RAGAS — the four metrics that matter

RAGAS computes these by using another LLM as judge. Quick to set up, ~$0.05 per question with GPT-4o-mini, good enough for tracking trends.

LLM-as-judge — the gotchas

Your golden set is more valuable than your codebase

Spend a week building 200 examples that represent the actual distribution of user queries: easy, medium, hard, edge cases, adversarial. Freeze it. Every prompt change runs against it. This single artifact decides whether you ship reliably or run on prayers.

War story: team A/B tested two prompts on 10 example queries each. Prompt B "won". Shipped it. Production accuracy dropped 12%. Why? The 10 examples were drawn from a distribution that didn't represent real traffic — they had picked easy ones. Real users sent harder queries that prompt A handled better. The fix wasn't a smarter prompt; it was a better eval set.

Takeaway

You can't improve what you can't measure. Build the eval set before you optimise the prompt. The eval set is the product.