LLM Inference Interview Questions, issue 10, Aug 8, 2026
The JSON Serialization Trap
Senior AI Engineer interview at Anthropic, and the interviewer asks:
“Your coding agent keeps failing on multi-line Python, escaped quotes, mangled indentation. A teammate says just use a stronger model. What’s the real fix?”
Don’t say: “Add a JSON repair step and retry the call.”
Why stuffing multi-line code into JSON strings silently pushes your model off-manifold, and how separating the metadata envelope from the raw payload instantly stops escape-character hallucinations.
The full answer, with the mechanism and the arithmetic, is for paid subscribers on Substack.