Find answers from the community

Updated 4 months ago

Condensepluscontext

At a glance

The community member is using the CondensePlusContextChatEngine and wants to know how to generate questions from their question. The comments suggest that the chat mode is already condensing a new question based on the query and previous chat history, and the community member should check the response object. The comments also mention that the community member can check the questionGenerator module for generating more questions. However, the community member is having trouble finding the generated questions in the response. The comments explain that the updated question is found under the ToolOutput object, but it may not be visible in the first run and will start modifying the question when there is a chat history.

Useful resources
Hi all.

I am using CondensePlusContextChatEngine. How can I generate questions from my question?

Thanks!
W
B
9 comments
This chat mode is already condensing a new question based on your new query and previous chat history.
You need to check the response object, it is present inside that
Thank you, it would be great if it's available in the response. Which part of this response does it belong to? Can you give me an example?
Attachment
image.png
You'll find it under sources
Attachment
image.png
I use print(str(response.sources)) and it only shows the content within ToolOutput. But I don't see any new questions being generated.
Yes under ToolOutput object you are getting raw_input={"message": condensed_question}, In this you'll find updated question based on your question.
Do note it will not show updated question in the first run , it will start modifying the question when it has a chat history.
I find it more like an answer rather than a question.
No it is a question only, formed based on your chat-history
I asked about error E1, and in the provided data, after receiving the answer, the raw_input data looks like this:

My chat_engine:
chat_engine = CondensePlusContextChatEngine.from_defaults(
retriever,
llm=llm,
context_prompt=prompt_tmpl,
verbose=False,
chat_history=custom_chat_history,
condense_prompt=condense_prompt,
node_postprocessors=[node_postprocessor],
skip_condense=False,
callback_manager=callback_manager
)

response.sources[0].raw_input

{'message': 'Error E1 is often related to problems during device operation. Please check the power connection and related devices.'}
Add a reply
Sign up and join the conversation on Discord