Retrieval Evaluation
Prove which documents are found for which authorised searchers before interpreting answer quality. An improved average rank cannot excuse one access leak.
Designing the pipeline being measured (chunking, hybrid search, reranking, permission filtering) belongs to rag-design; this skill judges whether a change to it helped.
Workflow
- Write the decision and minimum meaningful gain before tuning. Freeze a versioned query set, corpus/index snapshot, document and chunk identities, access-control principal/tenant context and relevance labels with provenance. Partition development and sealed holdout by query family or source to prevent near-duplicate contamination; do not inspect holdout results during tuning.
- Define the relevance unit (document or chunk), how multiple chunks of one document count, cutoff
k, grading scheme and query-level aggregation. Record which queries have zero relevant documents and score them separately for inappropriate returns/abstention rather than silently dropping them from denominators. Record unjudged results explicitly: judge them blind to system identity or use a predeclared exclusion policy applied equally to both systems; never treat unknown as relevant.
- Run baseline and candidate on identical queries, corpus, ACLs and time-bound configuration. Keep per-query paired ranks and retrieval latency. Report eligible query denominator, judged coverage, recall@k and ranking metric (for example MRR or nDCG with declared grading), plus slices for rare terms, fresh content, tenants and zero-relevant queries. Show paired regressions alongside aggregate gains.
- Test unauthorized documents and snippets separately for every principal, including absent/stale ACL data and cross-tenant cases. Any exposure vetoes promotion regardless of relevance. Check both retrieval and downstream display paths; verify platform-specific filtering and caching semantics before trusting a claimed guard.
- If an answer generator is involved, score cited support, answer correctness and abstention on a separate sheet with the same frozen evidence; do not relabel an answer improvement as recall. Run the sealed holdout once after tuning ends, record version hashes and compare to prewritten gates. If labels, coverage or sample size cannot support a decision, return insufficient evidence, not a win.
Output
Produce a benchmark card: frozen inputs and hashes, identity/ACL policy, label rubric, metric formulas and denominators, paired per-query deltas and slices, leak veto, separate answer sheet if applicable, holdout access log and promote/hold decision.
Anti-patterns
Tuning on the test queries. A repeatedly inspected holdout becomes development data; seal a fresh one rather than calling the next run independent.
1---2name: retrieval-evaluation3description: "Evaluate a retriever or search ranking change against a reproducible, access-safe benchmark rather than a few impressive answers. Use for a frozen retrieval benchmark, a paired baseline-versus-candidate comparison, scoring a chunking or reranker change, recall regressions, relevance-label design, a sealed holdout, or promoting a new index. Freeze queries, corpus snapshot, ACL context and relevance judgements; compare on paired inputs with explicit units, denominators and unjudged policies; keep answer grounding and abstention separate from retrieval scores. Treat any cross-tenant or unauthorized result as an independent veto, and stop when the evidence cannot distinguish improvement from noise. Not for grading an agent's tool use or conversation (agent-evaluation), or for designing the pipeline: chunking, hybrid search, reranking, permission filtering (rag-design)."4allowed-tools: "Read, Grep, Glob"5metadata:6 source: https://skillmd.com/skills/greenblacked/retrieval-evaluation7---89# Retrieval Evaluation1011Prove which documents are found for which authorised searchers before interpreting answer quality. An improved average rank cannot excuse one access leak.1213Designing the pipeline being measured (chunking, hybrid search, reranking, permission filtering) belongs to `rag-design`; this skill judges whether a change to it helped.1415## Workflow16171. Write the decision and minimum meaningful gain before tuning. Freeze a versioned query set, corpus/index snapshot, document and chunk identities, access-control principal/tenant context and relevance labels with provenance. Partition development and sealed holdout by query family or source to prevent near-duplicate contamination; do not inspect holdout results during tuning.182. Define the relevance unit (document or chunk), how multiple chunks of one document count, cutoff `k`, grading scheme and query-level aggregation. Record which queries have zero relevant documents and score them separately for inappropriate returns/abstention rather than silently dropping them from denominators. Record unjudged results explicitly: judge them blind to system identity or use a predeclared exclusion policy applied equally to both systems; never treat unknown as relevant.193. Run baseline and candidate on identical queries, corpus, ACLs and time-bound configuration. Keep per-query paired ranks and retrieval latency. Report eligible query denominator, judged coverage, recall@k and ranking metric (for example MRR or nDCG with declared grading), plus slices for rare terms, fresh content, tenants and zero-relevant queries. Show paired regressions alongside aggregate gains.204. Test unauthorized documents and snippets separately for every principal, including absent/stale ACL data and cross-tenant cases. Any exposure vetoes promotion regardless of relevance. Check both retrieval and downstream display paths; verify platform-specific filtering and caching semantics before trusting a claimed guard.215. If an answer generator is involved, score cited support, answer correctness and abstention on a separate sheet with the same frozen evidence; do not relabel an answer improvement as recall. Run the sealed holdout once after tuning ends, record version hashes and compare to prewritten gates. If labels, coverage or sample size cannot support a decision, return insufficient evidence, not a win.2223## Output2425Produce a benchmark card: frozen inputs and hashes, identity/ACL policy, label rubric, metric formulas and denominators, paired per-query deltas and slices, leak veto, separate answer sheet if applicable, holdout access log and promote/hold decision.2627## Anti-patterns2829**Tuning on the test queries.** A repeatedly inspected holdout becomes development data; seal a fresh one rather than calling the next run independent.