Search quality: blind graded-relevance evaluation of search, vsearch and query across the open performance PRs
[!NOTE] AI disclosure: an AI agent (Claude) ran the benchmarks and the relevance judging and wrote the analysis and summaries in this issue; I reviewed and approved it before posting. It's written for both human and AI readers.
This issue covers how search result quality was measured across the open search-performance PRs and what the measurements show. The overview of those PRs and the recommended merge order are in #1013.
Summary
- #936 and #983 don't change result quality.
querynDCG@10 is 0.844 on #936 and 0.844 on #983 against 0.845 on main (difference [-0.001, +0.005] at 95%, p = 1.0), and the judges rated their result lists the same as main's. - #962 lowers result quality. The judges rated 11 of its 38
queryresult lists as failing (mostly or entirely irrelevant), against 1 of 38 on main. nDCG@10 falls from 0.845 to 0.525 through the SDK and to 0.505 as the CLI runs it (Holm p < 0.001). - Two changes account for it. The keyword shortcut skipped query expansion and vector search on 17 of 19 queries, and on those nDCG@10 is 0.51 against main's 0.86. Top-3 chunk scoring takes
vsearchfrom 0.76 to 0.57. Turning rerank back on recovers +0.051. - How sure: the nDCG@10 differences hold at p < 0.001 after Holm correction across 14 comparisons. The usefulness difference is p = 0.006 before correction and p = 0.055 after it. Two judges from different model families agree at κ = 0.84.
qmd benchon the same known items, with no judge involved, points the same way but isn't significant on its own (p = 0.078).
qmd query on |
nDCG@10 | known item in top 3 | lists rated failing |
|---|---|---|---|
| main | 0.845 | 79% | 1 of 38 |
| #936 | 0.844 | 84% | 1 of 38 |
| #983 | 0.844 | 74% | 1 of 38 |
| #962 (SDK and MCP default) | 0.525 | 58% | 11 of 38 |
| #962 (CLI) | 0.505 | 58% | 11 of 38 |
Failing lists are judge ratings of 1 or 2 on a 1–5 usefulness scale (38 per system: 19 queries, two judges). The CLI row applies what qmd query does on #962; details in the collapsed sections.
| System | nDCG@10 | known item in top 3 | median usefulness (1-5) | lists rated useful (4-5) | lists rated failing (1-2) |
|---|---|---|---|---|---|
query main |
0.845 | 79% | 5 | 34 of 38 | 1 of 38 |
query #936 |
0.844 | 84% | 5 | 34 of 38 | 1 of 38 |
query #983 |
0.844 | 74% | 5 | 34 of 38 | 1 of 38 |
vsearch main |
0.764 | 89% | 4 | 34 of 38 | 0 of 38 |
vsearch #936 |
0.767 | 89% | 4 | 34 of 38 | 0 of 38 |
vsearch #983 |
0.767 | 89% | 4 | 34 of 38 | 0 of 38 |
vsearch #962 + #936 |
0.669 | 74% | 4 | 29 of 38 | 2 of 38 |
vsearch #962 + #983 |
0.590 | 79% | 4 | 22 of 38 | 0 of 38 |
vsearch #962 |
0.568 | 74% | 4 | 23 of 38 | 4 of 38 |
query #962 :rerank |
0.576 | 63% | 4 | 23 of 38 | 8 of 38 |
query #962 + #936 :rerank |
0.570 | 68% | 4 | 21 of 38 | 9 of 38 |
query #962 + #983 :rerank |
0.569 | 63% | 4 | 23 of 38 | 9 of 38 |
query #962 (SDK default) |
0.525 | 58% | 3 | 18 of 38 | 11 of 38 |
query #962 + #936 (SDK default) |
0.531 | 58% | 3 | 16 of 38 | 10 of 38 |
query #962 + #983 (SDK default) |
0.512 | 58% | 3 | 16 of 38 | 11 of 38 |
query #962 (CLI, derived) |
0.505 | 58% | 4.5 | 23 of 38 | 11 of 38 |
search (identical on the five builds it ran on) |
0.440 | 53% | 4 | 21 of 38 | 13 of 38 |
Top 10 per system over the 13 collections searched by default; 19 queries, two judges each, so 38 list ratings per system. Each build runs query at its default (rerank on for main, #936 and #983; off for #962). :rerank rows turn it back on for the #962 builds, which only SDK and MCP callers can do. The CLI row applies what qmd query does on #962: it never runs the centroid step and can't turn rerank back on, so where the shortcut fires its list is the search list, which the judges graded. On the 2 queries where the shortcut doesn't fire, the SDK list stands in.
nDCG@10 by query category:
| System | technical (8) | blended (6) | non-technical (5) |
|---|---|---|---|
query main |
0.90 | 0.80 | 0.81 |
query #936 |
0.90 | 0.80 | 0.81 |
query #983 |
0.90 | 0.80 | 0.81 |
vsearch main |
0.78 | 0.71 | 0.80 |
vsearch #936 |
0.78 | 0.72 | 0.80 |
vsearch #983 |
0.78 | 0.72 | 0.80 |
vsearch #962 + #936 |
0.72 | 0.59 | 0.68 |
vsearch #962 + #983 |
0.60 | 0.55 | 0.62 |
vsearch #962 |
0.61 | 0.43 | 0.67 |
query #962 :rerank |
0.78 | 0.36 | 0.51 |
query #962 + #936 :rerank |
0.79 | 0.36 | 0.48 |
query #962 + #983 :rerank |
0.78 | 0.34 | 0.51 |
query #962 (SDK default) |
0.73 | 0.32 | 0.45 |
query #962 + #936 (SDK default) |
0.74 | 0.33 | 0.44 |
query #962 + #983 (SDK default) |
0.72 | 0.29 | 0.44 |
query #962 (CLI, derived) |
0.74 | 0.26 | 0.42 |
search (identical on the five builds it ran on) |
0.64 | 0.26 | 0.34 |
Full metrics
| System | nDCG@10 mean | median | worst query | P@5 | MRR | known item @1 / @3 / @10 | usefulness mean | near-duplicates | judged best / worst |
|---|---|---|---|---|---|---|---|---|---|
query main |
0.845 | 0.88 | 0.59 | 0.45 | 0.95 | 68% / 79% / 84% | 4.47 | 66% | 21 / 1 |
query #936 |
0.844 | 0.88 | 0.59 | 0.45 | 0.95 | 74% / 84% / 89% | 4.47 | 66% | 20 / 1 |
query #983 |
0.844 | 0.88 | 0.59 | 0.45 | 0.95 | 63% / 74% / 84% | 4.47 | 66% | 20 / 1 |
vsearch main |
0.764 | 0.75 | 0.63 | 0.43 | 0.95 | 63% / 89% / 100% | 4.37 | 47% | 6 / 0 |
vsearch #936 |
0.767 | 0.76 | 0.63 | 0.43 | 0.95 | 68% / 89% / 100% | 4.37 | 47% | 6 / 0 |
vsearch #983 |
0.767 | 0.76 | 0.63 | 0.43 | 0.95 | 58% / 89% / 100% | 4.37 | 47% | 6 / 0 |
vsearch #962 + #936 |
0.669 | 0.70 | 0.36 | 0.37 | 0.83 | 47% / 74% / 84% | 3.87 | 34% | 0 / 6 |
vsearch #962 + #983 |
0.590 | 0.61 | 0.22 | 0.32 | 0.84 | 47% / 79% / 89% | 3.76 | 34% | 4 / 10 |
vsearch #962 |
0.568 | 0.61 | 0.00 | 0.32 | 0.75 | 37% / 74% / 79% | 3.50 | 37% | 2 / 15 |
query #962 :rerank |
0.576 | 0.67 | 0.00 | 0.33 | 0.76 | 53% / 63% / 68% | 3.53 | 45% | 6 / 11 |
query #962 + #936 :rerank |
0.570 | 0.64 | 0.00 | 0.33 | 0.74 | 58% / 68% / 68% | 3.45 | 37% | 6 / 15 |
query #962 + #983 :rerank |
0.569 | 0.67 | 0.00 | 0.33 | 0.76 | 53% / 63% / 68% | 3.53 | 45% | 6 / 13 |
query #962 (SDK default) |
0.525 | 0.59 | 0.00 | 0.28 | 0.74 | 53% / 58% / 58% | 3.32 | 45% | 4 / 17 |
query #962 + #936 (SDK default) |
0.531 | 0.60 | 0.00 | 0.28 | 0.72 | 58% / 58% / 58% | 3.26 | 37% | 4 / 18 |
query #962 + #983 (SDK default) |
0.512 | 0.54 | 0.00 | 0.28 | 0.74 | 53% / 58% / 58% | 3.24 | 45% | 4 / 21 |
query #962 (CLI, derived) |
0.505 | 0.49 | 0.00 | 0.31 | 0.74 | 53% / 58% / 58% | 3.68 | 32% | n/a |
search (identical on the five builds it ran on) |
0.440 | 0.48 | 0.00 | 0.26 | 0.68 | 53% / 53% / 53% | 3.42 | 24% | 8 / 14 |
Usefulness is rated 1–5 per list (5: need met at the very top; 1: nothing useful); "useful" counts ratings of 4 or 5 and "failing" ratings of 1 or 2. Near-duplicates counts lists the judges rated redundancy 1 or 2.
What drives the #962 result- Keyword shortcut in
hybridQuery.hasDecentFts(topScore >= 0.70) skipsexpandQueryand the vector lists. It fired on 17 of 19 queries. 7 of those return the BM25 list unchanged. On the other 10, SDK and MCP callers get one centroidsearchVecseeded from the keyword winners fused in, which the judges found pulls in generic boilerplate and saved clips; the CLI passesexpandCentroid: falseand returns the BM25 list. The normalized BM25 top score clears 0.70 even when the top hit is poor (one query scored 0.00 on this path), so it doesn't identify a decisive keyword ranking on this corpus. - Top-3 chunk scoring in
searchVec. Scoring a file as s₀ + 0.25·s₁ + 0.1·s₂ over its best non-overlapping chunks lifts long documents with many moderate matches above short exact answers.vsearchis worse on 18 of 19 queries. This path runs whether or not the shortcut fires. - Rerank off by default. About 0.05 nDCG@10 within #962 (12 queries improve with rerank on, 7 tie, 0 get worse). The CLI's
--no-rerankdefaults to true and can't be negated. Rerank-off wasn't measured on main. - Merged with #936 or #983,
queryquality matches #962 alone (0.531 and 0.512), so the loss doesn't depend on the vector layout.
- Design. 19 queries × 20 systems, paired by query. Relevance is graded 0–3 on the pooled top 10s by two independent LLM judges per query, Claude Opus 5.5 and Claude Sonnet 5, blind to system, build and mode. nDCG@10 uses linear gain on the mean grade, normalized by the pool's ideal ranking. Known-item metrics use a target document chosen before any search ran, with no judge involved.
- Tests. Exact paired randomization test over all 2¹⁹ sign flips, Holm–Bonferroni across the 14 comparisons in the significance table, 20,000-resample bootstrap CIs, and a Wilcoxon signed-rank test as a check.
- Main results.
querymain vs #962: +0.32 nDCG@10, 95% CI [+0.20, +0.44], Holm p < 0.001, 16 of 19 queries favour main.vsearch: +0.20 [+0.12, +0.29], Holm p < 0.001, 18 of 19. main vs #936 and main vs #983: +0.001 [-0.001, +0.005], p = 1.0. - Reliability. 643 documents graded by both judges: quadratic-weighted κ = 0.84, 78% exact agreement, 99% within one grade. The system ranking from either judge alone correlates at Spearman ρ = 0.98.
- Judge-free check. The known item lands in the top 3 on 79% of queries for main's
queryand 58% for #962's.qmd benchpoints the same way (MRR 0.80 vs 0.58) but isn't significant on its own (p = 0.078): with one target per query, 10 of 19 queries tie. - Limits. The 19 queries were written around known items in one private corpus rather than sampled, so the p-values hold for this query set, not for corpora in general. Judge grades are treated as fixed. Pooling can't credit relevant documents no system returned. The comparisons follow from the design but weren't pre-registered.
Significance tests
| Metric | Comparison (A vs B) | A | B | A - B | 95% bootstrap CI | queries A better / tied / B better | randomization p | Holm p | Wilcoxon p |
|---|---|---|---|---|---|---|---|---|---|
| nDCG@10 | query main vs #962 (default) |
0.845 | 0.525 | +0.321 | [+0.203, +0.441] | 16 / 0 / 3 | < 0.001 | < 0.001 | < 0.001 |
| nDCG@10 | query main vs #962 :rerank |
0.845 | 0.576 | +0.270 | [+0.146, +0.400] | 16 / 0 / 3 | < 0.001 | 0.004 | < 0.001 |
| nDCG@10 | vsearch main vs #962 |
0.764 | 0.568 | +0.197 | [+0.116, +0.291] | 18 / 0 / 1 | < 0.001 | < 0.001 | < 0.001 |
| nDCG@10 | query #962 :rerank vs #962 (default) |
0.576 | 0.525 | +0.051 | [+0.023, +0.085] | 12 / 7 / 0 | < 0.001 | 0.005 | < 0.001 |
| nDCG@10 | query main vs #983 |
0.845 | 0.844 | +0.001 | [-0.001, +0.005] | 2 / 16 / 1 | 0.750 | 1.000 | 0.750 |
| nDCG@10 | vsearch main vs #983 |
0.764 | 0.767 | -0.003 | [-0.008, +0.000] | 0 / 18 / 1 | 1.000 | 1.000 | 1.000 |
| nDCG@10 | query main vs #936 |
0.845 | 0.844 | +0.001 | [-0.001, +0.005] | 2 / 16 / 1 | 0.750 | 1.000 | 0.750 |
| nDCG@10 | vsearch main vs #936 |
0.764 | 0.767 | -0.003 | [-0.008, +0.000] | 0 / 18 / 1 | 1.000 | 1.000 | 1.000 |
| nDCG@10 | query main vs search |
0.845 | 0.440 | +0.405 | [+0.281, +0.528] | 17 / 0 / 2 | < 0.001 | < 0.001 | < 0.001 |
| usefulness (1-5) | query main vs #962 (default) |
4.474 | 3.316 | +1.158 | [+0.474, +1.842] | 14 / 1 / 4 | 0.006 | 0.055 | 0.006 |
| usefulness (1-5) | query main vs #983 |
4.474 | 4.474 | +0.000 | [+0.000, +0.000] | 0 / 19 / 0 | 1.000 | 1.000 | 1.000 |
| usefulness (1-5) | query main vs #936 |
4.474 | 4.474 | +0.000 | [+0.000, +0.000] | 0 / 19 / 0 | 1.000 | 1.000 | 1.000 |
qmd bench MRR |
full scoped, main vs #962 |
0.797 | 0.578 | +0.219 | [+0.026, +0.421] | 7 / 10 / 2 | 0.078 | 0.625 | 0.066 |
qmd bench MRR |
full scoped, main vs #983 |
0.797 | 0.771 | +0.026 | [+0.000, +0.079] | 1 / 18 / 0 | 1.000 | 1.000 | 1.000 |
qmd bench or wiki-bench, and the qmd bench cross-checkqmd bench(#470) scores against pre-declaredexpected_files. That measures known-item retrieval, and I ran it on every build (collapsed below). It can't judge documents nobody listed, so it can't tell whether a change that returns different documents found better alternatives or noise: the expected file followed by nine irrelevant results scores the same as the expected file followed by nine useful ones. That's the question #962's changes raise.- wiki-bench (#845) needs a corpus I don't have, and it's a single collection, so it doesn't exercise collection-scoped search on a large mixed index, where #936 and #983 differ from main.
qmd benchsearches one collection or all of them. It can't express the default scope thatqmd queryuses day to day.- wiki-bench deliberately avoids LLM judges, and this evaluation depends on them, which is why it reports judge agreement and carries the judge-free known-item and
qmd benchnumbers as a check.
qmd bench cross-check (unmodified)
Same 19 known items, in qmd bench fixture format, run with each build's own unmodified qmd bench --json on main, #936, #983, #962, #962 + #936 and #962 + #983 (expected_files holds the known item; type is the bench type in the query-set table; expected_in_top_k is 1 for exact and alias, 3 otherwise). CPU only (QMD_FORCE_CPU=1), an empty config directory, and INDEX_PATH pointing at the build's index copy. Expansions and rerank scores are shared between the two index copies through llm_cache, so every build sees the same model output. Latency is left out: CPU-only runs in parallel lanes don't measure it.
qmd bench takes one collection or none, so it ran two ways:
- scoped: one fixture per collection that holds a known item, run with
-c(6 runs per build). - unscoped: the whole fixture with no
-c, which searches every collection, including the large one excluded by default.
Each cell is MRR (R@1 / R@3 / R@5).
Scoped
| Backend | main | #936 | #983 | #962 | #962 + #936 | #962 + #983 |
|---|---|---|---|---|---|---|
bm25 (search) |
0.53 (0.53 / 0.53 / 0.53) | 0.53 (0.53 / 0.53 / 0.53) | 0.53 (0.53 / 0.53 / 0.53) | 0.53 (0.53 / 0.53 / 0.53) | 0.53 (0.53 / 0.53 / 0.53) | 0.53 (0.53 / 0.53 / 0.53) |
vector (one query embedding, no expansion) |
0.83 (0.74 / 0.89 / 0.95) | 0.83 (0.74 / 0.89 / 0.95) | 0.80 (0.68 / 0.89 / 0.95) | 0.75 (0.63 / 0.84 / 0.95) | 0.73 (0.63 / 0.74 / 0.95) | 0.73 (0.63 / 0.74 / 0.95) |
hybrid (query, rerank off) |
0.80 (0.68 / 0.89 / 0.95) | 0.82 (0.68 / 0.89 / 1.00) | 0.76 (0.63 / 0.84 / 0.95) | 0.57 (0.53 / 0.58 / 0.58) | 0.54 (0.47 / 0.58 / 0.63) | 0.56 (0.53 / 0.58 / 0.58) |
full (query, rerank on) |
0.80 (0.68 / 0.89 / 0.89) | 0.80 (0.68 / 0.89 / 0.89) | 0.77 (0.63 / 0.89 / 0.89) | 0.58 (0.53 / 0.63 / 0.63) | 0.55 (0.47 / 0.63 / 0.63) | 0.58 (0.53 / 0.63 / 0.63) |
Unscoped
| Backend | main | #936 | #983 | #962 | #962 + #936 | #962 + #983 |
|---|---|---|---|---|---|---|
bm25 (search) |
0.45 (0.37 / 0.53 / 0.53) | 0.45 (0.37 / 0.53 / 0.53) | 0.45 (0.37 / 0.53 / 0.53) | 0.45 (0.37 / 0.53 / 0.53) | 0.45 (0.37 / 0.53 / 0.53) | 0.45 (0.37 / 0.53 / 0.53) |
vector (one query embedding, no expansion) |
0.39 (0.21 / 0.47 / 0.58) | 0.39 (0.21 / 0.47 / 0.58) | 0.38 (0.21 / 0.47 / 0.53) | 0.44 (0.26 / 0.63 / 0.74) | 0.44 (0.26 / 0.63 / 0.74) | 0.41 (0.21 / 0.58 / 0.68) |
hybrid (query, rerank off) |
0.54 (0.37 / 0.68 / 0.74) | 0.51 (0.37 / 0.63 / 0.74) | 0.53 (0.37 / 0.68 / 0.74) | 0.45 (0.37 / 0.53 / 0.53) | 0.45 (0.37 / 0.53 / 0.53) | 0.45 (0.37 / 0.53 / 0.53) |
full (query, rerank on) |
0.59 (0.37 / 0.84 / 0.95) | 0.56 (0.37 / 0.74 / 0.79) | 0.57 (0.37 / 0.79 / 0.84) | 0.45 (0.37 / 0.53 / 0.53) | 0.45 (0.37 / 0.53 / 0.53) | 0.46 (0.37 / 0.53 / 0.53) |
full MRR by category, scoped:
| Build | technical (8) | blended (6) | non-technical (5) |
|---|---|---|---|
| main | 0.94 | 0.61 | 0.80 |
| #936 | 1.00 | 0.53 | 0.80 |
| #983 | 0.94 | 0.61 | 0.70 |
| #962 | 0.94 | 0.02 | 0.67 |
| #962 + #936 | 0.94 | 0.02 | 0.57 |
| #962 + #983 | 0.94 | 0.03 | 0.67 |
- The #962 builds match the judged result on the paths
qmd queryuses:hybridandfulllose over a quarter of their MRR scoped, and blended queries fall from 0.61 to between 0.02 and 0.03. - #962's chunk scoring is mixed on the raw
vectorbackend. With one query embedding and no expansion it does better unscoped (MRR 0.44 against 0.39) and worse scoped (0.75 against 0.83), with large swings both ways per query. The judgedvsearchresult (0.76 to 0.57 nDCG@10) comes with expansion and the 0.3 score floor. - #936 differs from main on 3 queries, moving the known item by 1 rank: ahead of main on 2 and behind on 1 (scoped
fullMRR 0.80 against main's 0.80). That matches the judged result, where the two are level. - #983 differs from main on one query. The corpus holds two near-identical copies of that query's known item, and #983 ranks the other copy first;
expected_filesscoring counts the listed copy's rank. Both judges graded both copies 3, so nDCG doesn't move. It's the kind of result a file-list score can't see, and the same duplicate-content effect listed above. bm25is identical on every build, as expected.- On its own, the main vs #962 gap here isn't significant at n = 19 (paired randomization p = 0.078): with one target per query, 10 of 19 queries tie. It confirms the direction of the judged result rather than standing alone.
querydrops hits its own retrievers found. On all three queries where main'squerymissed the known item, main'svsearchhad it in its top 10 (andsearchdid too, for one of them).- Duplicate content across collections takes separate slots in every mode; 66% of main's
querylists carry at least one near-duplicate. Collapsing results that share a content hash would free those slots. searchrequires every term, so natural-language queries return short or empty lists: nothing at all for 2 of 19, and 13 of its 38 list ratings are failing.
- #962 split, without the shortcut and the chunk scoring, to see whether its memory and speed wins hold at main's quality.
- Deeper pools. Top 50 from every system plus an any-term keyword search, judged the same way. Every score above is relative to the pooled documents; a relevant document no system returned is invisible to it.
- An independent answer key. Per query, a context-free agent searches the corpus text directly, without qmd, and lists every relevant document, giving a recall figure that doesn't depend on any system under test.
- A public corpus, so anyone can reproduce this. The same judge protocol on SciFact (#808), or on wiki-bench for anyone who has its corpus.
qmd benchscope. Let it take several collections or the default scope, so it measures whatqmd queryactually searches.
Index. A copy of a personal index: 804k vectors over 264k documents in 14 collections. 13 collections are searched by default (about 6,000 active documents: engineering write-ups, software and agent-skill documentation, product, policy and research drafts, and a personal notes collection with saved articles, book chapters and podcast notes). The 14th, a large collection of repository READMEs, is excluded by default. One copy keeps the legacy vector layout (main, #936, #962, #962 + #936); a second was migrated by #983 (#983, #962 + #983).
Builds. main at 04e4dbd, #936 at 5862ec3, #983 at a7d9e17, #
Source: tobi/qmd