GeezerVison is showing github.com — atlas search: query-understanding front-end — spell correction + LLM query planner/rewriter as toggleable stages, dual submission with provenance (extends #5741) · Issue #5773 · developing-today/code
atlas search: query-understanding front-end — spell correction + LLM query planner/rewriter as toggleable stages, dual submission with provenance (extends #5741) #5773DescriptionExtends #5741 (SPLADE investigation + eval harness + adaptive weighting). Design commitments from Drew's direction 2026-11-04.
What this adds
Two NEW front-end stages in front of retrieval, each independently toggleable (off / deprioritized / on), in pipeline order:
spell correction → query planner/rewriter → signal weighting (#5741) → fan-out
Stage 1 — spell correction
Neither BM25 nor SPLADE tolerates typos: both match on exact terms. The mechanism is classical, not learned:
- Candidate generation by Damerau–Levenshtein edit distance (a transposition — flipped letters — counts as 1 edit) plus character-trigram similarity (set overlap over character 3-grams; the Jaccard family already in the stack per Atlas search: Jaccard as a third signal (rescore + ingest dedup); SPLADE as a triggered follow-on #5733).
- Candidates are drawn from a corpus-vocabulary dictionary with term frequencies, so corrections prefer terms the corpus actually contains.
- Correction is conservative — high-confidence only. The original query is always retained as a variant; a correction is never silently substituted. The raw and corrected forms can both fan out and merge like any other variant (see dual submission below).
Stage 2 — query planner / rewriter
A small, fast model rephrases/expands the query into a retrieval-shaped variant: vocabulary the corpus would use, expansions of abbreviations, decomposed compound questions.
- Dual submission is the default shape: raw and rewritten both fan out; results merge with provenance tags (
raw-only / rewritten-only / both) and flow through the normal rescore (Atlas search: Jaccard as a third signal (rescore + ingest dedup); SPLADE as a triggered follow-on #5733).
- The planner may also emit the class hint that Atlas search: SPLADE investigation — third retrieval signal, eval harness, query-adaptive weighting #5741's adaptive weighting consumes — but keep the roles distinct: the planner produces text, the classifier produces weights.
- Budget discipline from Atlas search: SPLADE investigation — third retrieval signal, eval harness, query-adaptive weighting #5741 holds ("sameish" query time): the rewrite is one small inference, cached under atlas-search service: query-embedding + snapshot result caching, --no-cache/--wait/--expand/--raw flags #5668's discipline (a rewrite is a pure function of (text, model), exactly like a query embedding), so repeat queries skip it entirely. The Snowflake dense embeddings already handle part of the vocabulary-mismatch problem; the planner is an addition to be justified by measurement, not an assumption.
Hard exclusions
Evaluation
Planner on/off and spell on/off are ablation axes in #5741's eval harness, alongside the signal ablations. A stage stays only if measured gains (recall@10 / MRR per query class) justify its latency. The harness's held-out real queries are the deciding vote, as with every signal in this stack.
Open questions
- Planner model choice: a Jev-class small local model vs a hosted small model — latency, cost, and the query-embed cache hit rate decide.
- Rewrite count: a single variant vs N variants (and if N, how provenance tags and fan-out budget scale).
- Provenance-aware rescore weighting: should "found by both raw and rewritten" boost a result? Intuition says yes; measure it.
- Interaction with spell correction ordering: correct-then-rewrite vs rewrite-then-correct — the pipeline order above is the starting position, not a settled answer.
Related: #5733 (Jaccard signals + rescore), #5668 (query-embed cache + flags — the parameter surface for this issue's toggles is designed in the companion issue on query-time knobs), #5667 (shard design), #5669 (shard implementation). Activitydeveloping-today commented on Nov 5, 2026 dezren39 commented on Nov 5, 2026 Companion issue: #5774 — the query-time parameter surface carries this issue's stage toggles (planner/spell off / deprioritized / on), variant selection, and hint override as per-query flags/fields. dezren39 commented on Nov 5, 2026 agent-note:v1
- task: 10179
- state: picked_up
- lane: code-h (direct)
- summary: Triage of the atlas search query-understanding front-end design (extends Atlas search: SPLADE investigation — third retrieval signal, eval harness, query-adaptive weighting #5741). Checking dependency states (Atlas search: SPLADE investigation — third retrieval signal, eval harness, query-adaptive weighting #5741 eval harness, atlas search: query-time parameter surface — every retrieval knob as a CLI flag / raw-query field, no hardcoded constants (extends #5741, #5668) #5774 parameter surface, Atlas search: Jaccard as a third signal (rescore + ingest dedup); SPLADE as a triggered follow-on #5733, atlas-search service: query-embedding + snapshot result caching, --no-cache/--wait/--expand/--raw flags #5668) to record ordering before completing triage.
dezren39 commented on Nov 5, 2026 agent-note:v1
- task: 10179
- state: done (triaged)
- lane: code-h (direct)
Triage 2026-11-05 (task 10179): design is complete and self-contained; implementation is correctly gated on measurement infrastructure that is still open. No decision needed from Drew — the design commitments are already his (2026-11-04, per the issue body), and the open questions (planner model, rewrite count, provenance boost, stage ordering) are explicitly measurement-decided by #5741's harness, not taste calls.
Dependency states verified fresh at triage (all OPEN unless noted):
- Atlas search: SPLADE investigation — third retrieval signal, eval harness, query-adaptive weighting #5741 (SPLADE investigation + eval harness + adaptive weighting) — OPEN. This is the gating dependency: both new stages exist as ablation axes in its harness, and a stage stays only on measured recall@10/MRR gains. Implementing the front-end before the harness lands would build the thing that decides whether it should exist.
- atlas search: query-time parameter surface — every retrieval knob as a CLI flag / raw-query field, no hardcoded constants (extends #5741, #5668) #5774 (query-time parameter surface) — OPEN, companion: carries this issue's stage toggles (off / deprioritized / on), variant selection, and hint override as per-query flags. Land it with or before the stages so the toggles exist when the stages do.
- atlas-search service: query-embedding + snapshot result caching, --no-cache/--wait/--expand/--raw flags #5668 (query-embed cache) — OPEN: the rewrite-cache discipline this design reuses ("a rewrite is a pure function of (text, model)").
- Atlas search: Jaccard as a third signal (rescore + ingest dedup); SPLADE as a triggered follow-on #5733 (Jaccard signals + rescore) — OPEN: provenance-tagged variants merge through its rescore.
- docs: Scaler-era Atlas/Turso data architecture revision #5667 (shard design) — MERGED; atlas staging tier: versioned schema, registry, aggregator with merge-on-close promotion into three-level core #5669 (staging tier) — OPEN, unrelated to ordering here.
Scoped implementation order once #5741's harness exists:
- Spell correction first — classical mechanism (Damerau-Levenshtein candidates + char-trigram similarity over a corpus-vocabulary dictionary), no model choice to settle, and its shape-rule gates (error-pastes / code identifiers / quoted strings never corrected) are already specified.
- Planner/rewriter second — dual submission with provenance tags (raw-only / rewritten-only / both) through the Atlas search: Jaccard as a third signal (rescore + ingest dedup); SPLADE as a triggered follow-on #5733 rescore; planner model choice settled by the harness's latency/cache measurements.
- Ablations run per query class; any stage without measured gains stays off — that is the design's own acceptance shape.
This issue stays open as the design record; it becomes actionable as a small_fix/implementation when #5741 closes. dezren39 commented on Nov 8, 2026 Partial verification — staying open (2026-11-07 done-task-only audit, tracking: #7016).
Queue task(s) [10179] were marked done, and some work did land:
No merged change closes this issue's full scope, so the done status is not treated as completion. Remainder re-queued as triage task 11751. dezren39 commented on Nov 13, 2026 agent-note:v1
task: 13019
lane: any-c
state: blocked
worker: repo-worker-code
finding: Re-triaged the blocker end-to-end under the 2026-11-13 fix-all steer. Fresh gh state 2026-11-13: issue #5773 OPEN, no hold labels. All three gates still OPEN: issue #5774 (query-time parameter surface, status:to-do), issue #5668 (query-embedding/result caching, queue/queued), issue #5733 (Jaccard rescore + provenance merge, queue/queued). Task 13019's acceptance requires all three surfaces and its scope explicitly excludes implementing them, so no fleet-fixable part of this task can proceed until they land; none of the gates is a Drew decision — all are ordinary fleet work items.
next: Task 13019 is dependency-blocked on issues #5774, #5668 and #5733 (broker rechecks and auto-releases when all three close). Work the gate issues through their own queue tasks; #5774 currently shows no queue/queued label, so its queue coverage is the lead to check next.
dezren39 commented on Nov 16, 2026
🤖 Agent note · picked up — lane code-f, task 13019
- Fresh state (2026-11-16T09:0xZ): atlas search: query-understanding front-end — spell correction + LLM query planner/rewriter as toggleable stages, dual submission with provenance (extends #5741) #5773 OPEN, no hard-stop labels, no open implementation PR. Harness Atlas search: SPLADE investigation — third retrieval signal, eval harness, query-adaptive weighting #5741 CLOSED (landed). Gates all still OPEN: atlas search: query-time parameter surface — every retrieval knob as a CLI flag / raw-query field, no hardcoded constants (extends #5741, #5668) #5774 (
status:to-do, parameter surface), atlas-search service: query-embedding + snapshot result caching, --no-cache/--wait/--expand/--raw flags #5668 (triage, cache), Atlas search: Jaccard as a third signal (rescore + ingest dedup); SPLADE as a triggered follow-on #5733 (status:in-review, rescore/provenance).
- Main:
pkgs/atlas-search has no spell-correction / planner / dual-submission code — only main.rs:398 flag marked "not implemented yet". Acceptance still unimplemented.
- STEER (fix-all-2026-11-13): re-triaging as the work — verdict below, then block.
dezren39 commented on Nov 16, 2026
🤖 Agent note · blocked (dependency) — lane code-f, task 13019
- Re-triage verdict (STEER fix-all-2026-11-13, fresh 2026-11-16): nothing fleet-fixable inside this task — acceptance requires the atlas search: query-time parameter surface — every retrieval knob as a CLI flag / raw-query field, no hardcoded constants (extends #5741, #5668) #5774 parameter surface, atlas-search service: query-embedding + snapshot result caching, --no-cache/--wait/--expand/--raw flags #5668 cache discipline, and Atlas search: Jaccard as a third signal (rescore + ingest dedup); SPLADE as a triggered follow-on #5733 rescore/provenance merge, all still OPEN, and scope excludes implementing the gates. This is a checkable-gate block, not a Drew-only escalation: the gates are ordinary fleet work tracked under their own issues.
- Evidence: atlas search: query-time parameter surface — every retrieval knob as a CLI flag / raw-query field, no hardcoded constants (extends #5741, #5668) #5774 OPEN
status:to-do; atlas-search service: query-embedding + snapshot result caching, --no-cache/--wait/--expand/--raw flags #5668 OPEN triage; Atlas search: Jaccard as a third signal (rescore + ingest dedup); SPLADE as a triggered follow-on #5733 OPEN status:in-review; Atlas search: SPLADE investigation — third retrieval signal, eval harness, query-adaptive weighting #5741 CLOSED; pkgs/atlas-search on current main has no spell/planner/dual-submission code (main.rs:398 flag "not implemented yet"); no PR references atlas search: query-understanding front-end — spell correction + LLM query planner/rewriter as toggleable stages, dual submission with provenance (extends #5741) #5773.
- Action: task 13019 blocked with reason-class
dependency. Resume when atlas search: query-time parameter surface — every retrieval knob as a CLI flag / raw-query field, no hardcoded constants (extends #5741, #5668) #5774 + atlas-search service: query-embedding + snapshot result caching, --no-cache/--wait/--expand/--raw flags #5668 + Atlas search: Jaccard as a third signal (rescore + ingest dedup); SPLADE as a triggered follow-on #5733 close: implement ordered slices (spell → planner/rewriter → ablations) per packet, stages off by default without measured recall@10/MRR gain.
- Labels:
queue/blocked + status/blocked stand (claim labels subsumed by immediate block); work/assigned kept.
- Bookkeeping: sandbox backlog/sweep + blocked-until registry entry deferred to fleet reconciliation (openchamber scheduled lane).
dezren39 commented on Nov 17, 2026 🤖 Agent note · triaged — duplicate of the standing triage; one dependency gate has since cleared
- Agent: repo-worker-code (Muse lane any-l)
- Session / ID: queue task 18369 (bulk-intake triage)
This issue is already owned: fix task 13019 holds it, dep-blocked on 2026-11-16 (lane code-f) with the resume condition "#5774 + #5668 + #5733 close". That triage stands; this note only refreshes the gate state, verified fresh this run:
- atlas-search service: query-embedding + snapshot result caching, --no-cache/--wait/--expand/--raw flags #5668 (cache discipline) — CLEARED. Its three implementation slices landed 2026-11-14 (atlas-search: query-embedding cache — sha256 key, memory LRU + shared Turso tier, async writes (#5668 slice 1) #9941 embedding cache, PR feat(atlas-search): query-embedding cache — memory LRU + shared Turso tier (#9941) #10086; atlas-search: flags end-to-end — --no-cache/--wait/--raw + --hydrate N per the 2026-11-11 --expand contract (#5668 slice 2) #9942 flags; atlas-search: snapshot-bound result cache — per-service memory, snapshot-rotation invalidation (#5668 slice 3) #9943 snapshot-bound result cache, PR atlas-search: snapshot-bound result cache (#9943, #5668 slice 3) #10123), and the parent atlas-search service: query-embedding + snapshot result caching, --no-cache/--wait/--expand/--raw flags #5668 itself was closed with evidence today (2026-11-17, task 18327). The rewrite-cache discipline this issue's Stage 2 cites ("cached under atlas-search service: query-embedding + snapshot result caching, --no-cache/--wait/--expand/--raw flags #5668's discipline") is now in the code.
- atlas search: query-time parameter surface — every retrieval knob as a CLI flag / raw-query field, no hardcoded constants (extends #5741, #5668) #5774 (query-time parameter surface) — still OPEN (
status:to-do, task/fix). Gate stands.
- Atlas search: Jaccard as a third signal (rescore + ingest dedup); SPLADE as a triggered follow-on #5733 (Jaccard third signal: rescore + provenance merge) — still OPEN (
status:in-review, design). Gate stands: Stage 2's dual-submission merge flows through Atlas search: Jaccard as a third signal (rescore + ingest dedup); SPLADE as a triggered follow-on #5733's rescore/provenance work.
- Atlas search: SPLADE investigation — third retrieval signal, eval harness, query-adaptive weighting #5741 (SPLADE investigation + eval harness) remains CLOSED, as before.
Updated resume condition for task 13019: implement when #5774 and #5733 close (ordered slices per the existing packet: spell correction → planner/rewriter → ablation axes in #5741's harness; stages off by default without measured recall@10/MRR gain). No new packet created; no duplicate escalation. The status/blocked / queue/blocked labels on this issue remain accurate. developing-today-fleet commented on Nov 25, 2026 agent-note:v1
Agent: felix (Muse lane, 2026-11-25)
State: verified-blocked — graph hygiene audit #14863, slice 6
Fresh gate check against the standing triage record (fix task 13019's resume condition: '#5774 + #5668 + #5733 close'):
The remaining dependency was prose-only; a native blocked_by edge to #5774 has been added (verified via the dependencies API). status/blocked + queue/blocked stay correct while #5774 is open. Refs #14863
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|