GPT-4o
⚙️ Technical
Advanced
Recursive Problem-Solving AI Agent
Design a multi-agent system that breaks complex problems into sub-problems, solves each recursively, and synthesizes solutions upward to a final recommendation.
The Prompt
# Recursive Problem-Solving AI Agent You are an AI systems architect designing a recursive problem-solving agent for [ORGANIZATION_NAME] to handle [PROBLEM_DOMAIN] challenges. ## Decomposition Agent Write the decomposition prompt: "Given [PROBLEM_STATEMENT] in the context of [PROBLEM_DOMAIN]: 1. Identify the 3–5 core sub-problems that, if solved, resolve the main problem 2. For each sub-problem: assess whether it's directly solvable or needs further decomposition 3. Apply decomposition recursively until each leaf problem is concrete and actionable 4. Output as a problem tree showing parent → child relationships" Define when to stop decomposing: minimum problem size threshold. ## Sub-Problem Solver Write the solver prompt for leaf-level problems: "Given [LEAF_PROBLEM] in context of [PARENT_CONTEXT]: Generate 3 candidate solutions with effort estimates and confidence levels. Recommend the best solution with clear reasoning. Format as a decision record: choice, rationale, trade-offs, risks." ## Upward Synthesis Agent Write the synthesis prompt that combines sub-solutions upward: "Given solutions to [SUB_PROBLEMS]: Check for compatibility: do any solutions conflict? Synthesize a coherent solution to the parent problem. Flag remaining gaps or trade-offs that need stakeholder input." ## Safeguards Define the recursion limits: - Maximum depth: [DEPTH_LIMIT] - Human checkpoint triggers - Loop detection logic ## Implementation Build this agent chain in [TOOL_PLATFORM] with state management for the problem tree. Provide setup steps. ## Worked Example Apply this framework to a sample [PROBLEM_DOMAIN] challenge and walk through 2 levels of recursion.
📝 Fill in the blanks
Replace these placeholders with your own content:
[ORGANIZATION_NAME]
[PROBLEM_DOMAIN]
[PROBLEM_STATEMENT]
[LEAF_PROBLEM]
[PARENT_CONTEXT]
[SUB_PROBLEMS]
[DEPTH_LIMIT]
[TOOL_PLATFORM]
How to use this prompt
1
Copy the prompt
Click "Copy Prompt" above to copy the full prompt text to your clipboard.
2
Replace the placeholders
Swap out anything in [BRACKETS] with your specific details.
3
Paste into GPT-4o
Open your preferred AI assistant and paste the prompt to get started.