diff --git a/pkgs/atlas-search/atlas_search.py b/pkgs/atlas-search/atlas_search.py index bd88590bea..2ef1c99aa0 100755 --- a/pkgs/atlas-search/atlas_search.py +++ b/pkgs/atlas-search/atlas_search.py @@ -21,6 +21,16 @@ fallback (--model BAAI/bge-small-en-v1.5 --vec-table vec_bge_small_384_f32 --embedder fastembed). +Recorded-row note (#13283): the #5733 gate's verdict record +(eval/gate-5733-results.md) records a different golden-311 row — +recall@10 183/311, MRR 0.3640 — under the same "production hybrid" +label. That row belongs to the Python eval lineage's configuration +(branch depth 30, RRF k=60, vectors truncated to 384 dimensions), +not to this production shape (k=10, pool 100 per branch, full 768 +dimensions). The two rows are different configurations, not a +measurement error; a golden-311 number cited without its +configuration is incomplete. + Privacy model (docs/atlas-provenance-and-scale-design-2026-10-31.md): sensitivity is a caller ceiling, not a display hint. The default ceiling is `personal` — local-only and secret-bearing chunks are excluded diff --git a/pkgs/atlas-search/book/concepts/evaluation.md b/pkgs/atlas-search/book/concepts/evaluation.md index c7ca5ea6b2..9556b201cd 100644 --- a/pkgs/atlas-search/book/concepts/evaluation.md +++ b/pkgs/atlas-search/book/concepts/evaluation.md @@ -31,7 +31,7 @@ Golden-311 carries two recorded rows that are both labelled the production hybri | Bake-off best row, recorded in the Python reference's header as the 2026-10-31 production decision | one-stage hybrid, reciprocal rank fusion at k=10, pool 100 per branch | 189 hits@10, MRR 0.3894 | | Row reproduced by the gate-5733 sanity check from the fused rerank evaluator | branch depth 30, reciprocal rank fusion at k=60, query vectors truncated to 384 dimensions | 183 of 311 at recall@10, MRR 0.3640 | -These are different configurations, not a measurement error — pool 100 against depth 30, fusion constant 10 against 60, full-width against truncated vectors — but neither source names the other's row, and both call themselves "production hybrid". The shipped service's fusion constant is 10 (the versioned query-parameters contract); the Python eval lineage, including the gate below, fuses at 60. Any future citation of a golden-311 production number that does not name its configuration is incomplete, and reconciling the two rows into one canonical baseline remains open work. +These are different configurations, not a measurement error — pool 100 against depth 30, fusion constant 10 against 60, full-width against truncated vectors — both called themselves "production hybrid" and, until the #13283 reconciliation, neither source named the other's row; the source records now cross-name the two configurations, so each row can be traced to the configuration that produced it. The shipped service's fusion constant is 10 (the versioned query-parameters contract); the Python eval lineage, including the gate below, fuses at 60. Any future citation of a golden-311 production number that does not name its configuration is incomplete. ## Gate 5733: the Jaccard gate, and its FAIL diff --git a/pkgs/atlas-search/eval/README.md b/pkgs/atlas-search/eval/README.md index af30ba40f6..251498fce1 100644 --- a/pkgs/atlas-search/eval/README.md +++ b/pkgs/atlas-search/eval/README.md @@ -5,7 +5,13 @@ The harness the #5741 test plan builds _first_, before any signal signal combination are scored offline against judged qrels, so the ablation matrix — {dense} / {BM25} / {SPLADE} / {dense+BM25} (today's design) / {dense+SPLADE} / {dense+BM25+SPLADE} / each ± Jaccard -rescore — is measured, not argued. +rescore — is measured, not argued. Two cautions about that matrix +as a record: the SPLADE arms have never been scored — no SPLADE +encoder or postings exist (see "What this does not do"), so every +SPLADE row above is design intent, not a measured signal — and the +golden-311 numbers recorded in this directory come from two +different configurations, named under "The recorded golden-311 +rows" below. - Library: `crates/atlas-core/src/eval.rs` (`atlas_core::eval`) - Runner: `cargo run -p atlas-core --bin atlas-eval -- ` @@ -16,9 +22,13 @@ rescore — is measured, not argued. The repository also keeps the production Python reference and its corpus-specific retrieval runner beside the Rust tooling: -- `../atlas_search.py` — copied byte-for-byte from the laptop's +- `../atlas_search.py` — copied from the laptop's `~/atlas/turso-atlas/scripts/atlas_search.py` - (SHA-256 `1b805be87b2d08fd5c5f6ed65f45d1c40528c9acc074adeaf0a5665a4cec8d9f`). + (source SHA-256 `1b805be87b2d08fd5c5f6ed65f45d1c40528c9acc074adeaf0a5665a4cec8d9f`). + The in-repo copy has since diverged from that source: concurrent + hybrid branches (#12900 thread 1), a fail-closed chunk-labels + fix, a treefmt pass, and the recorded-row cross-reference added + under #13283. - `eval3.py` — started from the source at `~/atlas/turso-atlas/scripts/eval3.py`; this copy updates only the usage example to point at the checked-in fixture. Source SHA-256: @@ -101,9 +111,39 @@ qrels, and rankings that exercise the harness end to end (it backs the determinism and selection tests). It is **not** a held-out set, was never measured against a corpus, and must never be quoted as evaluation evidence or as support for adopting SPLADE or any other -signal. The real held-out set (real query shapes against our -corpora, with judged chunks) is collected under #5741's test plan, -step 1; this harness is what will score it when it exists. +signal. A real held-out set does now exist: `fixtures/heldout-nearexact-54.json` +(54 verbatim near-exact passages, built 2026-11-17), and a full +gate has run on it — `gate5733.py`, verdict record +`gate-5733-results.md` (FAIL for the Jaccard rescore). That set is +a near-exact-passage set built for the #5733 gate; the broader +held-out collection of real query shapes described in #5741's test +plan, step 1, remains the plan for general query shapes, and this +harness is what will score it when it exists. + +## The recorded golden-311 rows + +Golden-311 carries two recorded rows that were both long labelled +"production hybrid". They are different configurations, not a +measurement error, and neither should be cited without its +configuration: + +| Row | Configuration | Recorded in | +| --- | --- | --- | +| 189 hits@10, MRR 0.3894 | production shape: one-stage hybrid, RRF k=10, pool 100 per branch, full 768 dimensions | `../atlas_search.py` header (2026-10-31 bake-off decision); configuration pinned by `crates/atlas-proto/query-parameters-v1.json` | +| recall@10 183/311, MRR 0.3640 | eval lineage: branch depth 30, RRF k=60, vectors truncated to 384 dimensions | `gate-5733-results.md` (sanity gate, reproduced exactly) | + +Three different artefacts in this directory are all called +"golden"; they are not interchangeable: + +- `fixtures/golden-311.json` — 311 judged queries; qrels are + chunk-id judgements against the conversation corpus. +- `fixtures/heldout-nearexact-54.json` — the 54-query held-out + near-exact set above. +- The overlap experiment's query set (`overlap-report-6039.md`) — + provisional and self-derived, with span judgements against a + slice of this repository. Golden-311 cannot serve that + experiment: its qrels judge chunk ids in a different corpus, + not spans in the repo slice. ## What this does not do diff --git a/pkgs/atlas-search/eval/eval3.py b/pkgs/atlas-search/eval/eval3.py index a8260abe84..955ae3e6d2 100644 --- a/pkgs/atlas-search/eval/eval3.py +++ b/pkgs/atlas-search/eval/eval3.py @@ -15,6 +15,12 @@ top-30 fused by reciprocal rank fusion, k=60; the hybrid FTS branch uses words >3 chars WITHOUT the STOP filter and LIMIT 30, exactly as the v2 harness did). +- Configuration note (#13283): this hybrid is the Python eval + lineage — top-30 branches, RRF k=60, vectors truncated under + --trunc (384 in the gate lineage). The production shape is a + different configuration (RRF k=10, pool 100 per branch, full 768 + dimensions; see ../atlas_search.py). Numbers from this harness are + eval-lineage numbers; cite them with their configuration. - bge query prefix: same rule as eval_vectors.py ("bge" in model name -> "Represent this sentence for searching relevant passages: "). - ST models: queries encoded with prompt_name="query" so the model's own diff --git a/pkgs/atlas-search/eval/gate-5733-results.md b/pkgs/atlas-search/eval/gate-5733-results.md index 156add2143..dd60bd908b 100644 --- a/pkgs/atlas-search/eval/gate-5733-results.md +++ b/pkgs/atlas-search/eval/gate-5733-results.md @@ -44,6 +44,15 @@ set-size geometry alone. The signal as designed cannot deliver the the bake-off's recorded production-hybrid numbers for golden-311 **exactly**: recall@10 183/311, MRR 0.3640. No number below was trusted until this reproduced. +- **Configuration naming (#13283):** the row above belongs to this + gate's eval-lineage base (branch depth 30, RRF k=60, trunc-384). + It is not the production configuration: the production shape + decided 2026-10-31 (`../atlas_search.py` header; + `crates/atlas-proto/query-parameters-v1.json`) fuses at RRF k=10 + with pool 100 per branch at full 768 width, and its recorded best + row is 189 hits@10 / MRR 0.3894. Both are golden-311 numbers; they + differ because the configurations differ, and neither row should + be cited as "the production hybrid" without its configuration. ## Corpus disclosure diff --git a/pkgs/atlas-search/eval/gate5733.py b/pkgs/atlas-search/eval/gate5733.py index d1fadfa079..bb700d3636 100644 --- a/pkgs/atlas-search/eval/gate5733.py +++ b/pkgs/atlas-search/eval/gate5733.py @@ -1,11 +1,18 @@ #!/usr/bin/env python3 """Section-4 held-out gate for the Atlas Jaccard rescore (#5733). -Base retrieval: the corpus's Python reference hybrid (eval3.py's own -functions): Snowflake arctic-embed-m-v2.0 trunc-384 cosine + FTS BM25, -fused RRF k=60. Sanity gate: at branch depth 30 the fused top-10 must -reproduce the bake-off's recorded production-hybrid numbers for the -golden-311 set (183/311 recall@10, MRR 0.3640, per fused_rerank_eval.py). +Base retrieval: the corpus's Python eval-lineage hybrid (eval3.py's +own functions): Snowflake arctic-embed-m-v2.0 trunc-384 cosine + FTS +BM25, fused RRF k=60. This is NOT the production configuration — +production fuses at RRF k=10 with pool 100 per branch at full 768 +dimensions (atlas_search.py's header; query-parameters-v1.json). +Sanity gate: at branch depth 30 the fused top-10 must reproduce the +eval lineage's recorded golden-311 row (183/311 recall@10, MRR +0.3640, per fused_rerank_eval.py — not checked into this repo; the +in-repo record is gate-5733-results.md). That row was long labelled +"production hybrid"; it belongs to this depth-30 / k=60 / trunc-384 +configuration, not to production's (whose recorded best row is 189 +hits@10 / MRR 0.3894). Naming reconciled under #13283. Rescore: a Python port of the shipped Rust `rescore_fused` (atlas-core::shingles, PR #10335), pinned against the Rust test @@ -15,10 +22,13 @@ union, threshold 0.60 (the design default), jaccard_depth=100. Sets: general = golden-311 (frozen 2026-10-26) minus queries whose -gold chunks are all absent from this corpus copy; near-exact = 60 +gold chunks are all absent from this corpus copy; near-exact = verbatim 30-token passages sampled deterministically from corpus chunks (every 997th chunk id, >=60 normalized tokens, window starting -at token 10), gold = source chunk. +at token 10), gold = source chunk, capped at 60 — on the frozen +corpus copy 54 chunks qualified, and that 54-query set, frozen as +fixtures/heldout-nearexact-54.json, is the set the verdict record +(gate-5733-results.md) measures. Corpus disclosure: ~/atlas/v3/corpus.db carries 101,339 of the frozen 101,471 chunks (sample fingerprint 07b3e17b... matches); 132 chunk ids diff --git a/pkgs/atlas-search/eval/overlap-report-6039.md b/pkgs/atlas-search/eval/overlap-report-6039.md index 2f56a19be7..5c22753b26 100644 --- a/pkgs/atlas-search/eval/overlap-report-6039.md +++ b/pkgs/atlas-search/eval/overlap-report-6039.md @@ -26,10 +26,15 @@ that straddle a chunk boundary are never retrievable as a whole. - Signal: BM25 (lexical). The #5741 eval harness scores saved rankings offline, so these same qrels can be re-scored under a dense signal later without re-running the corpus work. -- Golden set: **provisional**, constructed by the script from the - corpus itself — the #6027 golden set has not landed, so per the - task packet this experiment defines its own and names the re-run - owed (below). 64 queries: per source type, 16 _interior_ queries +- Query set: **provisional and self-derived**, constructed by the + script from the corpus itself — the #6027 golden set has not + landed, so per the task packet this experiment defines its own + and names the re-run owed (below). It is not a golden set in the + golden-311 sense and is unrelated to it: golden-311's qrels are + chunk-id judgements against the conversation corpus, while this + experiment needs span judgements against this repo slice, so + golden-311 cannot serve it (#13283). + 64 queries: per source type, 16 _interior_ queries (whole sampled passages: prose paragraphs, log entries) and 16 _boundary_ queries (50-word spans centred on 0%-overlap window boundaries — the case overlap exists for). A query is the source