Find answers from the community

Updated 3 weeks ago

Bm25

I keep getting error for this :

bm25_retriever = BM25Retriever.from_defaults(nodes=text_nodes, similarity_top_k=2)

error:
~llama_index/retrievers/bm25/base.py", line 119, in from_defaults
raise ValueError("Please pass exactly one of index, nodes, or docstore.")
ValueError: Please pass exactly one of index, nodes, or docstore.

Even tho I am passing the textnodes
L
T
3 comments
I'd have to check the source code, but I'm pretty sure you can pass the nodes to the constructor directly
Thank you ! I was able to get it working !
Add a reply
Sign up and join the conversation on Discord