How to Evaluate Agent Retrieval

Manav Agrawal, Lauren Shrack12 Nov 2026

Problem

Glean runs enterprise search and an LLM assistant over customers' private documents. Open retrieval benchmarks lack private diverse indexes, per-user permissions and Glean's signals (visits, authorship, freshness). Search is also a tool the assistant calls, so a ranking change is judged on results, answers, tokens and latency. The same problem applies to any product where an LLM consumes retrieval results, at any scale.

Solution in brief

Build eval sets from usage logs and synthetic question-answer pairs. Run them through production search and chat with offline metrics and LLM judges. Ship in a fixed order: offline evals, live A/B test, monitoring per data source. Top-line metric: recall@K, where K is the number of results the LLM receives (8 to 16). A minimal version: logged clicks and citations as an eval set, recall@K, and one pairwise judge.

Questions this case answers
  • How to evaluate a retrieval system whose consumer is an LLM agent when open benchmarks lack the private corpus, access rules and ranking signals of the product
  • How to build ground truth for retrieval and answer quality from usage logs and synthetic data when no human-labeled set exists and labelers lack domain knowledge
  • How to gate a ranking or context-selection change through offline metrics, judges and a live experiment, and detect regressions after launch
  • How to build eval sets for enterprise search and an AI assistant when public benchmarks do not fit private, permissioned data?

Tools and methods

  • Usage-based eval sets — query mapped to the clicked or cited document or snippet
  • Synthetic eval sets — LLM-generated question-answer pairs from important documents
  • Recall@K, mean average precision (MAP), CR@K — canonical document in the top K, its position, and how much the top K changes (internal measure)
  • LLM and agentic judges — completeness, correctness and citation quality of chat answers
  • Eval orchestrator — loads a set, runs the batch through production runners, computes metrics
  • Live A/B test and monitoring — satisfaction, cost, latency, per-source citation rates
Continue reading — it's free

Google or a one-time email code. No password.