Skip to content

Menu

Chain-of-Thought Builder

Build chain-of-thought reasoning prompts

Runs entirely in your browserAIFree, no sign-up
Loading tool

01What is Chain-of-Thought Builder?

Asking a model to "think step by step" helps, but you get more predictable answers when you spell out the steps yourself. This builder writes that scaffold for you. You give it a task description, a list of reasoning steps with a label and an instruction each, a final answer label and an output format. It then prints a prompt you can paste into a system message or the top of a user turn. The idea comes from chain-of-thought prompting, described by Wei and colleagues in the 2022 paper on eliciting reasoning in large language models. Anthropic's prompt engineering docs also suggest XML tags for separating reasoning from the answer, which is why XML is one of the three formats here. In XML tags mode, each step gets its own tag built from the label. The label is lowercased, runs of characters outside letters, digits, underscore, dot and hyphen become one underscore, and stray underscores at the ends are trimmed. A tag that would start with a digit, or with the reserved letters "xml", gets a step_ prefix. So "Pros/Cons" becomes pros_cons and "2nd pass" becomes step_2nd_pass. The Thinking tags checkbox wraps all steps in a thinking element, and the answer goes in its own tag made the same way. Markdown mode turns each step into a ### heading, and Plain text gives you a numbered list, or a bulleted one when Step numbers is off. In XML mode, Step numbers switches each line between "Step 1:" and the label itself. Here is a quick example. Load the Code debugging preset and you get five tags: reproduce, hypothesize, trace, identify and fix, all inside thinking tags. The prompt closes with a solution tag holding "[Your solution here]". The counter next to Copy shows about 136 tokens. There are a few limits to know about. The token count is just characters divided by four, so real tokenizers will differ, especially on code. Plain text always ends with "[Your answer here]", whatever answer label you set. The placeholder text inside the answer tag is your label lowercased, punctuation and all. The tool also doesn't call any model. It builds text in your browser, and whether the model follows the steps is still up to the model and how you phrase them. Three presets get you started: a four-step math solver, a five-step debugging routine and a five-step decision analysis in markdown.

Developers who build LLM features and want the model's reasoning split into named, parseable stages use it to draft and tweak those prompts. The tool runs entirely in your browser, so your data never leaves your device.

02How to use Chain-of-Thought Builder

  1. Pick a preset from the examples (Math problem, Code debugging or Decision making), or edit the default math setup.
  2. Edit the Task Description, choose a Format (XML tags, Markdown or Plain text) and set the Final Answer Label.
  3. Tick or untick Thinking tags and Step numbers.
  4. Under Reasoning Steps, click Add for a new step, type its Label and instruction, and use the trash icon to drop one.
  5. Check the Generated Prompt and the ~tokens counter, then click Copy. The reset button brings back the math preset.

03Worked examples

