File size: 17,963 Bytes
5374a2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 |
{
"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
} |