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.
Verify a RAG answer is actually from its retrieved context — every claim traced to a retrieved passage, and any answer that outran its sources flagged.
RAG's whole promise is grounded answers, but a model will happily blend retrieved context with its own training and present the mix as sourced. This prompt checks groundedness specifically: it maps each part of the answer to the retrieved passage that supports it, flags claims with no supporting passage, and catches the case the system should have handled — answering confidently when the retrieved context didn't actually contain the answer.
Assemble the answer and its context
Gather the RAG answer and the exact passages that were retrieved for it. Groundedness is judged only against the retrieved context, so include all of it.
Open this resource in AI Output Validator
Load the prompt into AI Output Validator and paste in the answer and the passages. The tool maps each claim to its supporting passage without you checking by hand.
Review the per-claim mapping
Read which parts of the answer trace to a passage and which have no support, including the case where it answered confidently without the context backing it.
Feed the ungrounded claims back
Use the unsupported claims to tighten the prompt or the retrieval, then re-run the check to confirm the answer stays within its sources.
The RULES section treats answering when the retrieved context lacks the answer as a failure even if the answer is correct, and 'generally true but not in the context' as not grounded. So a claim the model pulled from its own training scores NOT GROUNDED under the OVER-REACH check regardless of factual accuracy, because groundedness measures sourcing, not truth.
This one judges the answer only against the pasted RETRIEVED CONTEXT and runs the OVER-REACH check for RAG's signature failure — answering confidently when the passages didn't cover the question. The Hallucination Detection Prompt checks output against an arbitrary source. Reach for that one when there are no retrieved chunks to attribute claims to.
Paste all three INPUT blocks: RETRIEVED CONTEXT (the exact passages given to the model), ANSWER, and QUESTION. Without the full retrieved chunks, the ATTRIBUTION check has no passage to cite per claim and marks it NO-SUPPORT, giving you a false NOT GROUNDED. In AI Output Validator, the mapping is only as good as the context you supply.
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.
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.
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 retrieval system that returns grounded answers — understand the corpus, chunk and ground it, extract and classify the metadata, then evaluate that retrieval actually works.
An AI summary reads perfectly, but you can't tell if every sentence is in the source or whether a "may" hardened into a "will." Here's how to review AI output claim-by-claim against the document it came from, so unsupported and overstated claims surface before you rely on them.