Apply to my task
arXiv:2512.15959 ★ 88 Dec 17, 2025

BRAID: Structured Reasoning Through Diagrams Instead of Text

Key result

CoT generates hundreds of reasoning tokens, half of which are filler. The model narrates 'first we take this, then we divide...', which leads to reasoning drift and low logic density. BRAID replaces the text with a Mermaid diagram: instead of 500 tokens of description, a 10-node graph with clear steps. The model follows the structure deterministically, without wandering. The result: the small gpt-5-nano-minimal with a diagram beat a bigger model without one, 45.2% vs 40.4% accuracy (and 1.5x cheaper).

01

TL;DR

BRAID (Bounded Reasoning for Autonomous Inference and Decisions) is a technique that replaces an LLM's text reasoning with symbolic diagrams in Mermaid format. Instead of the model "thinking out loud" through Chain-of-Thought (producing hundreds of tokens of description), it follows a compact map of logical steps encoded as a graph. The method works in two stages: first a Mermaid diagram is generated with the logic for solving the task, then the model uses that diagram as an instruction and produces the final answer.

Classic CoT generates excess tokens with low semantic density: the model describes every step in words, many of which carry no information but still cost money. The result is "reasoning drift": the reasoning wanders off, gets wordy, or repeats itself. This hits especially hard in expensive models with high reasoning effort (like GPT-5 medium), which produce detailed but not proportionally accurate explanations. Bottom line: more tokens ≠ better results.

BRAID compresses the thought process into a deterministic graph. The task's logic is written as nodes (steps) and edges (connections), with no fluff or filler. The model sees the whole structure and doesn't wander through text. The result: small models with BRAID beat big models without it. For example, the cheap gpt-5-nano-minimal with a diagram reached 45.2% accuracy on the hard SCALE benchmark, beating gpt-5-minimal, which costs 1.5x more, without a diagram (40.4%). On the GSM-Hard math set, the structure lifted accuracy from 94% to 98-99% for almost every model.

Want this for your own case? Apply this study to your task: AI adapts its method to what you are working on and writes the prompt.

02

Method Blueprint

STEP 1: Generate the BRAID
→ The model creates a Mermaid diagram with the logical steps of the solution

STEP 2: Solve using the diagram  
→ The model (the same one or another) uses the diagram as an instruction
→ Generates the final answer, following the graph structure

In the study: two separate API requests (generator + solver)
Manually in a chat: can be done in one prompt or in two messages

03

Example in Practice

Task: You're launching an online school and want to build a one-year financial model. You need to account for student acquisition cost, lead-to-purchase conversion, average order value, instructor costs (a percentage of revenue), marketing spend (a fixed monthly amount), and overhead. It's a multi-step task where it's easy to get confused or leave something out.

Prompt:

Create a Mermaid diagram for calculating an online school's profit for the year.

Inputs:
- Ad budget: $15,000/month
- Cost per lead: $25
- Lead → purchase conversion: 5%
- Average course price: $500
- Instructor pay: 40% of revenue
- Overhead: $2,000/month

The diagram should show the sequence of steps: 
how many leads we get → how many buy → revenue → 
instructor costs → net profit.

After the diagram, solve the task by following the graph structure.

Result:

The model will generate a graph like:

Ad budget → Number of leads → Number of students → 
Revenue → Instructor costs → Operating expenses → Profit

Then it will walk through each node of the graph, plug in the numbers, and output: leads per month (600), students (30), revenue ($15,000), instructor costs ($6,000), and the final profit after all deductions.

The graph structure ensures the model doesn't skip a step (for example, forgetting to subtract overhead) and doesn't get the order of calculations mixed up. All calculations follow the diagram's nodes strictly, with no reasoning drift.

04

Why It Works

The weakness: Text reasoning (CoT) generates lots of low-density tokens. The model describes every step: "First, let's take the $15,000 budget, then divide it by the $25 cost per lead to get the number of leads..." and those extra words cost money. On top of that comes reasoning drift: the model veers into explanations, repetition, and irrelevant details. This is especially true of expensive models with high reasoning effort: they produce detailed traces, but accuracy doesn't grow in proportion to length.

