Skip to main content

Build a retrieval evaluation set

Status: Ready

Article ID: 079

Truth label: Design

Audience: Retrieval engineer and reviewer

Reader outcome: Measure recall, precision, stale injection, and scope leakage.

Related articles: 072, 075, 077

Target week: 32

Last verified: 2026-09-13

Technical reviewer: Codex source audit

Editorial reviewer: Codex editorial audit

Define representative queries​

Sample exact identifiers, paraphrases, ambiguous terms, recent decisions, superseded history, and no-answer cases. Include each record type and realistic project phases rather than only easy known-item searches.

Label expected evidence​

For every query, record relevant source IDs, acceptable alternates, prohibited stale records, permitted scope, and the reason. Review labels with someone who understands the repository history.

Measure more than relevance​

Track recall at a chosen result count, precision, rank, provenance accuracy, freshness, exact-only behavior, semantic degradation, stale injection, and cross-scope leakage. A no-answer query should reward abstention.

Run negative tests​

Delete or supersede a source and confirm it disappears. Disable embeddings and confirm exact search still works with an explicit degradation signal. Use two synthetic client scopes and prove that prohibited records never return.

Current limits​

This is the target evaluation design, not proof that every current path is isolated. A test set can overfit, labels can be wrong, and aggregate relevance can hide one severe privacy failure. Any scope leak is a blocking result.

Next lesson​

Continue with Why automatic knowledge promotion waits.

Derivative map​

  • Weekly package: WEEK-32
  • Long video: VIDEO-W32-LONG
  • Shorts: SHORT-W32-PROBLEM, SHORT-W32-MECHANISM, SHORT-W32-WARNING
  • Email: EMAIL-W32
  • LinkedIn: LI-W32-A, LI-W32-B
  • X: X-W32-A, X-W32-B
  • Visual: VISUAL-W32

Review record​

  • Query, label, relevance, freshness, degradation, and scope dimensions included.
  • Negative and no-answer cases are first-class tests.
  • Design label is not presented as current evaluation coverage.
  • Aggregate quality cannot waive one privacy failure.

Review completed: 2026-08-27

Re-audited against the running product: 2026-09-13