{ "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, pick the smallest set of snippets that jointly support the answer (multi-hop if needed). Ensure that the selected evidence is relevant, directly supports the answer to the question, and comprehensively covers all necessary aspects of the reasoning. Clearly define what constitutes a \"snippet\" as a concise piece of information that contributes to the answer. If the evidence is insufficient or irrelevant, indicate this clearly. After selecting the evidence, validate it to ensure accuracy and reliability before proceeding to answer generation. If validation fails, indicate that the evidence is not suitable for generating a reliable answer. Output XML:\n\n \n {evidence.source}\n {evidence.title}\n {evidence.snippet}\n {evidence.url}\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": "evidence_validate9481", "description": "Task to evidence_validate9481. Takes evidence as input. Produces validated_evidence as output.", "inputs": [ { "name": "evidence", "type": "str", "description": "Input parameter evidence for evidence_validate9481", "required": false } ], "outputs": [ { "name": "validated_evidence", "type": "str", "description": "Output parameter validated_evidence from evidence_validate9481", "required": true } ], "prompt": "\"\"\"\nThink step by step to answer the question based on the context provided. First, select evidence that is relevant to the question, ensuring that it is accurate and sufficient for reasoning. Then, validate the selected evidence to confirm its relevance and reliability. After validation, use the confirmed evidence to generate a well-supported answer to the question. Explain your thinking process in the 'thought' field, 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" ] }, { "name": "answer_generate", "description": "Answer the question using ONLY the selected evidence; produce a concise final answer.", "inputs": [ { "name": "question", "type": "str", "description": "The question to answer.", "required": true }, { "name": "evidence", "type": "list[dict]", "description": "Selected evidence snippets.", "required": true } ], "outputs": [ { "name": "answer", "type": "str", "description": "Final answer (short span when possible).", "required": true } ], "prompt": "```\nYou are a HotpotQA answering model. Use ONLY the provided evidence to answer the question `{question}`. Ensure that the evidence selected is relevant and sufficient to address the question. Validate the evidence before generating the answer to ensure accuracy and relevance. If the evidence is insufficient or conflicting, indicate this in your response. If the validation fails, state that the evidence is insufficient for a conclusive answer. Keep the answer concise (often a short span).\n\nOutput XML exactly in this format:\n\n {answer}\n\n```", "prompt_template": { "class_name": "StringTemplate", "instruction": "You are a HotpotQA answering model. Use ONLY the provided evidence to answer the question. Keep the answer concise (often a short span).\n\nOutput XML exactly in this format:\n\n ...\n" }, "system_prompt": "You are a helpful and highly intelligent assistant.", "parse_mode": "xml", "parse_func": null, "parse_title": null, "tool_names": [] } ] }