Apply to my task
arXiv:2604.03616 ★ 86 Apr 4, 2026

The Format Tax: Separate Reasoning from Formatting to Get Answer Quality Back

Key result

Discovered: the word "JSON" in a prompt cuts reasoning quality from the very first token — not because generating structure is hard for the model, but because the format instruction competes with the task for attention. The Format Tax method lets you get deep analysis and the right structure at the same time, without sacrificing one for the other. The trick: split one request into two — first the model thinks freely, then it repackages the finished answer. Structured answers are on average 162 tokens shorter than free-form ones — that's not style, that's discarded logic, and it's exactly what leads to errors.

01

TL;DR

Formatting kills quality. When you ask an LLM to answer straight away in JSON, XML, a table or LaTeX, the model reasons worse and writes worse. This isn't a bug in one particular model; it's a systemic effect. The countermeasure: separate reasoning from formatting, either across two separate requests or with an explicit "think first, format later" instruction inside one.

The main finding: Most people assumed quality drops because of technical constraints when generating structured text. Turns out, no. Quality drops from the mere presence of an "answer in format X" instruction in the prompt, before any generation even starts. The format instruction and the task instruction compete for the same model "attention." The result is like asking a person to solve a problem while minding their calligraphy: the problem gets solved worse, and the handwriting gets in the way.

How to fix it: two scenarios. The first is two requests: in the first you ask the question without mentioning format, in the second you ask to reformat the finished answer. The second is one request with an explicit sequence: "first think it through and answer freely, then convert it to the required format at the end." Both approaches recover most of the lost quality.

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

Option A — TWO REQUESTS (more reliable, +6.8 pp accuracy on average):

REQUEST 1: [Task] — no mention of format
         → Free-form, detailed answer

REQUEST 2: "Take the answer above and format it as [format: JSON / table / XML]"
         → Structured result

---

Option B — ONE REQUEST (simpler, works for ChatGPT/Claude with thinking):

REQUEST: "First work through the task in detail.
         Then, in a separate block, format the conclusion as [format]."
         → Reasoning, then structured output

Both options work in a regular chat, no tools required.

03

Example

Task: Emma is a product manager at DigitalOcean. She needs to hand her team a structured analysis of three competitors in JSON so it can be loaded into a shared system. She used to ask for JSON right away and got shallow results; important details got lost.


The two-step approach:

Request 1:

Analyze three of DigitalOcean's competitors in the B2B cloud market
in the US: Linode (Akamai), Vultr and Hetzner.

For each: key strengths, weak spots,
pricing position, target segment.
Be specific — examples, numbers, real products.

Request 2:

Great. Now take this analysis and format it strictly as JSON
with the following structure:

{
  "competitor": "name",
  "strengths": ["..."],
  "weaknesses": ["..."],
  "pricing_position": "...",
  "target_segment": "..."
}

Return an array of three objects. Don't add anything extra.

Result: In the first request the model delivers a detailed analysis with concrete details: products, examples, positioning nuances. In the second it neatly packs that same content into JSON without losing meaning. The final JSON is substantive, not an empty template.

04

Why It Works

An LLM doesn't think and then write — it generates everything at once, word by word. When the prompt says "answer in JSON," the model keeps the format requirement in mind from the very first token. It's like trying to compose a text while making sure every sentence starts with the next letter of the alphabet.

Formatting compresses reasoning. The study showed that structured answers are on average 162 tokens shorter than free-form ones. The model literally trims its logic to fit the structure. The stronger the compression, the higher the chance of a wrong answer. On a chart this looks like a U-shaped curve: errors grow at both extremes — under strong compression and under strong expansion.

Separation removes the competition. When reasoning and formatting happen in sequence, the second step receives a finished, high-quality answer as input. Formatting turns into a simple transformation instead of a mixed game of "think and format at the same time."

Control levers: - Step order — never ask for a format in the first request if the task is complex - Format strictness — the more detailed the JSON schema, the heavier the tax; simplify the schema when you can - The "think first" instruction — works even in a single request; just add an explicit sequence - Thinking mode (o3, Claude with extended thinking) — removes the tax automatically, because reasoning happens separately from the visible answer

05

Prompt Template

Option A: Two requests

Request 1:

{task} — give a detailed, free-form answer.

Request 2:

Take the answer above and format it as {format}.

Structure:
{format_schema}

Return only the structured result, with no extra commentary.

Placeholders: - {task} — your question or assignment - {format} — JSON / table / XML / list with headings - {format_schema} — an example structure or list of fields


Option B: One request

Task: {task}

Produce two blocks:

BLOCK 1 — ANALYSIS:
Work through the task in detail. Think out loud, give arguments, don't cut corners.