Input: Example "Math problem"; Format: XML tags; Thinking tags: on; Step numbers: on; Final Answer Label: "Final Answer"
Result: Solve the following math problem step by step. Think through this step by step: <thinking> <understand> Step 1: Identify what is being asked and what information is given </understand> <plan> Step 2: Determine the approach or formula to use </plan> <execute> Step 3: Perform the calculations step by step </execute> <verify> Step 4: Check the answer for correctness and reasonableness </verify> </thinking> <final_answer> [Your final answer here] </final_answer>
XML format wraps each step in a tag made from its label and puts the whole chain inside <thinking> tags, followed by a <final_answer> tag.
Input: Example "Math problem" with Format: XML tags; Thinking tags: off; Step numbers: off
Result: Solve the following math problem step by step. Think through this step by step: <understand> Understand: Identify what is being asked and what information is given </understand> <plan> Plan: Determine the approach or formula to use </plan> <execute> Execute: Perform the calculations step by step </execute> <verify> Verify: Check the answer for correctness and reasonableness </verify> <final_answer> [Your final answer here] </final_answer>
With Thinking tags and Step numbers off, the <thinking> wrapper disappears and each step is prefixed with its label instead of "Step N".
Input: Example "Decision making"; Format: Markdown; Step numbers: on; Final Answer Label: "Recommendation"
Result: Analyze the following decision by considering multiple perspectives. Think through this step by step: ### Step 1: Context Summarize the situation and constraints ### Step 2: Options List all viable options ### Step 3: Pros/Cons Evaluate each option's advantages and disadvantages ### Step 4: Risks Identify potential risks and mitigation strategies ### Step 5: Recommend Make a clear recommendation with justification ### Recommendation [Your recommendation here]
Markdown format turns each step into a "### Step N: Label" heading and ends with a heading named after the Final Answer Label.
Input: Example "Math problem" with Format: Plain text
Result: Solve the following math problem step by step. Think through this step by step: 1. Understand: Identify what is being asked and what information is given 2. Plan: Determine the approach or formula to use 3. Execute: Perform the calculations step by step 4. Verify: Check the answer for correctness and reasonableness Final Answer: [Your answer here]
Plain text format gives a numbered list of steps and a single "Final Answer: [Your answer here]" line.
Input: Example "Code debugging" (XML tags, Thinking tags on, Step numbers on, Final Answer Label "Solution")
Result: <thinking> <reproduce> Step 1: Understand the expected vs actual behavior </reproduce> <hypothesize> Step 2: Form hypotheses about what could cause the bug </hypothesize> ... <fix> Step 5: Propose the minimal fix and explain why it works </fix> </thinking> <solution> [Your solution here] </solution>
Trimmed: the task line and the trace and identify steps are left out. The counter shows about 136 tokens.
Input: XML tags, Thinking tags off, Step numbers off; steps "2nd pass" and "XML check"; Final Answer Label "Verdict!"
Result: <step_2nd_pass> 2nd pass: Re-read the diff </step_2nd_pass> <step_xml_check> XML check: Validate the config </step_xml_check> <verdict> [Your verdict! here] </verdict>
Trimmed after the task line. Labels starting with a digit or "xml" get a step_ prefix. The placeholder keeps the "!" from the label.

04Common use cases

  • Writing a system prompt that makes a coding assistant reproduce and trace a bug before it proposes a patch
  • Setting up an eval prompt whose output has fixed XML sections, so a script can pull the final answer tag
  • Giving a team one shared decision-analysis template for architecture reviews
  • Making a tutoring bot show understand, plan, execute and verify stages on maths problems
  • Testing whether XML tags or markdown headings give more consistent output from the same model
  • Converting a long free-form instruction into short labelled steps that are easier to edit later

05Tips

  • Keep labels to one or two plain words. In XML mode they become tag names, and labels like "Step 2 (optional)" turn into awkward tags.
  • Thinking tags only affect the XML format. Markdown and Plain text ignore that checkbox.
  • If code parses the reply, use XML and read the content of the final answer tag. It is easier to pull out than a markdown heading.
  • Plain text ends with "[Your answer here]" whatever label you set, so edit that line by hand if the wording matters.
  • Put the actual question or code after the scaffold, so the model reads the steps before the material.

06Related concepts

Prompt engineering, Chain-of-thought, Few-shot prompting, XML prompt tags, LLM reasoning.

Frequently Asked Questions

What is Chain-of-Thought Builder?

Chain-of-Thought Builder is a free, browser-based developer tool on AIDToolStack. Build chain-of-thought reasoning prompts It requires no installation or sign-up and works entirely in your browser.

Is Chain-of-Thought Builder free to use?

Yes. No sign-up, no fees and no usage cap.

Does Chain-of-Thought Builder store my data?

No. It runs in your browser; nothing is uploaded.

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…

What changed in AI dev tools, once a month

Renames, shutdowns, pricing changes and new MCP setups, each with a source.

Subscribe