Find answers from the community

Updated 6 months ago

Hello, is it possible to use define

At a glance

The community member in the post is asking if it is possible to set the similarity_top_k parameter for the Chat Engine, in order to control the number of nodes retrieved in each call. A community member responds that the similarity_top_k parameter can be set when creating the chat engine, providing an example of how to do this.

Hello, is it possible to use define something like similarity_top_k=3, for the Chat Engine? I want to use the ChatMode but i am not sure how to control how many nodes to retrieve in each call
T
1 comment
You should be able to do:
Plain Text
chat_engine = index.as_chat_engine(
                similarity_top_k=2, service_context=service_context)
Add a reply
Sign up and join the conversation on Discord