BLOCK 2 — RESULT IN FORMAT:
Take the conclusions from block 1 and format them strictly as {format}:
{format_schema}

🚀 Quick start — paste into the chat:

Here is the Format Tax template (separating reasoning from formatting).
Adapt it to my task: {your task}.
Ask me questions to fill in the fields.

[paste the template above]

The LLM will ask about the output format you need and the schema structure, because without that it can't build a proper second step. It will take the pattern from the template and adapt it to your task.

06

Limitations

⚠️ Complex tasks with thinking mode: "Thinking" models (o3, Claude with extended thinking) already solve the problem internally. No need to split things manually; they separate reasoning from formatting on their own.

⚠️ Simple tasks with a simple format: If you're asking for "a list of 5 bullet points" or "a short one-sentence answer," the tax is minimal. Not worth overcomplicating.

⚠️ Speed and cost: Two requests = roughly twice the tokens and the wait. For quick tasks that can be overkill.

⚠️ Modern closed models: Claude Haiku 4.5, GPT-4o (newer versions) and Grok barely suffer from the tax. If you work with them, the two-step approach gives a smaller boost. For open models (Qwen, LLaMA and others) the effect is strong.

⚠️ Very complex format schemas: The more detailed the JSON structure, the bigger the tax. The "think first" principle helps but doesn't cancel it completely with extremely rigid schemas.

07

How It Was Studied

A team from UC San Diego asked a simple question: where does the quality drop come from when you request structured output? Most researchers assumed the culprit was the technical generation mechanism that blocks "invalid" tokens. The researchers tested this directly: they took the same tasks, ran models with and without the technical constraint, but kept identical prompts — and saw that quality dropped equally in both cases. So the culprit isn't the generation technology but the mere presence of the words "answer in JSON" in the prompt text.

They tested ten models (six open, four commercial APIs), four formats (JSON, XML, Markdown, LaTeX) and four task types — math, science questions, logic puzzles and writing. That's 144 experimental cells in total. Of the 39 cells with a statistically significant effect, 92% of the degradation came from the prompt, and only 38% was added by the technical mechanism (and even then overlapping with cases already degraded by the prompt). Three cells showed degradation purely from the mechanism — out of 72 possible. They call this "the prompt dominates."

A curious detail: the researchers initially expected to come back with an answer about the generation mechanism, and instead found the root of the problem several levels higher. The practical takeaway turned out simpler than expected: you don't need to improve generation technology — you just need to change the order of steps in your prompt.

08

Original from the Paper (optional)

The most effective mitigation is to decouple reasoning from formatting—
either by generating freeform first and reformatting in a second pass,
or by enabling extended thinking within a single generation.
Both recover most of the lost accuracy; varying prompt content alone does not.

The tax is not a fundamental limitation. Some models already resist it,
and decoupled generation reverses it without retraining, suggesting that
the underlying reasoning capability remains intact.

Context: From the Conclusion section — the authors sum up the main practical principle of the work.

09

Adaptations and Extrapolations

💡 Adaptation: a client report

You're writing a marketing report for a client that has to be delivered in a strict template with H2 headings, tables and bullet lists.

REQUEST 1:
Analyze the results of {brand}'s ad campaign for {period}.
Data: {data}
What worked, what didn't, why, and what to do next.
No formatting — just write.

REQUEST 2:
Take this analysis and format it using the template:

## Campaign Results
[key numbers in a table: metric / plan / actual / variance]

## What Worked
[3-5 points with a short explanation]

## What Didn't Work
[3-5 points with a short explanation]

## Recommendations
[3 concrete actions for the next period]

🔧 Technique: an explicit pause in one request

Just add a divider between thinking and formatting:

Task: {task}

Step 1. Think out loud — break the task down in detail, with no format constraints.
---
Step 2. Now, based only on step 1, fill in the template:
{template}

The dashes --- create a psychological and structural pause. The model "closes" the reasoning stage and moves on to formatting with a clean context. Especially handy when you don't feel like making two separate requests.


🔧 Technique: check whether you're paying the "tax" right now

Take any prompt you use regularly. Strip every mention of format out of it. Run it. Compare the quality of reasoning with the original.

If the model answers noticeably better without the format, you're paying the tax. Switch to the two-step approach.

10

Resources

Paper: "The Format Tax" — Ivan Yee Lee, Loris D'Antoni, Taylor Berg-Kirkpatrick (UC San Diego). Preprint, under review.

GitHub: https://github.com/ivnle/the-format-tax

Related work mentioned in the paper: - Tam et al. (2024) — first documentation of accuracy drops under structured output - Park et al. (2024) — grammar-aligned decoding as an alternative approach - Banerjee et al. (2025) — a theoretical argument for why separating reasoning from formatting is necessary

