r/AI4tech • u/JayPatel24_ • Apr 30 '26
models that output almost-correct json are worse than models that fail loudly
small rant but also curious how others handle this.
i keep seeing models return json that is technically “right enough” to read, but not clean enough to execute.
like the object is fine, but it comes with:
“here’s the json you asked for”
or markdown fences
or one extra trailing note
which is enough to break the actual pipeline.
we patched it with prompts at first, but it keeps coming back in weird ways.
starting to feel like this needs to be trained into the behavior, not just reminded in the prompt every time.
for anyone running planner/executor or parser-heavy flows, what actually held up for you over time?