LLM Output Batch Validator
How often does your model return valid JSON?
Structured output looks fine in the three examples you tried by hand. This guide checks seven real-looking classifier outputs against one schema and shows where each one fails — the kind of report you want before changing a prompt or a model.
This is the exact input and an excerpt of the report LLM Output Batch Validator returns for it. The full report also carries input and report SHA-256 hashes for verification.
{
"schema": {
"type": "object",
"required": [
"intent",
"confidence"
],
"properties": {
"intent": {
"type": "string",
"enum": [
"refund",
"shipping",
"other"
]
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"additionalProperties": false
},
"outputs": [
"{\"intent\": \"refund\", \"confidence\": 0.92}",
"```json\n{\"intent\": \"shipping\", \"confidence\": 0.8}\n```",
"{intent: 'refund', confidence: 0.7,}",
"{\"intent\": \"Refund\", \"confidence\": 0.9}",
"{\"intent\": \"other\", \"confidence\": 87}",
"{\"intent\": \"refund\", \"confidence\": 0.6, \"reason\": \"late\"}",
"I think this is about a refund."
]
}{
"summary": {
"valid": 3,
"invalid": 3,
"unparseable": 1,
"repaired": 2,
"validRate": 0.4286
},
"items": [
{
"index": 0,
"status": "valid",
"repaired": false
},
{
"index": 1,
"status": "valid",
"repaired": true
},
{
"index": 2,
"status": "valid",
"repaired": true
},
{
"index": 3,
"status": "invalid",
"repaired": false,
"violations": [
{
"path": "/intent",
"rule": "enum"
}
]
},
{
"index": 4,
"status": "invalid",
"repaired": false,
"violations": [
{
"path": "/confidence",
"rule": "maximum"
}
]
},
{
"index": 5,
"status": "invalid",
"repaired": false,
"violations": [
{
"path": "/reason",
"rule": "additionalProperties"
}
]
},
{
"index": 6,
"status": "unparseable"
}
],
"topRules": [
{
"key": "additionalProperties",
"count": 1
},
{
"key": "enum",
"count": 1
},
{
"key": "maximum",
"count": 1
},
{
"key": "unparseable",
"count": 1
}
]
}No account is needed to pay: an agent with its own wallet answers the HTTP 402 quote, or a human approves each payment through the local Agent Spend bridge. Payment settles before delivery; there is no automatic refund.
The first output is valid as sent. The second is wrapped in a ```json fence and the third uses unquoted keys, single quotes and a trailing comma; both become valid after syntax repair and are marked repaired: true, so you can see how much your pipeline depends on repair.
Three outputs parse but break the contract: "Refund" with a capital R fails the enum at /intent, a confidence of 87 instead of 0.87 fails the maximum at /confidence, and an invented "reason" field fails additionalProperties. The last output is a sentence, not JSON, and is reported as unparseable rather than "repaired" into a string.
The valid rate here is 3 of 7 (0.4286). topRules and topPaths aggregate the batch, so with 200 outputs you see at once whether the problem is casing, scale or extra fields.
Casing errors usually mean the enum belongs in the prompt or the provider's structured-output mode; scale errors mean the field needs a description with its range; extra fields mean additionalProperties: false should be in the schema you send to the model. Re-run the same batch after each change and compare the rate.
A bounded subset: type, enum, properties, required, items, additionalProperties, string length, item count and numeric bounds. No $ref, regex patterns, formats or composition.
Yes. Pass repair: false to measure what your model returns before any cleanup.
Up to 200 outputs of up to 32 KiB each, within 128 KiB of total input.
0.022223 USDC per call on Base mainnet, including the platform fee. The exact 402 quote is authoritative.
How often does your model return valid JSON?
A local MCP bridge that proposes each paid call and waits for you to approve it.
Replace API keys, JWTs, emails, card numbers, IPs and phone numbers in logs with consistent placeholders before an agent pastes them into a model, a ticket or a vector store.
Split documentation into retrieval chunks that keep their heading path, never cut a fenced code block and carry stable ids and line ranges for citations.
Check MCP, OpenAI function and Anthropic tool definitions for short descriptions, undocumented arguments, open objects and OpenAI strict-mode problems, with JSON-pointer paths for every finding.