{ "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 the question `{question}`. Ensure that the output is accurate, directly addresses the question, and is presented in a clear string format. If the information is insufficient or irrelevant, indicate this clearly in the output. Additionally, validate the information for reliability based on established criteria, such as peer-reviewed sources or expert consensus, before proceeding to the next step.\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 validated context from `{searching_output}` to determine the best answer to the question `{question}`. Ensure your reasoning is based on accurate and validated information, and clearly address any conflicting data or ambiguities. After thorough consideration of the context, provide your final answer in a clear format: \"Final Answer: Yes\" or \"Final Answer: No\", adhering strictly to this format.\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_answer7719", "description": "Task to validate_answer7719. Takes question, answer as input. Produces validated_answer as output.", "inputs": [ { "name": "question", "type": "str", "description": "Input parameter question for validate_answer7719", "required": false }, { "name": "answer", "type": "str", "description": "Input parameter answer for validate_answer7719", "required": false } ], "outputs": [ { "name": "validated_answer", "type": "str", "description": "Output parameter validated_answer from validate_answer7719", "required": true } ], "prompt": "```xml\n\"\"\"\nIn this task, you will integrate context to answer the question. First, analyze the {question} and the provided context from {searching_output} to identify key information that will inform your answer. If there are conflicting pieces of information, prioritize the most reliable sources or the context that aligns best with the {question}. After formulating your answer, validate it against the {question} to ensure accuracy. If the answer does not align with the expected outcome, reassess your reasoning and adjust accordingly. Format your output in XML, 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 } ] }