The strength: LLMs are excellent at following structured instructions, especially when they're encoded formally. Models were trained on code, diagrams, and formulas, so they parse graphs, pseudocode, and diagrams well. Symbolic notation removes the ambiguity of natural language.

How BRAID works: It replaces text reasoning with a compact graph of logical steps. Instead of 500 tokens of description, the model sees a 10-node diagram. Each node is an action or calculation, each edge a connection. The model moves through the graph deterministically, without wandering. The structure bounds the reasoning path and eliminates drift. The result: high semantic density per token, lower costs, higher accuracy.

Control levers:

  • Graph detail: Few nodes (3-5) for simple tasks → token savings. Many nodes (10-20) for complex ones → every step is transparent.

  • Diagram format: A Mermaid flowchart (as in the study), a mindmap, or just a list of steps with arrows. What matters is that the structure is visible.

  • Generated vs hand-made diagram: You can ask the LLM to create the diagram (flexibility), or write it yourself once and reuse it (control for recurring tasks).

  • One request vs two: You can generate the diagram and solve in one prompt ("first draw the graph, then solve"), or split it into two messages for more clarity.

05

Prompt Template

Option 1: One request (generation + solution)

Task: {task description}

Step 1: Create a Mermaid diagram (flowchart) with the logical steps of the solution. 
Each node is one action or calculation. Show the connections between steps.

Step 2: Solve the task by following the structure of the diagram. 
For each node in the graph, perform the calculation or logical step.

Inputs:
{list the input data for the task}

What to fill in: - {task description} — what needs to be calculated or solved - {inputs} — numbers, conditions, parameters


Option 2: Two requests (diagram first, then solution)

Request 1 — generate the diagram:

Create a Mermaid diagram (flowchart) for solving this task:

{task description}

The diagram should show the sequence of logical steps 
from the input data to the final answer. Each node is one action.

Request 2 — solve using the diagram:

Here is a diagram of the solution logic:

{paste the diagram from the previous answer}

Solve the task by following this structure. For each node of the diagram, 
perform the corresponding step.

Inputs:
{input data}

🚀 Quick start — paste into the chat:

Here is a BRAID template for structured reasoning. 
Adapt it to my task: {describe your task}. 
Ask me questions to figure out which steps the diagram needs.

[paste Option 1 or Option 2 above]

The LLM will ask: what the inputs are, what final result you need, which intermediate calculations matter. It will take the Mermaid diagram pattern and build a graph for your task. Then it will solve it by following the graph's nodes.

06

Why Two Requests Can Beat One

The study used two separate API calls: the generator creates the diagram, the solver works from it. That's not a bug, it's a feature.

Splitting gives you: 1. Reusable diagrams: Create the diagram once → apply it to different data. For example, the online school's financial model: build the diagram once, swap in new numbers every month. 2. Control over structure: You can hand-edit the generated diagram before solving if the model missed something. 3. Caching in production: If you're a developer or work through the API, store the diagrams and reuse them over and over, paying only for the solver.

For a one-off task, use one request. For recurring or critical ones, use two.

07

Limitations

⚠️ Learning curve for beginners: You need to understand Mermaid diagram syntax (flowchart, nodes, edges). If you don't, you'll have to trust the LLM to generate the right structure. The model may skip steps or make the graph too abstract.

⚠️ Not for every task: BRAID is good for logical chains, calculations, step-by-step processes. For creative tasks (write a story, brainstorm ideas) or subjective ones (judge the tone of a text), a structured graph is overkill; free-form reasoning works better there.

⚠️ Amortization in production vs one-off use: BRAID's main economic payoff comes when a diagram is created once and reused millions of times (via the API with caching). If you generate a new diagram for every unique task in a chat, you pay for two requests instead of one, and the token savings may not cover the double call.

⚠️ Math with masking: For the GSM-Hard benchmark, the study used a trick: all numbers in the diagram were replaced with ~~ placeholders so the solver couldn't just copy the answer and had to actually calculate. Real tasks don't need this, but it shows that if a graph contains ready-made numbers, the model may "cheat" and skip the logic.

