Retrieval evaluation
How to measure retrieval quality for an AI support copilot
Use a labeled query set to find whether an AI copilot retrieves the right policy, its exceptions, and the current version.
When a support copilot gives the wrong return window, the model may have followed the wrong evidence faithfully. Inspect what reached the model before changing its instructions. Separating retrieval from answer evaluation helps you tell whether to fix the search index, change how evidence is ranked, or revise how the assistant uses it. Microsoft Foundry’s retrieval and answer evaluators
Label evidence as a support agent would use it
Start with realistic questions from a clearly defined support area. Record the policy version and locale that apply, which excerpts answer the question, and any facts that must remain unknown. Separate a passage that provides the necessary answer from a passage that merely mentions the same topic. An expired document can be a convincing match on wording while being unsafe to use.
Give each example an expected disposition as well. A question can be ready to answer, require a missing detail, or need human review. For a blank search result, ask whether the knowledge base should have contained the answer. Log gaps in the corpus separately from cases where the search missed evidence already present.
Compare two ranked lists on the same question
In a fictional returns desk, a customer asks whether a sealed headset bought through a reseller can be returned. Two current excerpts matter. One gives the return window and the other explains the reseller exception. Both are required to give a complete answer.
- Retriever A returns a general introduction, an expired return guide, and the current return window. One of three results is relevant and one of the two necessary excerpts is present.
- Retriever B returns the current window, the reseller exception, and the expired guide. Two of three results are relevant and both necessary excerpts are present.
At a cutoff of three, precision rises from one-third to two-thirds. Recall over the two labeled excerpts rises from one-half to one. Neither number tells you whether the assistant noticed the expired result or applied the exception correctly. That takes a separate answer-level check. NIST TREC retrieval measures
Look at rank, freshness, and missing pieces
When the answer can fit in one excerpt, track how often the necessary passage is among the first few results. For questions with an exception, measure whether the complete set reaches the model. Record an outdated policy at the top as a distinct failure, even if the current version also appears. With graded labels, a ranking metric such as discounted cumulative gain can give strong matches more weight when they appear earlier. Azure Databricks documentation on graded retrieval metrics
Compare results by query type, locale, and policy age. An improvement on common one-step questions can hide a drop on questions about eligibility or exceptions. Keep a small set of realistic contradictions to check whether retrieval preserves source version and scope.
Turn the diagnosis into a release decision
Fix the smallest part of the workflow that explains the failure. Missing current content goes to the knowledge owner. A current passage placed below expired copies calls for a ranking or filtering change. Evidence that is present but ignored needs an answer or review change. Re-run the same examples after each change so the team can attribute the effect.
Write a short release note with the query set, retrieval settings, coverage by question type, examples still failing, and the answer-level checks to run next. In the returns example, I’d verify reseller exceptions end to end and require a human review route when the current policy is absent. That gives the support team a concrete reason to trust the behavior and a clear place to intervene.