Find answers from the community

Updated last year

Is there any way to create follow up

At a glance

The post asks if there is a way to create follow-up questions in a chat, where the API could return suggested questions that the user can click on instead of typing. The comments discuss possible solutions, including:

- Asking the language model (LLM) to generate follow-up questions

- Using the Question Generator from the llamaindex library to generate questions based on the queries

- Utilizing structured outputs to have the LLM output both the response to a question and follow-up questions

There is no explicitly marked answer in the comments.

Useful resources
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