Follow-up Questions
1 min read
The service is integrated into the following spaces and modules:
Functionality
The Follow-Up Questions service generates follow-up questions given the user and assistant messages in the conversation history.
Configuration
Default Configuration
{
"languageModel": "AZURE_GPT_35_TURBO_0125",
"additionalLlmOptions": {},
"numberOfFollowUpQuestions": 2,
"adaptToLanguage": true,
"systemMessageSuggestedFollowUpQuery": "Task: Generate ${number_of_questions} suitable follow-up questions based on the conversation history. These questions can either seek clarification on the last answer from the assistant or gather additional interesting information.\n\nAdditional Details:\n- You are provided with a conversation history.\n- Your task is to generate ${number_of_questions} follow-up questions based on the information in the conversation history. The new questions must be related to the user and assistant message provided in the conversation history.\n- The questions should either seek clarification on the last answer provided by the assistant or gather additional interesting information.\n- The questions should be suitable and relevant to the conversation context.\n\n\nExample 1: Conversation History:\n- User: Can you provide an overview of our client's investment portfolio?\n- Assistant: Sure! The portfolio is diversified across stocks, bonds, and real estate.\n- User: How has the portfolio performed over the last year?\n- Assistant: The portfolio has seen a 7% overall growth in the last year.\n\nExample 1 - Follow-up Questions:\n{\n \"questions\": [\n {\n \"explanation\": \"This question is relevant because understanding the performance of individual asset classes can provide deeper insights into the portfolio's overall growth.\"\n \"question\": \"Can you break down the performance of stocks, bonds, and real estate individually?\",\n },\n {\n \"explanation\": \"This question is relevant because knowing the risk level of the portfolio helps in assessing its suitability for the client's financial goals.\"\n \"question\": \"What is the current risk level of the portfolio?\",\n }\n ]\n}\n\n\nExample 2: Conversation History:\n- User: Can you explain the process of onboarding a new client?\n- Assistant: Certainly! The process involves an initial consultation, gathering necessary documentation, conducting a risk assessment, and finally setting up the client's account.\n- User: What kind of documentation is required?\n- Assistant: We typically need identification proof, financial statements, and a completed risk assessment questionnaire.\n\nExample 2 - Follow-up Questions:\n{\n \"questions\": [\n {\n \"explanation\": \"This question is relevant because knowing the specific details of the risk assessment can help in preparing the client for this step.\"\n \"question\": \"What does the risk assessment entail?\",\n },\n {\n \"explanation\": \"This question is relevant because it helps in identifying any potential challenges or delays in the onboarding process.\"\n \"question\": \"Are there any common issues that arise during the onboarding process?\",\n }\n ]\n}\n",
"userMessageSuggestedFollowUpQuery": "Generate ${number_of_questions} suitable follow-up questions based on the conversation history. These questions can either seek clarification on the last answer from the assistant or gather additional interesting information. Strictly follow the JSON output format provided in the system prompt.",
"suggestedFollowUpQuestionMessageTemplate": "---\n\n_Suggested follow-up questions:_\n\n${question_text}\n",
"userMessageLanguageSpecificationText": "Answer in ${language}"
}Fields Documentation
Field Name | Description | Type | Default Value | Required |
|---|---|---|---|---|
| Specifies the language model to be used, either by name or detailed configuration |
| No | |
| Additional parameters for the LLM | dict |
| No |
| Number of follow-up questions to generate | integer |
| No |
| Indicates if the system should adapt responses to the user's language | boolean |
| No |
| Template for system message to generate follow-up questions | string | See default | No |
| Template for user message to generate follow-up questions | string | See default | No |
| Template for formatting suggested follow-up questions | string | See default | No |
| Template for specifying language in user messages | string | See default | No |
Full Json Schema
{
"$defs": {
"EncoderName": {
"enum": [
"o200k_base",
"cl100k_base"
],
"title": "EncoderName",
"type": "string"
},
"LanguageModelInfo": {
"properties": {
"name": {
"anyOf": [
{
"$ref": "#/$defs/LanguageModelName"
},
{
"type": "string"
}
],
"title": "Name"
},
"version": {
"title": "Version",
"type": "string"
},
"provider": {
"$ref": "#/$defs/LanguageModelProvider"
},
"encoder_name": {
"$ref": "#/$defs/EncoderName",
"default": "cl100k_base"
},
"token_limits": {
"$ref": "#/$defs/LanguageModelTokenLimits",
"default": {
"token_limit_input": 7000,
"token_limit_output": 1000
}
},
"capabilities": {
"default": [
"streaming"
],
"items": {
"$ref": "#/$defs/ModelCapabilities"
},
"title": "Capabilities",
"type": "array"
},
"info_cutoff_at": {
"default": null,
"format": "date",
"title": "Info Cutoff At",
"type": "string"
},
"published_at": {
"default": null,
"format": "date",
"title": "Published At",
"type": "string"
},
"retirement_at": {
"default": null,
"format": "date",
"title": "Retirement At",
"type": "string"
},
"deprecated_at": {
"default": null,
"format": "date",
"title": "Deprecated At",
"type": "string"
},
"retirement_text": {
"default": null,
"title": "Retirement Text",
"type": "string"
}
},
"required": [
"name",
"version",
"provider"
],
"title": "LanguageModelInfo",
"type": "object"
},
"LanguageModelName": {
"enum": [
"AZURE_GPT_35_TURBO_0125",
"AZURE_GPT_4_0613",
"AZURE_GPT_4_32K_0613",
"AZURE_GPT_4_TURBO_2024_0409",
"AZURE_GPT_4o_2024_0513",
"AZURE_GPT_4o_2024_0806",
"AZURE_GPT_4o_2024_1120",
"AZURE_GPT_4o_MINI_2024_0718",
"AZURE_o1_MINI_2024_0912",
"AZURE_o1_2024_1217",
"AZURE_o3_MINI_2025_0131",
"AZURE_GPT_45_PREVIEW_2025_0227"
],
"title": "LanguageModelName",
"type": "string"
},
"LanguageModelProvider": {
"enum": [
"AZURE",
"CUSTOM"
],
"title": "LanguageModelProvider",
"type": "string"
},
"LanguageModelTokenLimits": {
"properties": {
"token_limit_input": {
"title": "Token Limit Input",
"type": "integer"
},
"token_limit_output": {
"title": "Token Limit Output",
"type": "integer"
}
},
"required": [
"token_limit_input",
"token_limit_output"
],
"title": "LanguageModelTokenLimits",
"type": "object"
},
"ModelCapabilities": {
"enum": [
"function_calling",
"parallel_function_calling",
"reproducible_output",
"structured_output",
"vision",
"streaming",
"reasoning"
],
"title": "ModelCapabilities",
"type": "string"
}
},
"properties": {
"languageModel": {
"anyOf": [
{
"type": "string"
},
{
"$ref": "#/$defs/LanguageModelName"
},
{
"$ref": "#/$defs/LanguageModelInfo"
}
],
"default": {
"name": "AZURE_GPT_35_TURBO_0125",
"version": "0125",
"provider": "AZURE",
"encoder_name": "cl100k_base",
"token_limits": {
"token_limit_input": 16385,
"token_limit_output": 4096
},
"capabilities": [
"structured_output",
"function_calling",
"parallel_function_calling",
"reproducible_output"
],
"info_cutoff_at": "2021-09-01",
"published_at": "2023-01-25",
"retirement_at": "0005-03-31",
"deprecated_at": null,
"retirement_text": null
}
},
"numberOfFollowUpQuestions": {
"default": 2,
"minimum": 0,
"title": "Numberoffollowupquestions",
"type": "integer"
},
"adaptToLanguage": {
"default": true,
"title": "Adapttolanguage",
"type": "boolean"
},
"systemMessageSuggestedFollowUpQuery": {
"default": "Task: Generate ${number_of_questions} suitable follow-up questions based on the conversation history. These questions can either seek clarification on the last answer from the assistant or gather additional interesting information.\n\nAdditional Details:\n- You are provided with a conversation history.\n- Your task is to generate ${number_of_questions} follow-up questions based on the information in the conversation history. The new questions must be related to the user and assistant message provided in the conversation history.\n- The questions should either seek clarification on the last answer provided by the assistant or gather additional interesting information.\n- The questions should be suitable and relevant to the conversation context.\n\n\nExample 1: Conversation History:\n- User: Can you provide an overview of our client's investment portfolio?\n- Assistant: Sure! The portfolio is diversified across stocks, bonds, and real estate.\n- User: How has the portfolio performed over the last year?\n- Assistant: The portfolio has seen a 7% overall growth in the last year.\n\nExample 1 - Follow-up Questions:\n{\n \"questions\": [\n {\n \"explanation\": \"This question is relevant because understanding the performance of individual asset classes can provide deeper insights into the portfolio's overall growth.\"\n \"question\": \"Can you break down the performance of stocks, bonds, and real estate individually?\",\n },\n {\n \"explanation\": \"This question is relevant because knowing the risk level of the portfolio helps in assessing its suitability for the client's financial goals.\"\n \"question\": \"What is the current risk level of the portfolio?\",\n }\n ]\n}\n\n\nExample 2: Conversation History:\n- User: Can you explain the process of onboarding a new client?\n- Assistant: Certainly! The process involves an initial consultation, gathering necessary documentation, conducting a risk assessment, and finally setting up the client's account.\n- User: What kind of documentation is required?\n- Assistant: We typically need identification proof, financial statements, and a completed risk assessment questionnaire.\n\nExample 2 - Follow-up Questions:\n{\n \"questions\": [\n {\n \"explanation\": \"This question is relevant because knowing the specific details of the risk assessment can help in preparing the client for this step.\"\n \"question\": \"What does the risk assessment entail?\",\n },\n {\n \"explanation\": \"This question is relevant because it helps in identifying any potential challenges or delays in the onboarding process.\"\n \"question\": \"Are there any common issues that arise during the onboarding process?\",\n }\n ]\n}\n",
"pattern": "(?=.*(?:\\$\\{number_of_questions\\}|\\$number_of_questions))",
"title": "Systemmessagesuggestedfollowupquery",
"type": "string"
},
"userMessageSuggestedFollowUpQuery": {
"default": "Generate ${number_of_questions} suitable follow-up questions based on the conversation history. These questions can either seek clarification on the last answer from the assistant or gather additional interesting information. Strictly follow the JSON output format provided in the system prompt.",
"pattern": "(?=.*(?:\\$\\{number_of_questions\\}|\\$number_of_questions))",
"title": "Usermessagesuggestedfollowupquery",
"type": "string"
},
"suggestedFollowUpQuestionMessageTemplate": {
"default": "---\n\n_Suggested follow-up questions:_\n\n${question_text}\n",
"pattern": "(?=.*(?:\\$\\{question_text\\}|\\$question_text))",
"title": "Suggestedfollowupquestionmessagetemplate",
"type": "string"
},
"userMessageLanguageSpecificationText": {
"default": "Answer in ${language}",
"pattern": "(?=.*(?:\\$\\{language\\}|\\$language))",
"title": "Usermessagelanguagespecificationtext",
"type": "string"
}
},
"title": "FollowUpQuestionsConfig",
"type": "object"
}