Find answers from the community

Updated 3 months ago

Is there a way to create a keyword based

Is there a way to create a keyword based retriever like BM25Retriever based on an existing index? I have already embedded and ingested my documents into a postgres vectorstore and want to create a retriever from an already existing index.
W
m
3 comments
I think the custom retrieval example shows example of using keyword based retriever only.

How lucky!
https://docs.llamaindex.ai/en/stable/examples/query_engine/CustomRetrievers.html
But then how do I create a keyword based retriever based on the index already created?
I think you can use the nodes to create the keyword index and then follow the above link

Plain Text
nodes = index.docstore.docs
keyword_index = SimpleKeywordTableIndex(nodes, storage_context=storage_context)
Add a reply
Sign up and join the conversation on Discord