{
"class_name": "SequentialWorkFlowGraph",
"goal": "Answer user questions accurately and concisely by decomposing the problem into analysis and generate.",
"tasks": [
{
"name": "generate_answer",
"description": "Draft an answer using the retrieved context.",
"inputs": [
{
"name": "question",
"type": "str",
"description": "The original question from the user.",
"required": true
}
],
"outputs": [
{
"name": "draft_answer",
"type": "str",
"description": "A concise, direct answer to the question.",
"required": true
}
],
"prompt": "\"\"\"\nYou can think to generate answers based on the provided {question}. Ensure that your response is clear and concise, considering whether a simple \"Yes\" or \"No\" is sufficient or if a more nuanced answer is required. If the {question} is ambiguous or lacks detail, indicate this in your response and suggest specific clarifying questions to gather more information. Format your final answer in the 'answer' field as xxx. If the draft answer requires significant revision, note the necessary changes before proceeding to validation. Prioritize and weigh evidence carefully to enhance the reliability of your answer.\n\"\"\"",
"prompt_template": {
"class_name": "StringTemplate",
"instruction": "You can think to generate answers. You should provide the final answer (either Yes or No) in the 'answer' field. Format your answer in xxx."
},
"system_prompt": "You are a helpful and highly intelligent assistant.",
"parse_mode": "xml",
"parse_func": null,
"parse_title": null,
"tool_names": null,
"tools": null
},
{
"name": "validate_answer9330",
"description": "Task to validate_answer9330. Takes draft_answer as input. Produces validated_answer as output.",
"inputs": [
{
"name": "draft_answer",
"type": "str",
"description": "Input parameter draft_answer for validate_answer9330",
"required": false
}
],
"outputs": [
{
"name": "validated_answer",
"type": "str",
"description": "Output parameter validated_answer from validate_answer9330",
"required": true
}
],
"prompt": "\"\"\"\nThink step by step to answer the question based on the context provided in {question}. Begin by identifying the key components, underlying issues, and any ambiguities within the question. In the 'thought' field, explain your reasoning process, detailing how you arrived at your conclusions and addressing any complexities present in the question. If ambiguities are identified, clarify them before proceeding. Then, provide a clear and concise final answer in the 'answer' field, ensuring it is directly relevant to the user's needs. Format your output in XML format, such as {thought} and {answer}.\n\"\"\"",
"prompt_template": {
"class_name": "StringTemplate",
"instruction": "Think step by step to answer the question based on the question context. You should integrate context for answering. You should explain your thinking process in the 'thought' field, and provide the final answer in the 'answer' field.\nFormat your output in xml format, such as xxx and xxx."
},
"system_prompt": "You are a helpful and highly intelligent assistant.",
"parse_mode": "xml",
"parse_func": null,
"parse_title": null,
"tool_names": null,
"tools": null
},
{
"name": "evaluate_answer9619",
"description": "Task to evaluate_answer9619. Takes validated_answer as input. Produces evaluation_score as output.",
"inputs": [
{
"name": "validated_answer",
"type": "str",
"description": "Input parameter validated_answer for evaluate_answer9619",
"required": false
}
],
"outputs": [
{
"name": "evaluation_score",
"type": "str",
"description": "Output parameter evaluation_score from evaluate_answer9619",
"required": true
}
],
"prompt": "\"\"\"\nThink step by step to answer the question based on the context provided in {question}. Begin by analyzing the key components of the question to identify the main issue and any underlying factors. If the question is ambiguous, clarify the necessary details before proceeding. Integrate this context into your reasoning process. In the 'thought' field, explain your reasoning, how you arrived at your conclusion, and any clarifications made. Provide the final answer in the 'answer' field, ensuring it directly addresses the main issue identified. Format your output in XML format, such as {thought} and {answer}. Additionally, ensure that your answer is validated against predefined criteria for accuracy and relevance before finalizing it, and be prepared to revisit earlier steps based on the evaluation score if necessary.\n\"\"\"",
"prompt_template": {
"class_name": "StringTemplate",
"instruction": "Think step by step to answer the question based on the question context. You should integrate context for answering. You should explain your thinking process in the 'thought' field, and provide the final answer in the 'answer' field.\nFormat your output in xml format, such as xxx and xxx."
},
"system_prompt": "You are a helpful and highly intelligent assistant.",
"parse_mode": "xml",
"parse_func": null,
"parse_title": null,
"tool_names": null,
"tools": null
},
{
"name": "context_analysis3328",
"description": "Task to context_analysis3328. Takes question as input. Produces context as output.",
"inputs": [
{
"name": "question",
"type": "str",
"description": "Input parameter question for context_analysis3328",
"required": false
}
],
"outputs": [
{
"name": "context",
"type": "str",
"description": "Output parameter context from context_analysis3328",
"required": true
}
],
"prompt": "```xml\n\"\"\"\nAnalyze the context of the question step by step to ensure a relevant and accurate response. Begin by identifying key components of the question and any potential ambiguities. Explain your thought process clearly in the field, detailing how you arrived at your conclusions. Provide the final answer in the field, ensuring it directly addresses the clarified question. Format your output in XML, using {thought} and {answer}.\n\"\"\"\n```",
"prompt_template": {
"class_name": "StringTemplate",
"instruction": "Think step by step to answer the question based on the question context. You should integrate context for answering. You should explain your thinking process in the 'thought' field, and provide the final answer in the 'answer' field.\nFormat your output in xml format, such as xxx and xxx."
},
"system_prompt": "You are a helpful and highly intelligent assistant.",
"parse_mode": "xml",
"parse_func": null,
"parse_title": null,
"tool_names": null,
"tools": null
},
{
"name": "handle_ambiguities7850",
"description": "Task to handle_ambiguities7850. Takes context as input. Produces clarified_question as output.",
"inputs": [
{
"name": "context",
"type": "str",
"description": "Input parameter context for handle_ambiguities7850",
"required": false
}
],
"outputs": [
{
"name": "clarified_question",
"type": "str",
"description": "Output parameter clarified_question from handle_ambiguities7850",
"required": true
}
],
"prompt": "```xml\n\"\"\"\nTo effectively answer the question, follow these steps:\n\n1. Analyze the context derived from `{context}` to identify any specific nuances or details that may influence the answer.\n2. If ambiguities are present, clarify the question by addressing specific aspects that need further explanation or detail.\n3. Integrate the clarified context into your reasoning process to ensure the answer is relevant and comprehensive.\n4. Provide a clear and concise final answer in the `{answer}` field, ensuring it directly addresses the user's inquiry and incorporates any necessary details or examples.\n\nFormat your output in XML format, using to explain your reasoning process and for the final response.\n\"\"\"\n```",
"prompt_template": {
"class_name": "StringTemplate",
"instruction": "Think step by step to answer the question based on the question context. You should integrate context for answering. You should explain your thinking process in the 'thought' field, and provide the final answer in the 'answer' field.\nFormat your output in xml format, such as xxx and xxx."
},
"system_prompt": "You are a helpful and highly intelligent assistant.",
"parse_mode": "xml",
"parse_func": null,
"parse_title": null,
"tool_names": null,
"tools": null
},
{
"name": "feedback_loop7764",
"description": "Task to feedback_loop7764. Takes evaluation_score, draft_answer as input. Produces improved_answer as output.",
"inputs": [
{
"name": "evaluation_score",
"type": "str",
"description": "Input parameter evaluation_score for feedback_loop7764",
"required": false
},
{
"name": "draft_answer",
"type": "str",
"description": "Input parameter draft_answer for feedback_loop7764",
"required": false
}
],
"outputs": [
{
"name": "improved_answer",
"type": "str",
"description": "Output parameter improved_answer from feedback_loop7764",
"required": true
}
],
"prompt": "\"\"\"\nThink step by step to answer the question based on the context derived from {question}. Begin by analyzing the context to identify any ambiguities or complexities in the inquiry. Then, integrate this context into your reasoning process to formulate a well-informed answer. In the 'thought' field, explain your reasoning, including how the context influenced your answer. Provide the final answer in the 'answer' field, ensuring it is clear and directly addresses the user's question.\nFormat your output in xml format, such as xxx and xxx.\n\"\"\"",
"prompt_template": {
"class_name": "StringTemplate",
"instruction": "Think step by step to answer the question based on the question context. You should integrate context for answering. You should explain your thinking process in the 'thought' field, and provide the final answer in the 'answer' field.\nFormat your output in xml format, such as xxx and xxx."
},
"system_prompt": "You are a helpful and highly intelligent assistant.",
"parse_mode": "xml",
"parse_func": null,
"parse_title": null,
"tool_names": null,
"tools": null
}
]
}