Research digest

Key result

Discovered: the word "JSON" in a prompt cuts reasoning quality from the very first token — not because generating structure is hard for the model, but because the format instruction competes with the task for attention. The Format Tax method lets you get deep analysis and the right structure at the same time, without sacrificing one for the other. The trick: split one request into two — first the model thinks freely, then it repackages the finished answer. Structured answers are on average 162 tokens shorter than free-form ones — that's not style, that's discarded logic, and it's exactly what leads to errors.

Principle

The model generates text word by word — and keeps the format requirement in mind from token zero. It's like writing an essay while making sure every sentence starts with the next letter of the alphabet — the thought suffers and the letters get mixed up. Splitting into two steps removes the competition: the first request is pure reasoning with no constraints, the second is a simple transformation of the finished answer into the required structure. The second step doesn't think anymore. It just repackages.

Why it works

The model doesn't think in blocks — it generates one token at a time, and each next one depends on the whole context. When the prompt says "answer in JSON," the format pulls the probabilities from the very first word of the answer. The result: the model compresses its logic to fit the structure. Minus 162 tokens on average isn't concision, it's discarded reasoning. Two requests remove the compression: the second step receives detailed content as input and simply changes its form. Accuracy gain: +6.8 percentage points on average.

When to apply

Anything that needs structured output for systems or databases — JSON for APIs, XML for integrations, tables for analytics reports — especially when depth of analysis matters, not just a correct schema. NOT for: simple lists ("5 tips"), short one-sentence answers, or models with extended reasoning mode turned on (o3, Claude extended thinking) — there the separation is already built in under the hood and you don't need to do it manually.

Mini recipe

1. First request — not a single mention of format: state the question or task in free form. JSON, tables, schemas — not a word. Let the model think without handcuffs. 2. Wait for the detailed answer — the model digs into the substance without being distracted by structure. 3. Second request — repackaging only: `Take the answer above and format it as JSON with the following structure: [schema]. Return only the result, with no extra commentary.` 4. If two requests are inconvenient — one prompt with an explicit sequence: `First work through the task in detail (BLOCK 1 — ANALYSIS). Then format the conclusions as [format] (BLOCK 2 — RESULT).` Separation within the text gives a similar effect, if slightly weaker.

Examples

[BAD]: `Analyze three competitors and return the result as JSON with the fields strengths, weaknesses, pricing` [GOOD]: Request 1: `Analyze three competitors in the cloud market: Linode (Akamai), Vultr and Hetzner. For each — key strengths, weak spots, pricing position. Be specific: product examples, numbers, nuances.` → you get a detailed analysis Request 2: `Take the analysis above and format it strictly as JSON: {"competitor": "...", "strengths": [...], "weaknesses": [...], "pricing": "..."}. Return an array of three objects, no extra words.`

In plain words

The core problem is that neural networks pay a hidden tax on form — The Format Tax. When you force a model to pack its answer into rigid frames like JSON, XML or a table, it spends its "brainpower" not on the quality of the analysis but on getting the syntax right. The model can't think first and type later; it generates text in real time. If it has to watch every quote and bracket, it gets dumber before your eyes, churning out shallow nonsense instead of deep conclusions.

It's as if someone asked you to explain quantum physics but made every sentence rhyme or start with the next letter of the alphabet. Technically you'd manage, but the explanation would turn to mush, because your brain's working memory is busy with silly constraints instead of physics. In the end you either get the facts wrong or dumb everything down to kindergarten level, just to stick to the format.

The researchers tested this on different tasks and found that formatting kills logic. When a model is asked to produce a structured answer right away, it botches its reasoning far more often than with a free-form answer. This is especially visible in complex tasks where you need to cross-reference data or run calculations. "Give me a table" is a direct order for the model to lower its IQ for the sake of pretty layout.

The principle is universal: it applies not just to programmers and their code but to marketers, analysts and managers. If you need a quality competitor analysis in JSON or a structured report in LaTeX, never ask for it in one go. It was tested on different LLMs, and the verdict was the same everywhere: trying to save time on formatting gets you garbage out. Beautifully packaged, but completely useless garbage.

The main takeaway: divide and conquer. First ask the model to simply reason and give you a free-form draft, and only in a second step or a separate block demand that it be packed into the required format. Or use a "think first, format later" instruction within a single prompt. If you don't let the model "talk it out" without the quotation marks, get ready to pay the format tax with the quality of your product.

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 The Format Tax: Separate Reasoning from Formatting to Get Answer Quality Back arXiv:2604.03616

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