{ "class_name": "SequentialWorkFlowGraph", "goal": "Answer the question using multi-hop reasoning grounded in retrieved context.", "tasks": [ { "name": "evidence_select", "description": "Select the minimal set of evidence snippets needed to answer the question (multi-hop).", "inputs": [ { "name": "question", "type": "str", "description": "The question to answer.", "required": true } ], "outputs": [ { "name": "evidence", "type": "list[dict]", "description": "Chosen evidence with source info.", "required": true } ], "prompt": "\"\"\"\nYou are an evidence selector for HotpotQA. From the retrieved question `{question}` with context, select the smallest set of snippets that collectively support the answer through multi-hop reasoning. Ensure that the selected evidence is high-precision and directly relevant to the question. Validate that each piece of evidence contributes meaningfully to the overall understanding and collectively provides sufficient support for multi-hop reasoning. If the evidence is insufficient, contradictory, or ambiguous, indicate that more evidence is needed to support a comprehensive answer. Output XML:\n\n \n {...}\n {...}\n {...}\n {...}\n \n ...\n\n\"\"\"", "prompt_template": { "class_name": "StringTemplate", "instruction": "You are an evidence selector for HotpotQA. From the retrieved question with context, pick the smallest set of snippets that jointly support the answer (multi-hop if needed). Prefer high-precision evidence. Output XML:\n\n \n ...\n ...\n ...\n ...\n \n ...\n" }, "system_prompt": "You are a helpful and highly intelligent assistant.", "parse_mode": "xml", "parse_func": null, "parse_title": null, "tool_names": [] }, { "name": "validate_evidence3555", "description": "Task to validate_evidence3555. Takes evidence as input. Produces validated_evidence as output.", "inputs": [ { "name": "evidence", "type": "str", "description": "Input parameter evidence for validate_evidence3555", "required": false } ], "outputs": [ { "name": "validated_evidence", "type": "str", "description": "Output parameter validated_evidence from validate_evidence3555", "required": true } ], "prompt": "\"\"\"\nThink step by step to answer the question based on the context provided. First, select evidence that is relevant and sufficient for answering the question using the function `evidence_select({question})`. Next, validate the selected evidence to confirm its quality and relevance using the function `validate_evidence3555({evidence})`. If the validated evidence is insufficient or irrelevant, indicate this in the 'thought' field and explain why, including any potential gaps in the evidence. If the evidence is validated and sufficient, explain your reasoning process in the 'thought' field, integrating the validated evidence to support your answer. Finally, provide the answer in the 'answer' field using the function `generate_answer5111({question}, {validated_evidence})`. 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": [ "DDGSSearchToolkit", "WikipediaSearchToolkit", "ArxivToolkit" ] }, { "name": "generate_answer5111", "description": "Task to generate_answer5111. Takes question, validated_evidence as input. Produces answer as output.", "inputs": [ { "name": "question", "type": "str", "description": "Input parameter question for generate_answer5111", "required": false }, { "name": "validated_evidence", "type": "str", "description": "Input parameter validated_evidence for generate_answer5111", "required": false } ], "outputs": [ { "name": "answer", "type": "str", "description": "Output parameter answer from generate_answer5111", "required": true } ], "prompt": "```\nThink step by step to answer the question based on the context provided. First, select evidence that is relevant and sufficient for answering the question `{question}`. Validate the selected evidence by checking its credibility and relevance to the question, and document the validation process along with the criteria used for assessment. If the evidence fails validation, select alternative evidence or indicate that sufficient evidence is not available. Once validated, integrate the context to formulate your answer. Clearly explain your reasoning process in the 'thought' field, ensuring to reference specific details from the validated evidence, and provide the final answer in the 'answer' field. 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": [ "DDGSSearchToolkit", "WikipediaSearchToolkit", "ArxivToolkit" ] } ] }