selfevolveagent / examples /pubmedqa /debug /optimized_ourmethod_gpt4omini_20step_generate_new.json
iLOVE2D's picture
Upload 2846 files
5374a2d verified
{
"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. Begin by breaking down the {question} into its key components to understand the context better. Analyze each component thoroughly and synthesize the information to provide a clear and accurate response. Ensure that your draft answer is contextually accurate and directly addresses the key components of the {question}. If the draft answer is significantly different from the expected solution or lacks clarity, reconsider the analysis and adjust accordingly. After generating the draft answer, validate it against the {question} to ensure its relevance and correctness based on clear criteria such as accuracy, completeness, and alignment with the {question}'s intent. If any ambiguity arises in the {question}, clarify it before finalizing the answer. Format your final answer in <answer>{final_answer}</answer>, where '{final_answer}' is either a nuanced response or a direct answer based on the analysis. Consider any necessary context or examples that may enhance understanding.\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 <answer>xxx</answer>."
},
"system_prompt": "You are a helpful and highly intelligent assistant.",
"parse_mode": "xml",
"parse_func": null,
"parse_title": null,
"tool_names": null
},
{
"name": "validate_answer5329",
"description": "Task to validate_answer5329. Takes draft_answer, question as input. Produces validated_answer as output.",
"inputs": [
{
"name": "draft_answer",
"type": "str",
"description": "Input parameter draft_answer for validate_answer5329",
"required": false
},
{
"name": "question",
"type": "str",
"description": "Input parameter question for validate_answer5329",
"required": false
}
],
"outputs": [
{
"name": "validated_answer",
"type": "str",
"description": "Output parameter validated_answer from validate_answer5329",
"required": true
}
],
"prompt": "\"\"\"\nThink step by step to answer the question based on the context provided in {question}. First, analyze the key components of the question to identify the main issue and any underlying factors. Then, generate a draft answer that directly addresses the inquiry, ensuring it is clear and concise. After generating the draft answer, validate its accuracy by checking it against the context of {question} to ensure it meets the necessary criteria. If the question is ambiguous or lacks detail, consider how to handle this ambiguity by asking clarifying questions. Finally, provide the validated answer in the specified format. Format your output in xml format, such as <thought>xxx</thought> and <answer>xxx</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 <thought>xxx</thought> and <answer>xxx</answer>."
},
"system_prompt": "You are a helpful and highly intelligent assistant.",
"parse_mode": "xml",
"parse_func": null,
"parse_title": null,
"tool_names": null
},
{
"name": "cross_reference4308",
"description": "Task to cross_reference4308. Takes validated_answer as input. Produces final_answer as output.",
"inputs": [
{
"name": "validated_answer",
"type": "str",
"description": "Input parameter validated_answer for cross_reference4308",
"required": false
}
],
"outputs": [
{
"name": "final_answer",
"type": "str",
"description": "Output parameter final_answer from cross_reference4308",
"required": true
}
],
"prompt": "\"\"\"\nThink step by step to answer the question based on the context of {question}. First, analyze the components of {question} to identify the main issue and any relevant sub-issues. Then, generate an initial response in {draft_answer}. After that, validate {draft_answer} against {question} to ensure accuracy and relevance, producing {validated_answer}. If there are ambiguities or if the initial answer requires further clarification, handle these issues by refining {question} to create {clarified_question}. Finally, provide the final answer based on the validated response and context. Format your output in xml format, such as <thought>xxx</thought> and <answer>xxx</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 <thought>xxx</thought> and <answer>xxx</answer>."
},
"system_prompt": "You are a helpful and highly intelligent assistant.",
"parse_mode": "xml",
"parse_func": null,
"parse_title": null,
"tool_names": null
},
{
"name": "handle_ambiguity7495",
"description": "Task to handle_ambiguity7495. Takes question as input. Produces clarified_question as output.",
"inputs": [
{
"name": "question",
"type": "str",
"description": "Input parameter question for handle_ambiguity7495",
"required": false
}
],
"outputs": [
{
"name": "clarified_question",
"type": "str",
"description": "Output parameter clarified_question from handle_ambiguity7495",
"required": true
}
],
"prompt": "```xml\n\"\"\"\nWhen addressing the question, first analyze the context and identify any potential ambiguities. If the question is unclear or has multiple interpretations, provide a clarification request in the 'clarified_question' output. If the question is clear, proceed to generate an answer based on the key components identified. In the 'thought' field, explain your reasoning process, detailing how you arrived at the answer. After generating the answer, validate it against the original question to ensure accuracy and relevance. Only validated answers should be cross-referenced for additional information. Format your output in XML, such as <thought>{thought}</thought> and <answer>{answer}</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 <thought>xxx</thought> and <answer>xxx</answer>."
},
"system_prompt": "You are a helpful and highly intelligent assistant.",
"parse_mode": "xml",
"parse_func": null,
"parse_title": null,
"tool_names": null
},
{
"name": "feedback_loop3430",
"description": "Task to feedback_loop3430. Takes final_answer as input. ",
"inputs": [
{
"name": "final_answer",
"type": "str",
"description": "Input parameter final_answer for feedback_loop3430",
"required": false
}
],
"outputs": [],
"prompt": "```\n\"\"\"\nFor the 5-th task, follow these refined instructions:\n\n1. **Contextual Understanding**: Carefully analyze the context of the question to ensure a comprehensive understanding of what is being asked. Identify any ambiguous terms or phrases that may require clarification.\n\n2. **Step-by-Step Reasoning**: Break down the thought process into clear, logical steps. Consider each component of the question and how they relate to one another.\n\n3. **Validation Criteria**: Ensure that the generated answer meets the following criteria:\n - Relevance: The answer must directly address the clarified question.\n - Accuracy: The information provided should be factually correct and well-supported by evidence or examples.\n - Clarity: The answer should be articulated in a clear and concise manner, avoiding unnecessary jargon.\n\n4. **Final Answer Construction**: Based on the analysis and validation, formulate a final answer that encapsulates the key points derived from the reasoning process.\n\n5. **Output Format**: Present your thought process in the `<thought>` field and the final answer in the `<answer>` field, ensuring that both are well-structured and easy to understand.\n\nFormat your output in XML format, such as <thought>{thought}</thought> and <answer>{answer}</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 <thought>xxx</thought> and <answer>xxx</answer>."
},
"system_prompt": "You are a helpful and highly intelligent assistant.",
"parse_mode": "xml",
"parse_func": null,
"parse_title": null,
"tool_names": null
}
]
}