Structured Output

AI Output Validator

Paste an AI's output and check it against the structure you expected: real JSON parsing, heading and label checks, a 0–100 health score with a PASS / WARNING / FAIL verdict — and a repair prompt you send straight back to the model.

What output is being checked, and against what? E.g. "Validate support ticket classification output." Feeds the repair prompt's requirement line.

Expected Output Type

Picks the validator: JSON parsing, XML well-formedness, heading scan, or label checks.

Expected Fields (one per line)

One field name per line — the keys the JSON must contain.

Paste the AI's response exactly as it came back — fences, prose, and all. That's what gets validated.

AI Resource Library

Resources for this tool

View All Resources →

Workflows

Workflows that use this tool

All Workflows →

Projects

Projects that use this tool

Browse the project catalogue →

Guides for this tool

View all 14 guides

How it works

State the validation goal, pick the expected output type — JSON, YAML, XML, CSV, markdown document, structured summary, classification, or extraction output — and list the expected structure, one item per line: field names for JSON, section headings for documents, allowed labels for classification. Then paste the AI's actual response, exactly as it came back, and click Validate Output. The engine runs a real check, not a string match: JSON gets parsed (with deterministic cause-sniffing when it doesn't), XML gets tag-stack well-formedness checking, CSV gets quote-aware column math, markdown gets a heading scan with order checking, classification gets label-set and confidence validation. You get a 0–100 health score with a PASS / WARNING / FAIL verdict, every issue listed with its fix — and a repair prompt you paste straight back into the model to get the corrected output. Nothing leaves your browser.

Best for

  • Checking an AI's output against the format you expected
  • Getting a repair prompt for every failure, not just a pass/fail
  • Closing the loop after a structured-output prompt

Not for

  • Building the prompt that produces the output — that is the JSON Output Prompt Builder
  • Comparing two outputs for quality — that is the Prompt Comparator

Use cases

  • Checking an automation's AI step output before it breaks the next node
  • Diagnosing why a JSON response won't parse — fences, trailing commas, prose
  • Verifying documents and summaries kept their required sections
  • Catching invented labels before they pollute a classification pipeline

Pro tips

  • Paste the response exactly as it came back — fences, preamble, and all. The wrapping is often the problem, and the validator detects it.
  • The repair prompt is built to be surgical: "keep everything that was already correct unchanged, fix only the problems listed". Send it in the same conversation so the model still has its previous response in context.
  • Use the structure list from your generator prompt: the fields you defined in the JSON Output Prompt Builder or the sections from the Markdown Output Builder are exactly what belongs in Expected Structure.
  • A WARNING verdict is often one fence away from PASS — fence-wrapped but otherwise valid output is the most common failure and the cheapest repair.

FAQ

Does the output I paste in get sent anywhere, or is it checked in my browser?

It's checked in your browser — the AI response you paste and the expected-structure list you enter are analyzed locally with deterministic checks like JSON.parse and tag-stack matching, so nothing leaves your browser and no output is sent to a server. The check is real but not exhaustive; it flags structural problems, not whether the content is correct.

Is the validation real or just string matching?

Real, within what a browser can do deterministically: JSON goes through JSON.parse with cause-sniffing for trailing commas, single quotes, and unclosed brackets; XML gets tag-stack well-formedness checking; CSV gets quote-aware cell counting against the header; markdown and summaries get a heading scan with presence, order, and empty-section checks; classification output gets label-set membership, case, and confidence-format checks.

What does the health score mean?

A deterministic 0–100: every issue subtracts a weighted penalty — a parse failure costs far more than an unexpected field. 85+ is PASS, 50–84 WARNING, below 50 FAIL. The score is for triage, not for averaging: it tells you whether to ship the output, repair it, or regenerate from scratch.

What exactly is the repair prompt?

A ready-to-send prompt built from the issues found: it restates your original requirement, lists each problem with its specific fix ("include 'email'; use null if the value is unknown", "remove the ``` fences"), and instructs the model to return only the corrected output, changing nothing that was already right. Paste it into the same conversation and the model repairs its own response.

Can it validate YAML fully?

Structurally, yes; semantically, partially — there's no full YAML parser in the browser, so the validator checks the things that break consumers deterministically: forbidden tabs, multiple documents, code fences, and the presence of your expected top-level keys. For deep YAML schema validation, a dedicated parser in your pipeline is the right tool; this catches the format violations models actually make.

What if the output passes — do I still get a repair prompt?

No — a PASS with zero issues shows "no issues found" and skips the repair prompt entirely. The tool never invents problems to fix; an honest pass is the goal, not an opportunity for busywork.