What this prompt does
This prompt rewrites any task into an optimized chain-of-thought prompt — one that forces the model to reason in explicit, numbered steps, check its own work, and report confidence instead of guessing. It takes your [original_task], breaks it into [step_count] logical reasoning steps, adds a self-verification step, appends a confidence assessment, and builds out a worked example showing the reasoning chain on a simpler version of the problem. The result is a prompt engineered to make the model think out loud in a structured way.
The variables control how the reasoning is shaped. [step_count] sets how granular the decomposition is, and [cot_variant] picks the strategy — standard CoT, zero-shot CoT, or self-consistency with multiple reasoning paths — which materially changes accuracy and cost. [target_model] matters because different models respond to step-by-step framing differently, and [optimization_priority] (such as accuracy over speed) decides which trade-offs the prompt leans into. It also designs a fallback prompt for when the model gets stuck.
When to use it
- A reasoning-heavy task gives confidently wrong answers and you need the model to show and check its work.
- You are building an agent step where a single mistake cascades, so self-verification is worth the extra tokens.
- Multi-step analysis (debugging, math, planning) benefits from explicit decomposition into
[step_count]steps. - You want to compare CoT variants like self-consistency against plain step-by-step for a specific task.
- You need a stuck-state fallback so the model recovers instead of fabricating an answer.
- Standardizing how reasoning prompts are written across a team or workflow.
Example output
Expect a finished prompt containing a clear "think step by step" instruction with numbered reasoning steps, an explicit self-verification step, a confidence statement at the end, and a worked example demonstrating the reasoning chain on a simpler problem. It also includes output-format constraints to keep responses structured and a separate fallback prompt to deploy when the model stalls, plus a short explanation of why each element improves quality.
Pro tips
- Match
[step_count]to the task's real complexity; too few steps skips the hard reasoning, too many bloats the response without adding rigor. - Choose
[cot_variant]deliberately — self-consistency with multiple paths raises accuracy but multiplies cost, so reserve it for tasks where being right matters most. - Set
[target_model]accurately, because some models already reason well unprompted and over-scaffolding them can hurt rather than help. - Use
[optimization_priority]to resolve trade-offs explicitly; "accuracy over speed" and "speed over cost" produce very different prompts. - Keep the self-verification step concrete — "check your work by re-deriving the answer a different way" beats a generic "double-check."
- Actually wire up the fallback prompt; a stuck-state recovery path is what stops the model from confidently guessing when its chain breaks down.