08

How They Studied It

The team used three benchmarks: GSM-Hard (math problems), SCALE MultiChallenge (complex multi-step reasoning), and AdvancedIF (following instructions in text). They tested 272 SCALE questions and 100 questions each from GSM-Hard and AdvancedIF. Every task was run through combinations of GPT models: one model generated the Mermaid diagram (generator), another (or the same one) solved the task from the diagram (solver). This produced a matrix of configurations, for example an expensive model generates the diagram and a cheap one solves, or vice versa.

What they measured: accuracy (%), cost in cents per request (input/output tokens × price), and most importantly Performance-per-Dollar (PPD), i.e. how much accuracy you get per dollar. PPD was normalized against the baseline model gpt-5-medium: if PPD > 1, the configuration is more efficient; if < 1, it's more expensive or worse. This allowed a fair comparison of small and large models: not just "who's more accurate" but "who's the better deal".

Control group: Classic zero-shot prompting: models without BRAID and without explicit Chain-of-Thought triggers (like "think step by step"). For models with intrinsic reasoning (GPT-5 thinking models) this is fair: they already "think" internally, and adding CoT on top would be cheating. They compared plain work vs a structured diagram.

A neat trick: For math (GSM-Hard) they used Numerical Masking, replacing all numbers in the diagram with ~~ so the solver couldn't copy intermediate results from the graph and had to actually compute each step. This showed that BRAID provides not "a hint with the answer" but a reasoning structure.

The results were surprising: Small, cheap models with BRAID beat large, expensive models without it. gpt-5-nano-minimal (the cheapest) with a diagram reached 45.2% on SCALE, beating the heavier gpt-5-minimal without a diagram (40.4%). On math, almost every model rose from 93-95% to 97-99% accuracy. The key insight: structure matters more than model size. A compact graph for a small model is more effective than text reasoning for a big one.

The economics: The researchers calculated two cost scenarios: 1. Solving-Only Cost — if the diagram is created once and reused (in production via caching). Then you pay only for the solver. 2. Amortized Cost — if you generate the diagram each time but use it N times. Then the generation cost is spread out.

In production (N → large), BRAID makes inference dramatically cheaper. For one-off tasks the gain is smaller, but it's still there thanks to the compact tokens.

09

The Original from the Study

The study doesn't provide a verbatim prompt template: the authors describe the architecture (generator + solver) but don't publish the exact prompt text. Instead they show a conceptual example of a Mermaid diagram:

flowchart TD
    Start[Input data] --> Step1[Step 1: calculate A]
    Step1 --> Step2[Step 2: calculate B]
    Step2 --> Step3[Step 3: combine A and B]
    Step3 --> End[Final answer]

Context from the paper: The generator model receives the question and creates a diagram like this. The solver model uses the diagram as a system message (via the API) and generates the final answer by following the graph's nodes. The paper notes: "BRAID introduces a bounded reasoning framework using Mermaid-based instruction graphs that enable models to reason structurally rather than through unbounded natural-language token expansion."

For math problems (GSM-Hard) they used masking:

flowchart TD
    Start[Budget: ~~] --> Leads[Leads: ~~]
    Leads --> Students[Students: ~~]
    Students --> Revenue[Revenue: ~~]
    Revenue --> Profit[Profit: ~~]

The solver sees the structure but not the numbers, so it has to compute them itself.

10

Adaptations and Extrapolations

💡 Adaptation for text tasks without calculations

The original study focused on logical chains and math, but the principle works for any step-by-step process. For example, writing an analytical article:

Create a Mermaid diagram for writing a breakdown of a marketing campaign.

Structure:
Target audience analysis → Creative assessment → 
Performance metrics analysis → Conclusions → Recommendations

After the diagram, write the article following this logic.

Campaign data:
- Product: an online Python course
- Platforms: Instagram, YouTube Ads
- Budget: $15,000
- Result: 120 purchases, CPA $125

