Find answers from the community

Updated 3 months ago

When querying an index how do I define

When querying an index, how do I define that I only want to return data from 1 source?
b
L
4 comments
Is it through the "response_kwargs" parameter? I tried passing {"k":1} to that but it didn't work
try index.as_query_engine(similarity_top_k=1)
Assuming you are using a vector index of course
That did the trick. Thanks!
Add a reply
Sign up and join the conversation on Discord