Measuring accuracy in a rag bot means more than counting how many replies sound reasonable. Accuracy has to be scored against the buyer’s own source documents, split into three separate metrics: whether vector retrieval surfaced the right source, whether the answer matched that source, and whether unsupported questions were refused correctly. A China-built knowledge bot can be measured the same way whether it is a custom stack or a hosted platform, provided the session logs expose source references and scores. The retainer contract should cover the recurring measurement loop, because accuracy drifts as sources, questions, and models change. This article defines the metrics, the baseline and post-launch measurement process, and how measurement costs belong in the retainer.
What accuracy means for a RAG bot
A RAG answer is accurate only when three conditions hold: the right source was retrieved, the reply follows that source without added facts, and the bot did not answer something the source could not support. A fluent reply that cannot cite a source is not accurate, even if it sounds confident. A reply that matches a general rule but misses a specific condition in the passage is partially accurate at best. Accuracy measurement therefore separates retrieval, grounding, and refusal rather than producing one blended score.
This separation matters because the fixes differ by layer. A retrieval miss is fixed in ingestion, chunking, embedding, or index tuning; a grounding failure means retrieval worked but generation drifted; a refusal error means the threshold or prompt policy needs adjustment. Treating all failures as one “bad answer” category leads to vague prompt tuning that does not repair the actual layer. The measurement plan should classify each failure by its layer, as well as score the answer itself.
Accuracy also has to be distinguished from customer satisfaction. A polite reply can receive a positive reaction even when the answer is wrong, while a terse but correct answer can frustrate a visitor who expected a fuller explanation. Feedback ratings are a useful signal but not a substitute for source-grounded scoring, because they measure tone and helpfulness rather than factual correctness. The measurement plan should keep satisfaction metrics separate from accuracy metrics and review both: a segment with good ratings but weak grounding needs a different fix than one with accurate answers and poor tone.
The three measured metrics and how to score them
Retrieval hit checks whether the expected source document and section appear in the top retrieved results. Score the rank of the expected passage and whether it appears at all, recording hit rate at fixed cutoffs such as top three and top five passages. This metric isolates the vector retrieval layer before judging the model’s wording. A high retrieval hit rate with weak answers points to a generation or grounding problem; a low hit rate points to the index or chunking.
Grounding checks whether the reply matches the retrieved source: facts, numbers, dates, conditions, and product names align, and no unsupported fact or guarantee was added. Score grounded, partially grounded, or unsupported, with the specific mismatch noted where partial. The reviewer compares the reply to the cited passage rather than to general knowledge, so the judgment stays tied to what the bot was allowed to say. Refusal correctness checks unsupported and partially covered questions: a correct refusal with escalation passes, a hedged non-answer scores partially, and a fabricated answer fails.
Each metric should be reported by segment: product, policy, billing, troubleshooting, off-topic. A blended average hides a weak segment, and maintenance effort should follow where failures cluster. Two reviewers score a sample of entries against the rubric, and disagreements are discussed and re-scored, so the measurement is not one person’s subjective impression. The rubric itself should be documented and versioned, so scoring stays consistent across review periods and reviewers.
Building the measurement baseline before launch
The baseline evaluation set is collected from real prior contacts before the build or trial, transcribed as visitors wrote them. Each entry carries the expected source and section, the expected answer outline, the coverage status, and the segment. The set should include covered questions, partially covered questions, and unsupported requests, plus exact-term lookups and conditional rules. A forty-to-sixty-question set per language is a workable shortlist and acceptance baseline; the set grows as new real questions arrive after launch.
Before launch, the bot runs the full set and records baseline scores for each metric and segment. These scores are the reference against which later changes are compared: a source update, a model upgrade, a chunking change, or a prompt revision should not silently lower retrieval hit or grounding. The baseline also identifies the segments that need the most remediation before production, so launch scope can be phased around measured weakness rather than optimism. The retrieval-quality tests that produce this baseline are detailed in retrieval quality tests for RAG vendors.
Measuring after launch: logs, samples, and regression
Post-launch measurement runs on session-level logs: question, retrieved source and score, reply, rating or feedback, escalation flag, and date. Each week or month, reviewers sample escalated sessions, repeated questions, and negative-feedback sessions, classify the failure layer, and add failed questions to the evaluation set. The full regression set runs after each major source or model change, checking that scores hold against the baseline.
Sample size should be stated rather than left to convenience. A monthly review might sample a fixed percentage of escalated and negative-feedback sessions plus a random slice of answered sessions, so the sample does not consist only of the worst cases. Sampling rules should be documented so each review period uses a consistent method, and the evaluated sessions should be tagged with segment, language, and source version. Where volume is low, the review may cover all escalated sessions rather than a sample, and that choice should be noted in the retainer report.
Monitoring should track leading signals before complaints appear: rising repeat questions, growing escalation rate, low retrieval scores on recent sessions, and topics that recur without a covered source. The dashboard should break these signals out by segment and language, not as one blended number. Where the platform only shows aggregate metrics, the buyer must pull session records for manual review, which adds labor the retainer should account for. The freshness workflows that keep source material current alongside this measurement are covered in knowledge bot freshness and update workflows.
Measurement cost inside the retainer contract
The retainer contract should state who runs the measurement, how often, and what evidence is delivered. Included hours might cover monthly log review, a quarterly regression run against the evaluation set, and a report showing metric trends by segment. Per-item rates apply to remediation work beyond the retained hours: source cleanup, chunking or metadata changes, retrieval tuning, and prompt revisions. The agreement should define how scores are reported, who reviews disagreements, and how a failed remediation is tracked to closure.
Buyers should price measurement explicitly rather than assume the platform monitors answer quality. A light FAQ bot may need a monthly sample review; a support or regulated bot needs a structured review cycle with logged findings. The retainer should also cover expanding the evaluation set as new question types appear, because a stagnant test set stops catching real failures. Reviewer time, whether internal or under retainer, should be counted in the budget even where the platform supplies the dashboard, since the scoring judgment itself cannot be automated away.
The cost anatomy beyond the visible subscription is outlined in costs beyond subscription in China-hosted bots, and measurement labor belongs among those lines.
Reading accuracy trends into maintenance decisions
Accuracy trends guide where maintenance goes. A segment with falling retrieval hit rates points to ingestion or chunking drift as documents change; a segment with good retrieval but weak grounding points to prompt or model-side review; repeated refusal errors on covered questions mean the threshold is too strict, while confident answers on unsupported topics mean it is too loose. Quarterly reports should show these trends alongside the remediation items opened and closed, so the buyer can see whether measurement actually leads to fixes.
Measurement should also feed scope decisions. A topic with no covered source and repeated questions signals a source gap for the content owner, not a bot tuning problem. Persistent weak accuracy in a segment may mean the bot should hand that topic to a human channel rather than keep trying to answer it. The final accuracy position should be reviewed against the baseline and the buyer’s tolerance per segment, not against a global target borrowed from a general benchmark. A China-built bot that produces source-traceable logs, measured metrics, and a retainer-funded review loop gives the buyer accuracy that can be verified and maintained over the contract term.
Buyers should also verify that measurement survives a vendor change. The evaluation set, scoring rubric, baseline scores, and session logs should be exportable assets the buyer holds, not records locked inside the builder’s panel. If the bot moves to another builder, the same question set and expected answers carry over, so accuracy can be compared across the transition rather than measured fresh from zero. This portability of the measurement set is part of the handover checklist, and it should be confirmed in the contract alongside code and configuration ownership. Without it, a buyer can run an accurate review loop for years and still lose the benchmark record at exit.
Leave a Reply