ndcorder / outputguard
PublicValidate, repair, and retry LLM structured outputs. 13 repair strategies for common JSON malformations, JSON Schema validation, and retry-with-feedback prompts.
OutputGuard is a Python library that automatically validates, repairs malformed structured data like JSON or YAML from AI language models, and generates retry prompts for invalid outputs.
How It Works
You're frustrated because AI chats keep giving you messy lists or data that doesn't fit right, then you find this handy tool that automatically cleans it up.
You bring the tool into your project with a quick download, like adding a new app to your phone.
You describe what perfect data looks like for you, such as names as words and ages as numbers.
You give it the broken AI output, and it checks against your rules, fixes common mistakes like extra marks or wrong quotes, and hands back neat data.
If it's still not quite right, it creates a helpful follow-up question to ask the AI again until it gets it perfect.
For big batches of data, you process many pieces together and get a summary of what got fixed.
Now your AI outputs are always clean and reliable, saving you hours of manual fixes and letting you focus on building cool things.
Star Growth
Repurpose is a Pro feature
Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.
Unlock RepurposeSimilar repos coming soon.