0003. Tuning hybrid search and the default search mode

Update (2026-11-04): the default decided here was later replaced; see ADR 0004. The measurements below stand as made.

Context

ADR 0002 found that vector-only search scored significantly better than the hybrid default (MRR 0.879 versus 0.742) and that the full-text side alone was weak (MRR 0.384). The brief asks for hybrid search, so the full-text side and the fusion were tuned before deciding anything. Before tuning, the seven questions flagged needs_review were checked against the corpus text.

Eval set review

The review was done in the same process that wrote the questions (Claude), so it is not independent, and all seven questions keep their needs_review flag. Three questions were reworded:

The other four (q005, q022, q050, q056) were read against their expected unit and left unchanged. An automatic ambiguity check was tried (questions whose content words all occur in another, unrelated unit) and dropped: it missed q027 and flagged 18 questions, most of them harmless.

Effect: the numbers moved slightly (the default hybrid went from recall@5 0.880 and MRR 0.742 to 0.907 and 0.748). The conclusions of ADR 0002 hold on the corrected set: no embedding model is significantly better than multilingual-e5-small (differences in MRR -0.012, +0.020 and -0.002, all intervals contain zero), vector-only still beats hybrid, and full-text alone is far behind. All tables in the README use the corrected set.

Decision rule

Fixed before the runs (the rule is in the merged change tune-hybrid-search, the parameter values were chosen before the first run):

Results

Development half (38 questions), multilingual-e5-small:

Configuration recall@5 MRR
hybrid, weight 1 (previous default) 0.974 0.798
vector only 0.974 0.879
weight 0.5 0.974 0.860
weight 0.25 0.974 0.877
common-term filter 2% 0.947 0.800
common-term filter 2%, weight 0.5 0.947 0.842
weight 0.01 (full-text as tie-break) 0.974 0.879

The best variant is weight 0.01, tied with vector-only. Held-out half (37 questions):

Configuration recall@5 MRR
hybrid, weight 1 (previous default) 0.838 0.697
vector only 0.946 0.900
weight 0.01 0.946 0.900

Vector-only beats the previous hybrid default on the held-out half significantly (MRR +0.203, interval [+0.091, +0.321]; recall@5 +0.108, [+0.027, +0.216]). Weight 0.01 is identical to vector-only (difference 0.000). All 75 questions: vector-only MRR 0.889 versus 0.748 for hybrid (+0.141, [+0.071, +0.215]).

Reranker on the new default

With vector-only as the default, the reranker (bge-reranker-v2-m3 over the top 20) was run again on the corrected set: recall@5 0.987 and MRR 0.958 against 0.960 and 0.889 without it. MRR improves significantly (+0.068, [+0.021, +0.121]); recall@5 improves by 0.027 but its interval ([0.000, +0.067]) touches zero, so that part is not significant. It stays off by default and is not wired into the API: the first run took about 53 seconds per question on an Apple M1 and the time was not measured again.

Decision

The default search mode is vector-only. No hybrid variant was measurably better than vector-only, and the one that matched it does so by making the full-text ranking irrelevant, so the simpler configuration wins the tie. Hybrid (vector plus full-text, merged by weighted RRF) and full-text only stay available as explicit modes, and the fusion weight and the common-term filter are explicit options. The class keeps the name HybridSearch.

What this does not show: that full-text search is useless in general. The full-text side here ORs the question words and ranks with ts_rank_cd; why it hurts was not analyzed, and any explanation is a guess. The questions were written from the law text in paraphrase, which favors embeddings; questions that quote exact terms or citations (for example "§ 14 Abs. 1") might favor full-text. That was not tested.

Consequences

Limits of the evidence