Find answers from the community

Updated 2 years ago

Try upping similarity top k during the

At a glance

The post suggests increasing the similarity_top_k parameter during the query call, as the default value is 1. The comments discuss the issue further:

A community member notes that increasing similarity_top_k led to a worse response quality. They ask how to fetch information from other nodes when similarity_top_k=1 (the default), as they are using a vector index with the default mode and response mode.

Another community member suggests that the issue is likely due to the prompt not having a high enough vector similarity to the material being retrieved. They recommend either allowing the system to search over more nodes by increasing top_k, or creating a better prompt.

A third community member adds that using response_mode=tree_summarize will touch more nodes, but it will be slower and more expensive in terms of LLM calls.

The final comment indicates that the suggestions make sense, and the community member will try them.

Try upping similarity_top_k during the query call (by default it’s 1)
K
y
5 comments
The response quality got worse through that unfortunately. How can the system fetch information from other nodes when similarity_top_k=1 (default). Im using a vectoindex, mode=default and response_mode=default. It seems to definately include other nodes but i cannot see them in the results.
If you're searching a vector index, its likely not retrieving the "correct" node in the first try because your prompt doesn't have a high enough vector similarity to the material you're trying to retrieve
You can either allow gpt_index to search over more nodes (by increasing top_k) or you can make a better prompt
response_mode=tree_summarize will touch more nodes but will be slower and more expensive in terms of LLM calls to execute
thanks, makes sense will try!
Add a reply
Sign up and join the conversation on Discord