haiku.rag/tests/multi_db
Yiorgis Gozadinos f4bfc12293
ARM ONLY, NEVER MERGE: z-scored branch fusion
Hybrid without a reranker keeps each database's vector and FTS branches
apart and compares every candidate by per-branch z-score, summing both
branches for a chunk found in each. Databases are then compared by how
exceptional a hit is for them rather than by raw score, which is not
comparable across indexes.

Targets the measured ceiling on rank-and-score fusion: 73% of candidates at
n=4 and 84% at n=8 tie on both score and rank, so no key built from those
two can separate them and they fall to declaration order under every other
arm. Continuous keys should barely collide.

Implementation from the multi-fusion session; branch depth via
HAIKU_RAG_BRANCH_DEPTH, default 20.

Claude-Session: https://claude.ai/code/session_01WhudUtZm6qqiuv8Y1sbwSc
2026-08-31 19:10:22 +03:00
..
__init__.py Split the multi-database tests by subject 2026-08-26 13:43:53 +03:00
conftest.py Finish the comment pass, and escape document fields everywhere Rich renders 2026-08-28 15:34:47 +03:00
helpers.py State what the code does, not what it replaced 2026-08-28 15:13:52 +03:00
test_capabilities.py State what the code does, not what it replaced 2026-08-28 15:13:52 +03:00
test_citations.py State what the code does, not what it replaced 2026-08-28 15:13:52 +03:00
test_documents.py State what the code does, not what it replaced 2026-08-28 15:13:52 +03:00
test_expansion.py Make three tests assert what they are about 2026-08-27 18:04:28 +03:00
test_lifecycle.py Finish the comment pass, and escape document fields everywhere Rich renders 2026-08-28 15:34:47 +03:00
test_scope.py Finish the comment pass, and escape document fields everywhere Rich renders 2026-08-28 15:34:47 +03:00
test_search.py ARM ONLY, NEVER MERGE: z-scored branch fusion 2026-08-31 19:10:22 +03:00