Find answers from the community

Updated 2 months ago

I am having the most bizarre problem

I am having the most bizarre problem where I successfully load and build an index from 75 documents, but then when I query them, it appears that the LLM only has access to 2 of them and says it doesn't have the context to answer questions not addressing them. Has anyone had this problem?

I have looked over the document loading and even downloaded the index. All 75 documents are present.
L
P
3 comments
The default top-k for a vector index is two. So it fetches the two most relevant documents according to vector similarity. You can adjust this
Plain Text
index.as_query_engine(similarity_top_k=2)
Awesome - thanks @Logan M !
Add a reply
Sign up and join the conversation on Discord