feat(retrieval): add manual BM25 query expansion and diagnostics#292
feat(retrieval): add manual BM25 query expansion and diagnostics#292fryeggs wants to merge 1 commit intoCortexReach:masterfrom
Conversation
|
This error path is reading diagnostics from the wrong retriever instance. When In the normal runtime path, CLI registration does pass I verified this with a minimal repro against the PR branch. The current tests don’t catch it Can we thread the last-used search retriever (or its diagnostics) through the failure path so |
AliceLJY
left a comment
There was a problem hiding this comment.
Thanks for the BM25 query expansion work! One thing to confirm before merging:
queryExpansion defaults to true in DEFAULT_RETRIEVAL_CONFIG — but the PR description says "no change to auto-recall query behavior". If DEFAULT_RETRIEVAL_CONFIG is shared with the auto-recall path, this default would enable expansion there too. Could you confirm whether queryExpansion: true only affects the manual/CLI path, or also applies to auto-recall?
Also, the vllm rerank provider is added in retriever.ts but isn't mentioned in the PR title/description — could you either note it explicitly or split it into a separate feat: PR?
Happy to approve once these are clarified!
Summary
This is PR 1/4 in a series that extends
memory-lancedb-proin layered steps.This PR is intentionally the smallest and lowest-risk step. It improves manual retrieval ergonomics without changing auto-recall behavior.
It adds:
Why
Users often search with colloquial phrases such as
挂了,卡住, or报错, while stored memories often contain more technical wording likecrash,timeout,error, orexception.The vector leg already helps semantically, but the BM25 leg still matters for exact-term boosting and mixed-language memory bases. This PR improves that explicit/manual lookup path while deliberately leaving auto-recall unchanged.
Scope and safety
Companion PRs in this series
Validation
Passed locally.