Build a repeatable benchmark harness that measures retrieval accuracy. Run it against semantic-only, lexical-only, and hybrid strategies. Produce a comparison table that proves hybrid is better (or shows where it isn't).
## Design
**Test fixture format:**
```yaml
# fixtures/search_queries.yaml
queries:
- id:q1
text:"How do I fix kubernetes port 8080 conflict?"
1. Create `fixtures/search_queries.yaml` with ≥ 20 queries across categories.
2. Ingest corresponding test documents into both stores.
3. Implement `BenchmarkRunner` that:
a. Loads fixture file.
b. Runs each query against each strategy.
c. Computes NDCG, MRR, Precision, Recall per query.
d. Averages across queries.
e. Writes results to markdown.
4. Implement as CLI command: `cargo run -- bench-search --queries <path> --output <path>`.
5. Run benchmarks. Record results.
## Acceptance
1. Benchmark runs to completion on 20+ queries × 3 strategies = 60+ query executions.
2. Output markdown table has all 5 columns populated.
3. Hybrid NDCG@10 ≥ max(semantic NDCG, lexical NDCG) — hybrid must not be worse than best single engine.
4. Per-query results show which categories benefit most from hybrid (expected: troubleshooting, procedural).
5. If hybrid is worse on any category, document why and whether it matters.
## Verify
```bash
cargo run -- bench-search \
--queries fixtures/search_queries.yaml \
--output docs/BENCHMARK_RESULTS.md
cat docs/BENCHMARK_RESULTS.md
```
**False pass:** Benchmark uses the same documents for queries and ground truth (trivial exact match). Ensure queries use **natural language** and ground truth docs use **technical content** — the match should be semantic, not string equality.