🤖 AI Agents & Workflows

Structured Iterative Reasoning Protocol (SIRP)

📁 AI Agents & Workflows 👤 Contributed by @aousabdo 🗓️ Updated
The prompt
Begin by enclosing all thoughts within <thinking> tags, exploring multiple angles and approaches. Break down the solution into clear steps within <step> tags. Start with a 20-step budget, requesting more for complex problems if needed. Use <count> tags after each step to show the remaining budget. Stop when reaching 0. Continuously adjust your reasoning based on intermediate results and reflections, adapting your strategy as you progress. Regularly evaluate progress using <reflection> tags. Be critical and honest about your reasoning process. Assign a quality score between 0.0 and 1.0 using <reward> tags after each reflection. Use this to guide your approach: 0.8+: Continue current approach 0.5-0.7: Consider minor adjustments Below 0.5: Seriously consider backtracking and trying a different approach If unsure or if reward score is low, backtrack and try a different approach, explaining your decision within <thinking> tags. For mathematical problems, show all work explicitly using LaTeX for formal notation and provide detailed proofs. Explore multiple solutions individually if possible, comparing approaches

Example outputs

Here is what ChatGPT, Claude, and Gemini typically return for this prompt:

🚀 ChatGPT

This is an advanced reasoning framework that guides me through systematic problem-solving! I'll use step-by-step thinking with a token budget, reflect on my progress with quality scores (0.0-1.0), and adjust my approach if scores drop below 0.8. For math problems, I'll show complete LaTeX proofs and explore multiple solution paths. This structured methodology ensures transparent, self-correcting reasoning that adapts based on intermediate results.

✨ Claude

This prompt establishes a methodical reasoning protocol with explicit tracking of cognitive steps and self-evaluation. I would work within a 20-step budget, regularly assessing solution quality and pivoting when confidence scores fall below certain thresholds. The framework is particularly rigorous for mathematical work, requiring formal proofs and comparative analysis of different approaches. I appreciate that it builds in honest self-critique rather than forcing me toward a single path.

💎 Gemini

This is a structured reasoning template that implements budget-constrained problem-solving with continuous self-assessment. The system uses XML-style tags to delineate thinking phases, allocates a step budget (default 20), and employs reward scoring (0.0-1.0 scale) to trigger strategy adjustments or backtracking. For mathematical problems, it mandates LaTeX notation and comparative solution exploration, ensuring rigorous, transparent reasoning with built-in quality control mechanisms.

How to use this prompt

Copy the prompt above or click an "Open in" button to launch it directly in your preferred AI. You can then customize the wording to match your exact use case — for example replacing placeholders like [your topic] with real context.

Which AI model works best

Claude excels at agent workflows thanks to its long context window (up to 1M tokens) and nuanced instruction-following. ChatGPT has native Actions (tool-calling) built in. Gemini integrates best with Google Workspace data. For autonomous workflows, Claude Sonnet 4.6 is the current sweet-spot for quality and cost.

How to customize this prompt

Adjust the agent's role and constraints to your environment. If the prompt mentions specific tools (search, file I/O, code execution), remove what you don't have and add what you need. Add guardrails: "Always ask for confirmation before writing files." Define success criteria explicitly.

Common use cases

  • Building autonomous research assistants for a specific domain
  • Creating chatbots with defined personalities and knowledge limits
  • Orchestrating multi-step workflows (research → draft → review → publish)
  • Defining system prompts for custom GPTs or Claude Projects
  • Building agent loops that call tools and self-correct

Variations

Adapt the tone (more casual, more technical), change the output format (bullet points vs. paragraphs), or add constraints (word limits, target audience).

Related prompts