Log in
Log into community
Find answers from the community
View all posts
Related posts
Did this answer your question?
๐
๐
๐
Powered by
Hall
Inactive
Updated 8 months ago
0
Follow
Chat
Chat
Inactive
0
Follow
k
kolaente
8 months ago
ยท
Is there a way to filter out retrieved documents with a low top_k value in chat? It seems like I can do that when querying, but not during chat (calling
chat_engine.chat())
):
https://github.com/run-llama/llama_index/issues/905#issuecomment-1484288684
W
k
5 comments
Share
Open in Discord
W
WhiteFang_Jr
8 months ago
You can do the same for chat engine as well.
You can set it like this
Plain Text
Copy
chat_engine = index.as_chat_engine(..., similarity_top_k=3)
k
kolaente
8 months ago
Doesn't that only configure the number of results used in the response?
k
kolaente
8 months ago
I'd like to prevent using results with a score of < 0.5 or similar
W
WhiteFang_Jr
8 months ago
You can pass similarity node post processor alongside top_k.
https://docs.llamaindex.ai/en/stable/module_guides/querying/node_postprocessors/node_postprocessors/?h=similarity#similaritypostprocessor
k
kolaente
8 months ago
That looks like what I need, thanks!
Add a reply
Sign up and join the conversation on Discord
Join on Discord