We gave two Claude models nine messy texts to turn into JSON. Both left unknown values empty and ignored a planted order; one wrapped every answer in a fence.
When you extract JSON from text with a model, give it a written rule for every place where guessing is tempting, then check its answer with a parser, not by eye. When we did that, Claude Sonnet and Claude Haiku both left a value empty when the text did not settle it, refused to add up a total that nobody had written, and treated an instruction hidden inside an order as part of the order. The values were right in all nine of our texts for both models. The weaker model still failed in a way a person would not notice: it put every JSON answer inside a Markdown code fence, so none of them parsed as they came.
Read the full report on AISkills402: https://aiskills402.com/blog/llm-json-extraction-nulls
Top comments (0)