Fix Invalid JSON from AI
The JSON won't parse and you can't see why. Deterministic cause-sniffing — trailing commas, single quotes, unclosed brackets — and the repair prompt that fixes it.
Paste the response, get the verdict: real JSON parsing, missing-field detection, and a repair prompt for everything found.
AI output looks right until something parses it. This setup validates the most common case — a JSON record that came back fence-wrapped, missing a required field, and carrying an invented one — and shows the full loop: a health score with a PASS/WARNING/FAIL verdict, every violation listed with its specific fix, and a repair prompt that sends the model back to correct its own response without touching what was already right. Validation is real: JSON.parse, not string matching.
Paste the response raw
Fences, preamble, and all — the wrapping is often the violation, and the validator detects it.
Read the issues, not just the score
Each issue carries its fix; the score only tells you how bad the bleeding is.
Send the repair prompt back
In the same conversation, so the model still has its previous response in context — it repairs, you re-validate.
It parses the response with JSON.parse rather than string matching, then checks it against the expected object — fields customer_name, email, plan, and active — and reports each violation with its fix, like "Missing required field: email" (use null if unknown, never invent one). The validator surfaces issues and a repair prompt; it can't guarantee catching every structural problem in unusual output.
Send it back in the same conversation, so the model still has its previous response in context — it then fixes only the listed problems (remove the ``` fences, add the missing email, drop the unexpected customer_phone_number) and keeps everything already correct unchanged. You run the repair prompt in your own assistant and re-validate the result; nothing is auto-corrected here.
It validates structure, not substance — notFor is explicit that judging content quality is out of scope. It confirms the record is parseable JSON with exactly the defined fields and no invented ones like customer_phone_number, and reports a PASS, WARNING, or FAIL health verdict. Whether the values are true or the answer is any good stays your review.
The JSON won't parse and you can't see why. Deterministic cause-sniffing — trailing commas, single quotes, unclosed brackets — and the repair prompt that fixes it.
Grade agent output the same way every time — a rubric scoring correctness, grounding, safety, tone, and completeness, with a pass threshold instead of a gut call.
Turn a failed case into a fix — diagnose where in the agent's flow it went wrong, categorize the failure, and point at the prompt, tool, or context that caused it.
Stop getting 'Sure, here is the JSON…' — the output-contract pattern that forces models to return only parseable JSON: schema, example, and a strict rule block.
Free text in, named fields out. The extraction prompt pattern that turns any unstructured text into consistent, parseable records.
Billing, Technical, Account, How-To, Feature Request — ticket triage with definitions that decide the borderline cases for the model.
Paste an AI's output and validate it against the expected format — with a repair prompt for every failure found.