feat(retrieve): add keyword retriever option and per-call override#346
Open
jl1371-cell wants to merge 8 commits intoNevaMind-AI:mainfrom
Open
feat(retrieve): add keyword retriever option and per-call override#346jl1371-cell wants to merge 8 commits intoNevaMind-AI:mainfrom
jl1371-cell wants to merge 8 commits intoNevaMind-AI:mainfrom
Conversation
feat(bm25): adding bm25 and hybrid RRF fusion with field-aware text extraction
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.
What
RetrieveConfig.retrieveroption for RAG item recall:vector/keyword.MemoryService.retrieve(..., method=..., retriever=...).Why
Keyword retriever provides a lightweight & explainable fallback, and enables deterministic matching when embeddings are unavailable.
Behavior (no breaking changes)
retriever, RAG continues to use the default (vector).retriever(if provided) overridesRetrieveConfig.retrievermethod(if provided) overridesRetrieveConfig.methodretriever is None, the wrapper does not forwardretrieverdownstream (avoids errors if downstream service doesn’t accept this arg).Implementation
RetrieveConfiggainsretriever(normalized case-insensitively).RetrieveMixin.retrieveaccepts optionalmethod/retriever; writesstate["retriever"]for RAG workflows._rag_recall_itemschooses keyword/vector based onstate["retriever"].Tests
make testmake checkNotes
OPENAI_API_KEY,OPENROUTER_API_KEY).