Skip to content

fix(search): filter question grammar from keyword candidates - #29

Merged
ipiton merged 1 commit into
ipiton:mainfrom
glockbender:codex/fix-hybrid-ranking-standalone
Nov 19, 2026
Merged

ipiton merged 1 commit into
ipiton:mainfrom
glockbender:codex/fix-hybrid-ranking-standalone

Conversation

@glockbender

@glockbender glockbender commented Nov 18, 2026 •

Copy link
Copy Markdown

English question words can make keyword retrieval promote unrelated prose. For example, searching for "What is the canary deployment rollback and which should have been used?" can rank a document containing the question's grammar above the actual procedure.

Filter common English function words for keyword candidate matching when content terms remain. Queries with identifier punctuation keep their original terms, as do queries made entirely of function words. Exact phrase and all-term boosts continue to use the original query and terms. Existing indexes need no rebuild.

Regression tests cover the real SQLite keyword path and the engine search entry point, Russian morphology, empty queries, function-word-only queries, and competing exact phrases and identifiers such as DO_NOT_RETRY, CAN_RETRY and can.retry.

The unchanged public 33-question fixture improves from 31/33 to 32/33 source hits within five, and mean reciprocal rank from 0.8596 to 0.8697. Its encoder hashes ASCII words, so these figures measure retrieval mechanics.

Validation includes make test vet eval plugin-smoke and go test -race ./internal/vectorstore ./internal/rag, plus independent code and documentation reviews.

All five fork GitHub checks passed on dae9513.

@ipiton
ipiton merged commit 6d7052d into ipiton:main Nov 19, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants