Search & IR · core

Search Evals

Building a labelled query set and harness to compare retrieval approaches.

search-irevaluation

Mental model

You cannot improve retrieval you cannot measure. A search eval is a fixed set of queries with known-good results plus a harness that scores any retriever — it turns ranking changes from vibes into numbers.

How to study Search Evals

Begin by restating the mental model in your own words, then connect it to a concrete system you have built or operated. Name the mechanism, the constraint it addresses, and the trade-off it introduces. Use BEIR: Heterogeneous IR Benchmark to check details, but close the source before writing your explanation. Retrieval is the learning step; rereading is only preparation.

Next, compare Search Evals with BM25, Hybrid Search, LLM Evals, A/B Testing for Engineers. Ask what changes in correctness, latency, resource use, operability, and failure recovery. Complete Build a search eval harness and preserve the command, input, output, and one failed attempt as evidence. Finish by explaining the idea without jargon to someone who has not studied the track.

Proof of understanding

  • Explain the mechanism from first principles and identify the state it reads or changes.
  • Give one situation where the concept is the right choice and one where it is not.
  • Predict a realistic failure mode before running the drill, then compare the prediction with evidence.
  • Connect the result to a roadmap or build artifact instead of treating the concept as isolated trivia.

Where it matters

BEIR benchmark, internal relevance suites at every search company.

Common mistakes

  • Tuning ranking without a frozen eval set
  • Letting the eval set leak into tuning decisions
  • Too few queries to detect real regressions

Learn from primary sources

Practice and explain it back

Build a search eval harness

Create a labelled query set (query → relevant doc ids) and a harness that scores any retriever with recall@k, MRR, and nDCG.

Expected evidence: A single command that prints the three metrics for a retriever.

Open the interactive drill →

Review prompts

  • Why must the eval query set be frozen before tuning?

Build evidence

Search eval harness

A reusable harness that scores any retriever against a labelled query set.

  • At least 15 labelled queries with known-good results
  • Computes recall@k, MRR, and nDCG
  • Can score any retriever via a common interface

Prerequisites

Related concepts

Learning paths