The diagram locks in the order of sections. The model won't jump between topics; it will go strictly node by node: audience first, then creative, then metrics, then conclusions. The text comes out structured without extra instructions like "first talk about..., then about...".


🔧 Technique: A graph of questions instead of a graph of actions

The original BRAID uses a graph of solution steps. But you can adapt it into a graph of clarifying questions for complex, open-ended tasks.

Example: You need to pick a niche for a new business, but there are lots of criteria and it's unclear where to start.

Create a Mermaid diagram of questions for choosing a business niche.

Start with the question "What experience do I have?" → 
branch into "Do I have an audience?" and "How much am I willing to invest?" → 
for each branch, ask clarifying questions → 
the final nodes are niche types for each profile.

After the diagram, ask me these questions in order and help me choose.

The model will create a decision tree as a graph. You move along the branches, answering questions. This gives the choice process structure: not a chaotic "let's think about it" but a clear path from the root to the leaves.


💡 Combo: BRAID + Self-Consistency

The original study compares BRAID with Self-Consistency (SC), a technique where you generate several CoT traces and pick the answer by majority vote. SC is more accurate but more expensive (several requests).

Hybrid approach: Create one BRAID diagram, but ask the model to solve the task from the diagram in three different ways (for example, by changing numeric priorities or how nodes are interpreted). Then compare the three solutions.

Here is a Mermaid diagram of the solution logic:

{diagram}

Solve the task using this structure **in three ways**:
1. Optimistic scenario (maximum values at the forks)
2. Pessimistic scenario (minimum values)
3. Realistic scenario (average values)

For each scenario, go through all the nodes of the diagram and give the final answer.
Then compare the three answers and show the range of possible outcomes.

You get bounded multi-path reasoning: one structure (the graph), but different interpretations. It's cheaper than three full CoT runs (where each trace generates its own logic), but more flexible than a single BRAID (you see the spread of answers).

11

Resources

BRAID: Bounded Reasoning for Autonomous Inference and Decisions — Armağan Amcalar (OpenServ Labs), Eyup Cinar (Eskisehir Osmangazi University). All datasets and detailed result logs are available at https://benchmark.openserv.ai.

The study cites key prompting papers: - Chain-of-Thought Prompting (Wei et al., 2022) — the basic step-by-step reasoning technique - Zero-Shot CoT (Kojima et al., 2022) — "Let's think step by step" - Self-Consistency (Wang et al., 2022) — voting across multiple CoT runs - Least-to-Most Prompting (Zhou et al., 2022) — decomposition into subtasks - Plan-and-Solve (Wang et al., 2023) — a planning phase + an execution phase - Tree of Thoughts (Yao et al., 2023) — tree-shaped exploration of reasoning paths - Program-of-Thought (Chen et al., 2023) — replacing text with code

Research digest

Key result

CoT generates hundreds of reasoning tokens, half of which are filler. The model narrates 'first we take this, then we divide...', which leads to reasoning drift and low logic density. BRAID replaces the text with a Mermaid diagram: instead of 500 tokens of description, a 10-node graph with clear steps. The model follows the structure deterministically, without wandering. The result: the small gpt-5-nano-minimal with a diagram beat a bigger model without one, 45.2% vs 40.4% accuracy (and 1.5x cheaper).

Principle

Two stages. First: the model generates a Mermaid diagram with the solution logic (nodes = steps, edges = connections). Second: the model uses the diagram as an instruction and solves the task by following the graph. The structure bounds the reasoning path, so the model can't drift off or smear the solution. In production the diagram is created once and reused many times, so you pay only for the solving stage.

Why it works

LLMs are trained on code, diagrams, and formulas, so they parse graphs and formal notation extremely well. A symbolic diagram removes the ambiguity of language and gives high semantic density: every token carries logic, not descriptive filler. On the GSM-Hard math benchmark, accuracy rose from 94% to 98-99% for almost every model. The graph provides a deterministic path: the model doesn't wander through text, it goes node by node.

When to apply

