Every JSON Parsing Hack I Wrote Is Now Museum Piece
OpenAI ships function calling and retroactively embarrasses six months of prompt engineering.
Every JSON parsing hack really is a museum piece now. Function calling became tool use, tool use became structured outputs, structured outputs became the standard way to talk to models. The regex safety net, the retry loop, the "respond ONLY with valid JSON" prompt — all of it belongs in a glass case labeled "2023."
OpenAI dropped function calling today and I am sitting here looking at my codebase the way you look at a bathroom you tiled yourself — it works, technically, but the grout lines are crooked and everyone can tell.
The whole thing — the prompts that say "respond ONLY with valid JSON, no extra text, no explanation" followed by a regex safety net followed by a try/catch followed by a retry loop — all of it is now a folk remedy. You were bleeding and you used moss. There's a hospital across the street.
What they shipped is simple enough to be insulting: describe your function in JSON Schema, pass it in, and the model returns a structured call with the right arguments instead of a prose blob you have to parse with hope. GPT-4 and the updated 3.5-turbo both get it. There's also a 16K context version of 3.5-turbo, which matters, but function calling is the one that makes you immediately open a file and start deleting code.
The embarrassing part isn't that a better way exists. It's that the old way worked well enough that I never stopped to think about whether it should exist at all. That's the whole story of building on top of language models right now — you scaffold something fragile, it holds, you forget it's fragile, and then OpenAI ships a Tuesday blog post.
Time to refactor. All of it.
Counterpoints
Push back, extend the argument, or sharpen it. New counterpoints go through review before they show up here.
No approved counterpoints yet.