| { | |
| "class_name": "SequentialWorkFlowGraph", | |
| "goal": "Provide a concise answer to the question using relevant context. The answer must be straightforward and avoid unnecessary explanations.", | |
| "tasks": [ | |
| { | |
| "name": "search_info", | |
| "description": "Extract the information and search.", | |
| "inputs": [ | |
| { | |
| "name": "question", | |
| "type": "str", | |
| "description": "The question that needs to be answered.", | |
| "required": true | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "name": "searching_output", | |
| "type": "str", | |
| "description": "The direct output after searching.", | |
| "required": true | |
| } | |
| ], | |
| "prompt": "\"\"\"\nPlease search for and return relevant information related to `{question}`. Ensure that the information is accurate, pertinent, and reliable. If the search output is insufficient, irrelevant, or contains conflicting information, indicate this clearly and summarize the most reliable points. The output format should be in string.\n\"\"\"", | |
| "prompt_template": { | |
| "class_name": "StringTemplate", | |
| "instruction": "Please search and return the related information in the question. The output format should be in string." | |
| }, | |
| "system_prompt": "You are a helpful and highly intelligent assistant.", | |
| "parse_mode": "str", | |
| "parse_func": null, | |
| "parse_title": null, | |
| "tool_names": [ | |
| "PertToolkit" | |
| ] | |
| }, | |
| { | |
| "name": "generate_answer", | |
| "description": "Extract and formulate an answer from the given context.", | |
| "inputs": [ | |
| { | |
| "name": "question", | |
| "type": "str", | |
| "description": "The question that needs to be answered.", | |
| "required": true | |
| }, | |
| { | |
| "name": "searching_output", | |
| "type": "str", | |
| "description": "Search information", | |
| "required": true | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "name": "answer", | |
| "type": "str", | |
| "description": "The direct answer to the question.", | |
| "required": true | |
| } | |
| ], | |
| "prompt": "\"\"\"\nUse the context from `{searching_output}` to determine the best answer to `{question}`. Provide your final answer in a clear format, ensuring it is concise and directly addresses the question. Validate the accuracy of your reasoning based on the context before presenting the final answer. If the question allows for a nuanced response, provide that instead of a binary answer. Aim for clarity and relevance in your response.\n\"\"\"", | |
| "prompt_template": { | |
| "class_name": "StringTemplate", | |
| "instruction": "Use the context to determine the best answer to the question. Provide your final answer in a clear format (Yes or No) after reasoning." | |
| }, | |
| "system_prompt": "You are a helpful and highly intelligent assistant.", | |
| "parse_mode": "xml", | |
| "parse_func": null, | |
| "parse_title": null, | |
| "tool_names": [ | |
| "PertToolkit" | |
| ] | |
| }, | |
| { | |
| "name": "validate_answer8133", | |
| "description": "Task to validate_answer8133. Takes answer as input. Produces validated_answer as output.", | |
| "inputs": [ | |
| { | |
| "name": "answer", | |
| "type": "str", | |
| "description": "Input parameter answer for validate_answer8133", | |
| "required": false | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "name": "validated_answer", | |
| "type": "str", | |
| "description": "Output parameter validated_answer from validate_answer8133", | |
| "required": true | |
| } | |
| ], | |
| "prompt": "```xml\n\"\"\"\nTo answer the question, first analyze the context provided in {question} and the information retrieved in {searching_output}. Carefully evaluate the relevance and accuracy of the data to ensure the answer is correct. If there are ambiguities or conflicting information, identify these issues and clarify them before finalizing the response. Format your output as follows: \n<thought>Explain your reasoning process based on the context and information available, addressing any ambiguities or conflicts that may arise.</thought> \n<answer>Provide a clear and concise answer to {question} based on your analysis.</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": "handle_ambiguities7541", | |
| "description": "Task to handle_ambiguities7541. Takes question, validated_answer as input. Produces final_answer as output.", | |
| "inputs": [ | |
| { | |
| "name": "question", | |
| "type": "str", | |
| "description": "Input parameter question for handle_ambiguities7541", | |
| "required": false | |
| }, | |
| { | |
| "name": "validated_answer", | |
| "type": "str", | |
| "description": "Input parameter validated_answer for handle_ambiguities7541", | |
| "required": false | |
| } | |
| ], | |
| "outputs": [ | |
| { | |
| "name": "final_answer", | |
| "type": "str", | |
| "description": "Output parameter final_answer from handle_ambiguities7541", | |
| "required": true | |
| } | |
| ], | |
| "prompt": "```xml\n\"\"\"\nFor the 4-th task, carefully analyze the {question} and the {validated_answer}. Ensure that the answer is relevant and accurate by integrating the context provided in the {question}. If there are any ambiguities or uncertainties in the {question}, clarify them before finalizing the answer. Your output should include a thought process that explains how you arrived at the final answer, ensuring that it effectively incorporates the context. Format your output as follows: <thought>your_thought_process_here</thought> and <answer>your_final_answer_here</answer>. Additionally, validate the correctness of the {validated_answer} against the {question} to ensure reliability before finalizing.\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 | |
| } | |
| ] | |
| } |