A question picks its definitions instead of taking the first thirty - #575
Merged
Conversation
Contributor
Author
|
Re-measured after |
Contributor
Author
|
Review before merge. Two fixes:
Noted, not changed: the lexical channel matches tokens as substrings, so short English words ("is", "in") hit inside longer ones; it is noisy alone, but it only stands alone when no embedding model is configured, and RRF with the vector channel washes it out otherwise. Not re-measured after these two changes. At 45 rows the bound does not bite and the base has one model, so the numbers on #574 should stand; I will re-run |
WaylandYang
force-pushed
the
feat/exploration-describes-the-data
branch
from
September 9, 2026 23:34
fcf3844 to
c933025
Compare
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: WaylandYang <wayland0916@gmail.com>
…k in Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: WaylandYang <wayland0916@gmail.com>
… own model Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: WaylandYang <wayland0916@gmail.com>
WaylandYang
force-pushed
the
feat/a-question-picks-its-definitions
branch
from
September 9, 2026 23:38
a864948 to
774d99c
Compare
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: WaylandYang <wayland0916@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #574. Stacked on #571 (both touch the prompt block in
chat.rs); retarget todevonce the stack lands.Chat read its definitions with
confirmed(kb, 30)— the first thirty by concept name. The seeded upper bound (27 definitions, 17/18 on wide) sat three short of that cap, and a base with a hundred definitions would leave seventy outside the prompt on every question.What changes
concept_mappingsgainsembedding/embedded_model/embedded_text(migration0048), the ontology index’s shape: re-embedded when the model or the text changes, refreshed lazily before a lookup.mapping_index): vector (“name: summary (unit)”, pgvector) and lexical (every confirmed definition scored in Rust by the question’s tokens — ASCII words, CJK bigrams; nopg_trgm). Degradation: both → lexical only → the firstkby name when nothing matches. Never “no definitions”.GET /kbs/{id}/mappings/relevant?q=&k=exposes the same lookup, so the bench can score it and a page can later show which definitions a question used.ask.mjs --recall Kmeasures recall@k without asking anything (seconds);mappings.mjs --also <corpus>mounts a second source so a base can exceed the old cap.Measured
Two sources in one base, both truths seeded, 45 confirmed definitions:
Selection kept the tpch upper bound with 45 definitions in play (the old cap would have dropped fifteen of them). Wide lost two questions, and the recall misses are not near-name pairs: they are Chinese questions against English seeded definitions whose summaries are bench placeholders (
Paid orders — bench truth). The lever is the embedded text, not a reranker — details on #574.Verified
by_idskeeps the requested order.🤖 Generated with Claude Code