Find answers from the community

Updated 10 months ago

Is there any way to create follow up

Is there any way to create follow up questions to a chat. For example, the api returns a few suggested questions so that user can just click on them instead of typing it? Attached is a screenshot of this feature.
Attachment
image.png
1
t
A
W
7 comments
not native, should just be something like asking the LLM to create follow up questions?
that is a possibility, but i wonder if there are any alternate solution
You can use the Question generator from llamaindex to generate questions based on your queries
wouldn't he need to update all the prompts if he used it anyways?
No, Question generator uses a single prompt: https://github.com/run-llama/llama_index/blob/da5f941662b65d2e3fe2100f2b58c3ba98d49e90/llama-index-core/llama_index/core/question_gen/llm_generators.py#L10C5-L10C37
DEFAULT_SUB_QUESTION_PROMPT_TMPL That is already there unless you want to make some changes in the default prompt you are good with this one.
You could also use structured outputs, and get the llm to output the response to a question. As well as followup questions
Add a reply
Sign up and join the conversation on Discord