Log in
Log into community
Find answers from the community
View all posts
Related posts
Did this answer your question?
π
π
π
Powered by
Hall
Inactive
Updated 2 months ago
0
Follow
Bm25
Bm25
Inactive
0
Follow
T
Tungdepzai
last year
Β·
is there any way to filter by metadata or document field when retrieving with bm25retriever from MongoDocumentStore? Please help
Attachments
L
T
5 comments
Share
Open in Discord
L
Logan M
last year
Because of how bm25 works, you can just filter the list of returned nodes right?
T
Tungdepzai
last year
I actually havent thought of that π , I was thinking of filtering before the retrieve, how can I implement your method inside QueryFusionRetriever? Do I have to modify the class it self?
L
Logan M
last year
Hmmm, you could implement a custom retriever that wraps the bm25 retriever, to then filter π
Custom retrievers are not too bad to implement
L
Logan M
last year
Example
https://docs.llamaindex.ai/en/stable/examples/query_engine/CustomRetrievers.html#define-custom-retriever
T
Tungdepzai
last year
I'll try that out, thanks a ton πββοΈ
Add a reply
Sign up and join the conversation on Discord
Join on Discord