Repairing and validating broken JSON
AI agents
Repairing and validating broken JSON
- A Repair Prompt Template That Names the Failing Field
- A Validator Wrapper That Names the First Failing Field
- Naming the First Failing Field: A Validator Wrapper
- Repairing Invalid JSON from LLM Responses
- Routing a Failed Repair to a Human Queue: Codes, Ownership
- What to Do When a Model Ignores the Schema: Diagnostic Playbook
- When a Model Ignores the Schema: Diagnostic Playbook
- When to Repair a Failed Response and When to Start Over
- A Contract Test for Your Repair Logic: Mocking Model Failure
- A Cost Model for Schema Retries: Tokens, Latency, Repair Prompts
- A Decision Tree for Schema Misses: Fix, Retry or Reject
- A Log Schema for Repair Attempts and Their Cost
- A Repair Attempt Log That Proves What the Model Saw
- A Repair Prompt That Names the Path and Skips the Rewrite
- A Retry Prompt Template That Quotes the Failing Path Back
- Building a Fallback Chain for Structured Outputs
- Estimating Repair Costs Before You Build the Pipeline
- Fallback Strategies for Structured Output Failures
- Feeding Validation Errors Back: A Retry Prompt
- Making the Validator Wrapper Say What to Do Next
- Reading the Stop Reason Before the Schema Check
- Retry Prompts That Quote the Failing Path Back to the Model
- Routing a Failed Repair to a Human Queue
- Trimming a Quoted Fragment Without Losing the Failing Path
- Truncation, Stop Reasons and Max Tokens: A Handling Checklist
- Validating LLM Output in Production: A Small Library
- When a Field Fails Every Attempt: Schema Fix vs Prompt Fix
- When a Repair Fails: Deciding Between a Retry and an Escalation
- Widen, Repair or Enforce: Routing a Schema Miss