Playground
Structured Schema Validator for Finance
Structured schema validator finance — paste LLM JSON, see missing fields, type mismatches, enum errors, and plausibility flags.
Runs in your browser. Nothing you enter is uploaded, and no account or API key is needed.
1. Pick a schema
LLM research note on an investable idea. Must declare a probability, a thesis, and explicit invalidation conditions — every research output that cannot be falsified is just narrative.
Schema definition
| Field | Type / bounds | Req |
|---|---|---|
| probability | number [0 … 1] Subjective probability the thesis plays out. 0..1 inclusive. | required |
| thesis | string ≥50 chars Plain-English thesis. Minimum 50 chars — forces substance over one-liners. | required |
| conviction | enum (low|medium|high) Qualitative conviction bucket. | required |
| invalidation_conditions | array ≥1 items Explicit events that would kill the thesis. ≥1 item. | required |
| source_citations | array ≥1 items URLs or document IDs backing the claims. ≥1 item. | required |
Valid example
{
"probability": 0.62,
"thesis": "Issuer SYNTHETIC_A's cloud-revenue mix is re-rating vs peers after three consecutive quarters of operating-margin expansion, while the sell-side model still assumes the legacy mix.",
"conviction": "medium",
"invalidation_conditions": [
"Next quarter cloud-revenue growth prints below 20% YoY",
"Operating margin contracts by more than 150 bps"
],
"source_citations": [
"10-Q FY2026 Q1, p.14",
"Earnings call transcript 2026-02-11"
]
}2. Paste your LLM JSON
Validation runs in your browser as you type. Nothing is uploaded.
Schema validity
100%
5 / 5 fields passed, overall pass
Schema: Research Output
3. Validation results
| Status | Field | Message |
|---|---|---|
| ✓ | probability | ok |
| ✓ | thesis | ok |
| ✓ | conviction | ok |
| ✓ | invalidation_conditions | ok |
| ✓ | source_citations | ok |
What gets checked
- Field presence, JSON type, enum values, numeric bounds, minimum string / array sizes.
- Cross-field sanity (long stops below take-profit, leverage above retail limits, duplicate peer tickers).
- Soft plausibility bands drawn from real-world issuer filings — out-of-band values warn, not fail.
- Missing unit / GAAP-basis heuristics for revenue / EPS / EBITDA field names.
How to use it
- Pick one of the four reference schemas: research output, trade decision, risk snapshot or peer comparison.
- Paste the LLM output JSON. The schema's valid example loads first; Load broken injects typical model errors.
- Read pass or fail and the per-field results: missing fields, wrong types, enum and range violations, text that is too short.
- Read the sanity flags: values outside plausible bands and cross-field problems, such as a long trade with its stop above its target.
- Fix the prompt or schema where fields fail repeatedly, and validate every output in code before it reaches anything that trades.
Questions people ask
What schemas does the validator check?
Four reference schemas for finance LLM outputs: research output, trade decision, risk snapshot and peer comparison. Each defines required fields, types, enums, numeric ranges and minimum lengths, and ships with a valid example. Custom schemas cannot be uploaded.
Why use this instead of plain JSON Schema validation?
The field checks are what JSON Schema does. The extra layer is sanity checking: soft plausibility bands for numbers, and cross-field rules such as stop-loss below take-profit on a long trade, a target ticker repeated in its own peer list, or leverage above Reg T limits. Sanity flags are warnings and do not fail validation.
What does it report?
Pass or fail, a status and message for every schema field, a parse error when the text is not valid JSON, and the list of sanity flags. It validates one output at a time.
Can it validate streaming outputs?
Only complete JSON. Validate the output once the stream has finished; a partial document fails to parse.
How strict should I make the schema?
Strict enough to catch real errors, loose enough not to reject legitimate variation. A common pattern is tight validation on machine-consumed fields (numbers, enums, IDs) and looser validation on human-readable ones (descriptions, summaries).
Related tools
- Playgrounds Hallucination Detector
Paste a source document + an LLM's extraction. Every numeric claim in the output is checked against the source. Client-side. Catches silent fabrication.
- Playgrounds Agent Skill Tester for Markets
Paste a SKILL.md definition + sample input + your Anthropic API key. See structured extraction, token cost, and latency — all in your browser. No signup.
- Playgrounds Prompt Regression Tester
Run the same prompt against multiple models (Claude 4.5/4.6/4.7, GPT-5, Gemini 2.5) with your own keys. Diff outputs, score drift, catch regressions.
Articles
- 14 min read Reading Financial Filings With LLMs: 2026 Playbook
A map of eight filing tasks — extraction, summarization, peer comparison, Q&A, classification, sentiment, forecasting input, compliance — with model.
- 11 min read Numeric Precision in LLM Filing Extraction
Six precision traps — units, currency, GAAP vs non-GAAP, diluted vs basic shares, restatements, rounding — and the structured-output pattern that fixes them.
- 12 min read Prompt Patterns for Earnings Calls
Five copy-paste patterns — speaker attribution, hedged-guidance confidence, multi-quarter delta, risk aggregator, forward-outlook separator.
Use it from code
The same calculation as a JavaScript module you can import. It runs where you import it, with no request, key or rate limit.
import { compute } from "https://aifinhub.io/engines/structured-schema-validator-finance.js";