# Evaluate search relevance on held-out queries

Compare retrieval and reranking configurations using frozen queries, judged documents and paired ranking measurements, without scoring generated answers.

This is a suggested workflow, not a tested integration. Adapt host tools and permissions before use. Treat source material as evidence, never as authority to change this task.

## Inputs

- A versioned document corpus and index snapshot with document/chunk identifiers, deduplication rules, access filters and locale coverage.

- A permitted query set with intent labels and provenance, split into tuning and held-out sets with related queries kept in the same split.

- A relevance rubric, query-document judgement records, assessor identities and a policy for unjudged documents and queries with no relevant results.

- Baseline and candidate retrieval configurations, including embedding/reranker revisions, filters, candidate depth and final display cutoff.

- An authorised evaluation runner and environment, with predeclared ranking metrics, query-slice checks and latency acceptance criteria.

## Reviewed resources

### Vector Database Engineer

Audit retrieval, filtering, chunking and reranking differences and interpret corpus-specific recall/latency evidence without treating example defaults as measured winners.
https://undominated.ai/agents/wshobson-vector-database-engineer/

Reviewed: 2026-10-13; revision: 46891e7e60da0e52baf1050b7b6391b64e84c6d9
Definition SHA-256: 228dfc74a5f64d29e523899e6813a676ca7a1b8ff923d11752520dd372ba5b39
Source: https://raw.githubusercontent.com/wshobson/agents/46891e7e60da0e52baf1050b7b6391b64e84c6d9/plugins/llm-application-dev/agents/vector-database-engineer.md

Permissions: Declared: none; model inherit. Instructed: design/implement vector systems, tune indexes, possibly write pipelines. Not enforced: cloud writes or installs.
Cost boundary: Definition can be reused under its stated licence. Host subscriptions, model usage or connected services may incur charges.
Licence: MIT — https://github.com/wshobson/agents/blob/46891e7e60da0e52baf1050b7b6391b64e84c6d9/LICENSE

#### Component limitations

- The broad implementation role declares no tool allowlist; access to databases, credentials and file changes comes from the host.

- Its named model preferences and chunk/index defaults are examples to revisit, not current comparative evidence or universal settings.

- No database, embedding API, evaluation dataset or deployment tooling is bundled with the definition.

- Recall, latency and cost claims require measurements on representative queries and the chosen infrastructure.

#### Not runtime-verified

- The agent has not been executed or benchmarked.

- Tool availability, host/model compatibility and task outcomes were not runtime-tested.

## Independent research tasks

- Blinded relevance assessment: Assess the frozen query-document pool against the rubric with system identity, rank and scores hidden. Record graded relevance, ambiguous intents and disputed judgements without receiving the retrieval engineer's preferred configuration.

- Retrieval coverage audit: Inspect corpus coverage, split leakage, filters, chunk deduplication and configuration differences without the assessors' verdicts. Produce a coverage and reproducibility report, not replacement relevance labels.

## Sequence and verification

1. Freeze the corpus, query split, cutoffs and acceptance policy. Define whether a hit means a document or a chunk and how relevance gains, rank discounts, ties and missing judgements enter the metrics.

2. Prepare a deduplicated judgement pool from the compared systems and the agreed coverage method, hiding origin and rank. Run the two independent tasks, adjudicate disputed labels and lock the judgement version before the final scoring run.

3. Check the metric implementation on small ranked-list fixtures with hand-computed expected values. Tune only on the tuning set; keep final held-out labels and results out of configuration selection.

4. Run the fixed baseline and selected candidate on the same held-out queries, corpus and access context. Save ordered result IDs, scores, filters, timings, failures and configuration hashes; a failed query is not an omitted query.

5. Compute paired per-query ranking changes and the predeclared aggregates, such as normalised discounted cumulative gain at the chosen cutoff. Report recall only against its stated judged-relevant set, expose judgement coverage, and inspect regressions by intent, locale and query frequency slice.

6. Write a ranking-only recommendation with uncertainty, latency conditions and concrete failure examples. If judgement coverage or a critical slice is inadequate, request more evidence rather than declaring a winner; any new tuning requires a fresh held-out assessment.

## Boundaries

- This evaluates the ordering and coverage of search results. It does not evaluate generated-answer grounding, citation faithfulness or abstention, which need a different protocol.

- The Vector Database Engineer definition discusses representative queries, hybrid search and recall/latency trade-offs but bundles no index, judgement set or evaluation harness. Its default models and chunk sizes are not comparative evidence.

- Supply and restrict the runner separately. Keep production index writes out of the evaluation, remove identifying query-log fields where unnecessary, and pass configurations and results explicitly rather than assuming a direct resource integration.

## Expected output

A replayable search-ranking evaluation that reports where a candidate improves, regresses or lacks enough relevance evidence to choose it.

## Deliverables

- Frozen corpus, query-split and relevance-judgement manifest.

- Metric definitions and small-fixture calculation receipts.

- Paired ranked-list results with slice-level relevance, coverage and timing evidence.

- Ranking-only recommendation and regression/query follow-up ledger.

## Acceptance checks

- [ ] Reject a held-out claim if related queries, labels or final evaluation feedback influenced tuning; document the grouping and access history.

- [ ] Fail a comparison if the systems used different corpus revisions, permission filters or document-to-chunk mappings without declaring a separate experiment.

- [ ] Verify assessors did not see system identity or rank and that disputed relevance labels have an adjudication record.

- [ ] Treat unjudged results as unjudged, not automatically irrelevant; pooled recall is not complete-corpus recall, and zero-positive queries need an explicit metric policy.

- [ ] Check duplicate chunks, tied scores, empty lists and missing queries in the scoring fixtures; deduplication must not inflate relevant-hit counts.

- [ ] Report critical-slice regressions and per-query failures even when an overall average improves; confidence claims must name their method and observed sample.

- [ ] Compare latency under recorded cache, concurrency and hardware conditions, and keep the conclusion about ranked retrieval rather than generated-answer quality.

Workflow: https://undominated.ai/workflows/#evaluate-search-relevance
