Find answers from the community

Updated 3 months ago

Anyone knows if there s a way to query

Anyone knows if there's a way to query again new nodes every time in chat_engine?

from llama_index.chat_engine import CondenseQuestionChatEngine

Plain Text
query_engine = index.as_query_engine()
chat_engine = CondenseQuestionChatEngine.from_defaults(
    query_engine=query_engine, 
    condense_question_prompt=custom_prompt,
    chat_history=custom_chat_history,
    verbose=True
)
response = chat_engine.chat("what about the deeplink issue?")
print(response)


Here's my code and it doesn't query anything related to deeplink. Instead, it query something related to my custom chat history.
W
g
3 comments
Hi @Senna

When you use CondenseChatEngine
  • Two LLM call occurs in this mode
First one queries your chat history and forms a query which will be used to query the docs in second LLM call.

You can try printing the first LLM call output and see if it is changing your query to something else
Thanks @WhiteFang_Jr but you responded to @Senna's question πŸ™‚
My bad πŸ˜… @gpayan
Add a reply
Sign up and join the conversation on Discord