Multi-step calculations and logical chains → financial models, data analysis, process planning, especially when the task has a clear sequence of steps and it's important not to miss anything. NOT suited to creative tasks (write a story) or subjective judgments (identify the tone of a text); a structured graph is overkill there.

Mini recipe

Option 1 (one request, faster): 1. Write a two-stage prompt: Step 1 - create a Mermaid diagram with the solution logic. Step 2 - solve the task following the structure of the diagram 2. Describe the task and data: what to calculate, which input parameters Option 2 (two requests, for reuse): 1. Request 1: ask for a Mermaid flowchart with the solution steps for the task 2. Request 2: paste the diagram from the first answer + the inputs, and ask it to solve by following the graph 3. Bonus: save the diagram and use it on other data, paying only for the solution

Examples

[BAD]: `Calculate an online school's profit: ad budget $15k/month, $25 per lead, 5% conversion, $500 average price, instructor pay 40% of revenue, overhead $2k/month` [GOOD]: `Create a Mermaid diagram for calculating an online school's profit. Sequence: budget → leads → students → revenue → costs → profit. Data: ads $15k/month, $25 per lead, 5% conversion, $500 price, instructor pay 40%, overhead $2k/month. After the diagram, solve by following the graph's nodes.`

In plain words

In Plain Words: 2512.15959

In Plain Words

BRAID: Bounded Reasoning for Autonomous Inference and Decisions

Modern models in reasoning mode are like a chatty cab driver: to get you to the next street over, he'll tell you his life story, the history of the city, and his chili recipe. This is called Chain-of-Thought: the model "thinks out loud", generating tons of text that you pay for in time and money. The problem is that it's easy to lose the thread in all that verbal soup: the model starts repeating itself or wanders into the weeds and makes silly mistakes. The BRAID method changes the rules of the game by swapping loose text for a rigid structure: symbolic Mermaid diagrams. Instead of reasoning in words, the model builds a compact logic graph where each step is a specific node in the diagram, not a stream of consciousness.

It's like asking a friend to help you assemble an IKEA wardrobe. A regular model would start reading the entire manual out loud, getting lost in pages and parts while you're holding up a heavy shelf. BRAID just sketches a clear diagram on a napkin: "insert part A into slot B, tighten screw C". There's technically less information, but it's way more useful. You don't waste energy decoding extra words; you see the structure of the process right away. This gets rid of reasoning drift, where the model talks itself in circles and forgets what it was trying to solve in the first place.

The method rests on a two-stage mechanism: first the LLM spits out a Mermaid diagram that serves as the skeleton of the logic, then uses it as a strict instruction for the final answer. It works because of information density: one token of diagram code carries more meaning than ten tokens of an ordinary sentence. If you need to build a complex financial model for an online school, the model won't spell out "let's take the budget and divide it by the cost per lead"; it'll create a Marketing_Math node where all the variables are already wired together logically. The chance of the calculations "drifting" drops almost to zero, because the model sees the whole map at once.

Although the method was tested on complex calculations, the principle is universal and applies anywhere there's multi-step logic. Planning a trip, writing code, or legally reviewing a contract: anywhere a person or an AI can get lost in the details. BRAID turns chaotic reasoning into an engineering problem. It's a shift from the humanities-style "let's talk about it" to the technical "let's draw it". In a world where every token costs money and generation time is critical, this approach is survival of the fittest.

Bottom line: the era of endless walls of text in AI reasoning is coming to an end. BRAID proves that to make a model smarter, you don't need more words, you need more structure. Stop paying for the model's "ums" and "uhs" and switch it to symbolic graphs. Whoever teaches their systems to think in diagrams instead of paragraphs will get fast, accurate answers while everyone else waits for their chatbot to finish yet another very important but useless thought.

ArXiv ID: 2512.15959 | Generated: 2026-01-02 17:03 | Nova Research

AI lab assistant

Apply this study to your task

Describe what you're working on. AI takes the method and the measured results from this paper and adapts them to your case, or writes a ready prompt built on them.

Based on BRAID: Structured Reasoning Through Diagrams Instead of Text arXiv:2512.15959

Sign in to apply this study New accounts get 50 free credits.