All Posts
RAGAnswer accuracyEvaluation

How to Measure and Improve Your Chatbot's Answer Accuracy (RAG Quality Playbook)

The 4 metrics that decide whether your AI chatbot answers correctly - context recall, context precision, faithfulness, and answer relevance - plus a practical golden-set workflow.

CChatonn TeamAugust 15, 20265 min read

Your chatbot answered 100 test questions and only missed a handful. Then it went live and answered the same question wrong for three days before anyone noticed. If that sounds familiar, the problem isn't your model - it's that you're measuring accuracy on vibes. You can't improve a number you never computed.

Answer accuracy in a RAG (retrieval-augmented generation) chatbot isn't one score. It's four, split across the two places a system can fail: retrieval (did it find the right content?) and generation (did it use that content correctly?). Here is the evaluation playbook - the metrics, the golden set, and the feedback loop that keeps a bot honest in production.

The four metrics that decide whether your bot is right

Metric What it measures Layer Low score means
Context recall Did retrieval surface the chunk that contains the answer? Retrieval The content existed but wasn't found - a chunking or embedding problem.
Context precision Were the retrieved chunks relevant, or full of noise? Retrieval The right chunk is buried under irrelevant ones, forcing the model to guess.
Faithfulness Does every claim in the answer stay grounded in the retrieved context? Generation The model is inventing facts on top of good retrieval - the classic hallucination.
Answer relevance Does the answer actually address the question asked? Generation Grounded and confident, but answering the wrong question.

These four fail independently, so you have to measure them independently. A bot can be 95% faithful and still useless because it answers the question the customer didn't ask. An aggregate score hides exactly the failure you need to see - which is why you gate each metric separately.

Faithfulness checks whether every claim in the answer is backed by the sources. Relevance checks whether the answer is what the customer asked for.

Step 1: Build a golden set from real questions

The only benchmark that predicts whether your bot works is built from your own corpus and your own customers' questions. A public leaderboard tells you how a model performs on someone else's refund policy - which is worthless to you.

Aim for 100-300 questions, and take them from reality:

  • Pull from support tickets - the questions customers actually type, not the ones you invented to make the demo look good.
  • Cover the distribution - easy lookups, multi-step questions, edge cases, and at least some out-of-scope questions the bot should refuse.
  • Record the ground truth - for each question, the correct answer and the exact chunks that support it. That chunk mapping is what makes recall and faithfulness computable at all.

Version the golden set alongside your knowledge base. When a source document changes, the stale answer becomes a bug in your benchmark, not a mystery drop in your score.

Step 2: Score it, twice

For the bulk of your set, an LLM-as-judge is the practical choice: lock the judge to a single model version and a single prompt - and version both whenever anything changes - then run each question through the pipeline more than once. Gate on a pass rate like four-of-five rather than a single verdict, because the judge itself is non-deterministic.

Then have a human review the tricky cases. Score 20-50 examples with both methods and check the correlation; if it drifts, your judge prompt or model has drifted. The human review is what catches the subtle "technically faithful, completely unhelpful" answers that automated scoring misses.

Step 3: Evaluate continuously, not once

A pre-launch evaluation is a point in time. The moment your bot meets production, three things start drifting: your knowledge base changes, users ask questions you didn't anticipate, and models get updated. That's why the eval loop has to run forever:

  • Re-run the golden set on every meaningful change - a prompt edit, a model swap, a re-chunk, a new document.
  • Sample production traffic - judge a small slice of real conversations on the same four metrics and alert when the rolling average drops.
  • Treat user corrections as signals - every follow-up, every "that's not what I asked", every escalated conversation is a hint about where retrieval or generation is failing.

Feed the corrections back into the knowledge base. A bot that learns from its misses beats a bot that was perfect in March.

Red-team it before you trust it

Standard metrics measure the happy path. Adversarial testing measures the failure path on purpose:

  • Out-of-corpus questions - does it refuse gracefully, or confidently make something up?
  • Prompt injection - can user or retrieved content hijack the bot's instructions?
  • Ambiguous or multi-hop questions - does it stitch a wrong answer from two right passages?
  • False premises - does it agree with a wrong assumption the user asserts?

Most of these are one test run away from being caught. Most teams never run them.

Where to fix what

When a score drops, the fix lives on one of the two layers:

Symptom Likely culprit Fix
Low context recall Retrieval missed the answer Re-chunk, switch embedding model, add a reranker
Low context precision Too much noise retrieved Tighter chunking, better relevance filtering
Low faithfulness Model invents claims Stronger grounding prompt, stricter output constraints
Low answer relevance Right context, wrong answer Better instructions, model swap, or confidence-based handoff

And remember the unglamorous fix: keep the source documents current. A bot with perfect retrieval and generation will still be wrong if the knowledge base still says last year's price. Fresh, owned, up-to-date content is the cheapest accuracy improvement there is.

Accuracy as a process, not a hope

The teams that ship bots customers trust don't rely on a single great model. They measure retrieval and generation separately, gate every change on a golden set, monitor production traffic for drift, and feed corrections back into the knowledge base. That loop - not the model choice - is what turns "it seemed right in the demo" into "it's been right for six months."

Chatonn gives you the pieces to run that loop: RAG answers grounded in your own knowledge sources, answer citations customers can check, confidence-based handoff so the bot never guesses, and multi-LLM routing so you can pair the right model with the right question. Start free at chatonn.com and put your bot through the four metrics before it ever meets a customer.

Share & Cite