| { | |
| "class_name": "QASTRUCTUREOptimizer", | |
| "graph": { | |
| "class_name": "SequentialWorkFlowGraph", | |
| "goal": "Provide a concise answer to the question using relevant context. The answer must be straightforward and avoid unnecessary explanations.", | |
| "nodes": [ | |
| { | |
| "class_name": "WorkFlowNode", | |
| "name": "generate_answer", | |
| "description": "Extract and formulate an answer from the given context.", | |
| "inputs": [ | |
| { | |
| "class_name": "Parameter", | |
| "name": "question", | |
| "type": "str", | |
| "description": "The question that needs to be answered.", | |
| "required": true | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "class_name": "Parameter", | |
| "name": "answer", | |
| "type": "str", | |
| "description": "The direct answer to the question.", | |
| "required": true | |
| } | |
| ], | |
| "agents": [ | |
| { | |
| "name": "GenerateAnswerAgent", | |
| "description": "Extract and formulate an answer from the given context.", | |
| "prompt": "\"\"\"\nUse the context provided in `{question}` to determine the best answer. Ensure that your response is accurate and validated against relevant criteria before proceeding. If the context does not provide sufficient information to make a determination, respond with \"Final Answer: No.\" Provide your final answer in a clear format, free from extra commentary or reasoning.\n\"\"\"", | |
| "prompt_template": null, | |
| "system_prompt": "You are a helpful and highly intelligent assistant.", | |
| "inputs": [ | |
| { | |
| "name": "question", | |
| "type": "str", | |
| "description": "The question that needs to be answered.", | |
| "required": true | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "name": "answer", | |
| "type": "str", | |
| "description": "The direct answer to the question.", | |
| "required": true | |
| } | |
| ], | |
| "output_parser": null, | |
| "parse_mode": "xml", | |
| "parse_func": null, | |
| "parse_title": null, | |
| "tool_names": null | |
| } | |
| ], | |
| "status": "pending" | |
| }, | |
| { | |
| "class_name": "WorkFlowNode", | |
| "name": "validate_answer8633", | |
| "description": "Task to validate_answer8633. Takes answer as input. Produces validated_answer as output.", | |
| "inputs": [ | |
| { | |
| "class_name": "Parameter", | |
| "name": "answer", | |
| "type": "str", | |
| "description": "Input parameter answer for validate_answer8633", | |
| "required": false | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "class_name": "Parameter", | |
| "name": "validated_answer", | |
| "type": "str", | |
| "description": "Output parameter validated_answer from validate_answer8633", | |
| "required": true | |
| } | |
| ], | |
| "agents": [ | |
| { | |
| "name": "ValidateAnswer8633Agent", | |
| "description": "Task to validate_answer8633. Takes answer as input. Produces validated_answer as output.", | |
| "prompt": "```xml\n\"\"\"\nIn this task, you will answer the question based on the provided context. Follow these steps carefully:\n\n1. Analyze the question `{question}` to identify key elements and any potential ambiguities.\n2. Validate any assumptions made in the question to ensure they are accurate and relevant.\n3. Validate your answer by checking it against relevant context to ensure accuracy, considering broader implications and prior knowledge.\n4. If the answer is uncertain or ambiguous, clearly state that uncertainty in your response.\n5. If conflicting data is present, prioritize the most reliable sources or evidence to form your conclusion.\n6. Clearly articulate your reasoning process in the `<thought>` field, and provide the final answer in the `<answer>` field.\n\nFormat your output in XML as follows:\n<thought>{your_thought_process}</thought>\n<answer>{your_final_answer}</answer>\n\"\"\"\n```", | |
| "prompt_template": null, | |
| "system_prompt": "You are a helpful and highly intelligent assistant.", | |
| "inputs": [ | |
| { | |
| "name": "answer", | |
| "type": "str", | |
| "description": "Input parameter answer for validate_answer8633", | |
| "required": false | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "name": "validated_answer", | |
| "type": "str", | |
| "description": "Output parameter validated_answer from validate_answer8633", | |
| "required": true | |
| } | |
| ], | |
| "output_parser": null, | |
| "parse_mode": "xml", | |
| "parse_func": null, | |
| "parse_title": null, | |
| "tool_names": null | |
| } | |
| ], | |
| "status": "pending" | |
| }, | |
| { | |
| "class_name": "WorkFlowNode", | |
| "name": "contextualize_answer8048", | |
| "description": "Task to contextualize_answer8048. Takes validated_answer, question as input. Produces final_answer as output.", | |
| "inputs": [ | |
| { | |
| "class_name": "Parameter", | |
| "name": "validated_answer", | |
| "type": "str", | |
| "description": "Input parameter validated_answer for contextualize_answer8048", | |
| "required": false | |
| }, | |
| { | |
| "class_name": "Parameter", | |
| "name": "question", | |
| "type": "str", | |
| "description": "Input parameter question for contextualize_answer8048", | |
| "required": false | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "class_name": "Parameter", | |
| "name": "final_answer", | |
| "type": "str", | |
| "description": "Output parameter final_answer from contextualize_answer8048", | |
| "required": true | |
| } | |
| ], | |
| "agents": [ | |
| { | |
| "name": "ContextualizeAnswer8048Agent", | |
| "description": "Task to contextualize_answer8048. Takes validated_answer, question as input. Produces final_answer as output.", | |
| "prompt": "``` \n\"\"\"\nTo answer the question, analyze the context provided in {question} and extract the relevant information needed to formulate a clear and concise response. Validate any assumptions and ensure your reasoning is logical and directly tied to the context. If there are ambiguities or contradictions, prioritize the most accurate and relevant information. Present your thought process in the <thought> field, detailing how you integrated the context and resolved any ambiguities, and provide the final answer in the <answer> field, adhering to the specified XML format.\n\"\"\"\n```", | |
| "prompt_template": null, | |
| "system_prompt": "You are a helpful and highly intelligent assistant.", | |
| "inputs": [ | |
| { | |
| "name": "validated_answer", | |
| "type": "str", | |
| "description": "Input parameter validated_answer for contextualize_answer8048", | |
| "required": false | |
| }, | |
| { | |
| "name": "question", | |
| "type": "str", | |
| "description": "Input parameter question for contextualize_answer8048", | |
| "required": false | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "name": "final_answer", | |
| "type": "str", | |
| "description": "Output parameter final_answer from contextualize_answer8048", | |
| "required": true | |
| } | |
| ], | |
| "output_parser": null, | |
| "parse_mode": "xml", | |
| "parse_func": null, | |
| "parse_title": null, | |
| "tool_names": null | |
| } | |
| ], | |
| "status": "pending" | |
| }, | |
| { | |
| "class_name": "WorkFlowNode", | |
| "name": "error_handling3133", | |
| "description": "Task to error_handling3133. Takes validated_answer as input. Produces error_checked_answer as output.", | |
| "inputs": [ | |
| { | |
| "class_name": "Parameter", | |
| "name": "validated_answer", | |
| "type": "str", | |
| "description": "Input parameter validated_answer for error_handling3133", | |
| "required": false | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "class_name": "Parameter", | |
| "name": "error_checked_answer", | |
| "type": "str", | |
| "description": "Output parameter error_checked_answer from error_handling3133", | |
| "required": true | |
| } | |
| ], | |
| "agents": [ | |
| { | |
| "name": "ErrorHandling3133Agent", | |
| "description": "Task to error_handling3133. Takes validated_answer as input. Produces error_checked_answer as output.", | |
| "prompt": "``` \nThink step by step to answer the question based on the context provided in {question}. Integrate relevant context into your reasoning process. If the {validated_answer} does not align with the context or contains errors, revisit the answer to ensure it accurately reflects the question's requirements. Provide your reasoning in the <thought> field and the final answer in the <answer> field, ensuring clarity and conciseness.\n```", | |
| "prompt_template": null, | |
| "system_prompt": "You are a helpful and highly intelligent assistant.", | |
| "inputs": [ | |
| { | |
| "name": "validated_answer", | |
| "type": "str", | |
| "description": "Input parameter validated_answer for error_handling3133", | |
| "required": false | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "name": "error_checked_answer", | |
| "type": "str", | |
| "description": "Output parameter error_checked_answer from error_handling3133", | |
| "required": true | |
| } | |
| ], | |
| "output_parser": null, | |
| "parse_mode": "xml", | |
| "parse_func": null, | |
| "parse_title": null, | |
| "tool_names": null | |
| } | |
| ], | |
| "status": "pending" | |
| }, | |
| { | |
| "class_name": "WorkFlowNode", | |
| "name": "revisit_answer6466", | |
| "description": "Task to revisit_answer6466. Takes error_checked_answer, question as input. Produces final_answer as output.", | |
| "inputs": [ | |
| { | |
| "class_name": "Parameter", | |
| "name": "error_checked_answer", | |
| "type": "str", | |
| "description": "Input parameter error_checked_answer for revisit_answer6466", | |
| "required": false | |
| }, | |
| { | |
| "class_name": "Parameter", | |
| "name": "question", | |
| "type": "str", | |
| "description": "Input parameter question for revisit_answer6466", | |
| "required": false | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "class_name": "Parameter", | |
| "name": "final_answer", | |
| "type": "str", | |
| "description": "Output parameter final_answer from revisit_answer6466", | |
| "required": true | |
| } | |
| ], | |
| "agents": [ | |
| { | |
| "name": "RevisitAnswer6466Agent", | |
| "description": "Task to revisit_answer6466. Takes error_checked_answer, question as input. Produces final_answer as output.", | |
| "prompt": "```xml\n\"\"\"\nThink step by step to answer the question based on the context provided in {question}. Integrate relevant context to formulate your answer. In the 'thought' field, explain your reasoning process, including how you addressed any potential conflicts between predictions and ground-truth solutions. Ensure clarity in your explanation regarding significant expression changes. Provide the final answer in the 'answer' field, ensuring it is concise and directly addresses {question}.\nFormat your output in xml format, such as <thought>xxx</thought> and <answer>xxx</answer>.\n\"\"\"\n```", | |
| "prompt_template": null, | |
| "system_prompt": "You are a helpful and highly intelligent assistant.", | |
| "inputs": [ | |
| { | |
| "name": "error_checked_answer", | |
| "type": "str", | |
| "description": "Input parameter error_checked_answer for revisit_answer6466", | |
| "required": false | |
| }, | |
| { | |
| "name": "question", | |
| "type": "str", | |
| "description": "Input parameter question for revisit_answer6466", | |
| "required": false | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "name": "final_answer", | |
| "type": "str", | |
| "description": "Output parameter final_answer from revisit_answer6466", | |
| "required": true | |
| } | |
| ], | |
| "output_parser": null, | |
| "parse_mode": "xml", | |
| "parse_func": null, | |
| "parse_title": null, | |
| "tool_names": null | |
| } | |
| ], | |
| "status": "pending" | |
| } | |
| ], | |
| "edges": [ | |
| { | |
| "class_name": "WorkFlowEdge", | |
| "source": "generate_answer", | |
| "target": "validate_answer8633", | |
| "priority": 0 | |
| }, | |
| { | |
| "class_name": "WorkFlowEdge", | |
| "source": "validate_answer8633", | |
| "target": "contextualize_answer8048", | |
| "priority": 0 | |
| }, | |
| { | |
| "class_name": "WorkFlowEdge", | |
| "source": "validate_answer8633", | |
| "target": "error_handling3133", | |
| "priority": 0 | |
| }, | |
| { | |
| "class_name": "WorkFlowEdge", | |
| "source": "error_handling3133", | |
| "target": "revisit_answer6466", | |
| "priority": 0 | |
| } | |
| ], | |
| "graph": null | |
| }, | |
| "evaluator": null, | |
| "llm": null, | |
| "max_steps": 15, | |
| "eval_every_n_steps": 1, | |
| "eval_rounds": 1, | |
| "convergence_threshold": 5, | |
| "repr_scheme": "python", | |
| "optimize_mode": "all", | |
| "order": "zero-order", | |
| "calltime": 1, | |
| "num_workers": 1 | |
| } |