Setting number of nodes to be retrieved by chat engine #13759
Replies: 2 comments
-
Hello, @sad-mathematician! 👋 I'm here to help you with any bugs, questions, or contributions you have while waiting for a human maintainer. To set the number of nodes to be retrieved by the chat engine using the chat_engine = ContextChatEngine.from_defaults(
retriever=my_retriever,
service_context=my_service_context,
chat_history=my_chat_history,
memory=my_memory,
system_prompt=my_system_prompt,
prefix_messages=my_prefix_messages,
node_postprocessors=my_node_postprocessors,
context_template=my_context_template,
llm=my_llm,
nodes_k=10 # Set the number of nodes to be retrieved
) In this example,
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
How do we set the number of nodes to be retrieved by the chat engine? I am trying to add the nodes_k parameter to the as_chat_engine method
chat_engine = index.as_chat_engine(nodes_k = 10, ......)
but that doesn't seem to be making any difference in the number of nodes retrieved. Is there a different way to set this number of nodes parameter?
Seems to be a trivial thing but I am unable to figure this out. Any help will be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions