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.
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.
Evaluating agents by reading a few outputs and nodding doesn't scale and isn't consistent. This prompt builds a scorecard: the dimensions that matter (correctness, groundedness, safety, format adherence, tone, completeness), a concrete scale for each, and a weighted pass threshold — so two reviewers grade the same output the same way and 'good enough to ship' is a number.
Assemble the evaluation inputs
Gather the agent output you want to grade, the task it was given, and what a correct response looks like. The rubric scores against that expected result, so the clearer it is, the more consistent the grade.
Open this resource in AI Output Validator
Load the scorecard into AI Output Validator and paste in the output alongside the expected result. The tool runs the prompt so you get the per-dimension scores without grading by hand.
Review the scored dimensions
Read the score and one-line reason for each dimension, then check the weighted total against the pass threshold and note the single issue holding the score down.
Feed the failures back into the agent
Use the dimensions that scored low to revise the agent's prompt or instructions, then re-score the next output against the same rubric to confirm it improved.
The prompt leaves the threshold for you to set — it asks the model to "state it" rather than assuming a number. Pick a weighted-total cut-off that matches your risk tolerance (a customer-facing agent needs a higher bar than an internal draft), then apply it consistently so every output is judged against the same line. You run the scorecard in your own AI tool.
You choose the weights and the prompt makes them explicit — it instructs the model to "state the weights," with correctness and safety weighted highest by design. The weighted total combines each dimension's 0–5 score by its weight into one aggregate number, which is then compared to your threshold for the PASS or FAIL. Nothing is auto-graded; the model applies the rubric you supply.
A high average can still FAIL because of the capping rule: a failing CORRECTNESS or SAFETY score caps the overall result regardless of how strong the other four dimensions are. So an output that is well-formatted, complete, and on-tone but wrong or unsafe won't pass. The one-line justification on each score shows exactly which dimension capped it.
No — a PASS means the output cleared the weighted threshold you set on this rubric, not that it's guaranteed safe or correct. The score is a structured signal that makes grading consistent and comparable, not a shipping sign-off; a rubric only checks the dimensions you defined against the expected result you supplied. Treat a PASS as evidence for a human ship decision, not a substitute for one.
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.
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.
The full path to a support agent you can put in front of customers — write its instructions, ground it in your docs, route and handle tickets, then evaluate and cost-control it before it goes live.
The full path to a support operation, not just a bot — stand up the knowledge base, route the tickets, add the AI agent, integrate your stack, close the feedback loop, evaluate, and deploy.
The output reads well and answers the question, so you almost ship it — then you notice it broke a rule you cared about and skipped a section you needed. "Looks good" was never the test. Here's how to give AI the acceptance criteria up front and check the output against them before you rely on it.
AI hands you a polished email, landing page, or support reply that looks ready to send — and only after you send it do you find the claim you can't back or the audience you got wrong. Here's how to build a reusable QA checklist and review generated content against it first.
Build an evaluation scorecard two people can apply to the same agent run and reach the same number — dimensions that don't measure each other, anchors you can point at, and the failures that shouldn't average out.