cs.AIAug 26, 2026

Right Values, Wrong Places: Diagnosing and Fixing Record Misplacement in LLM-Generated JSON

Authors: Yiwei Zhang, Chengke Wu, Jiahao Li, Li Wang, Yao Yao, Jianqiang Li

Organizations: Shenzhen University · Shenzhen Institutes of Advanced Technology, Chinese Academy of Sciences

Abstract

Large language models can generate valid JSON that preserves field values yet binds them to the wrong records or hierarchy levels. We introduce JSONPlacement, a controlled task supplying all values and assignment rules for transforming flat records into hierarchical JSON. Across six open-weight models, we identify two error types: record-assignment errors and hierarchy-realization errors. Whole-record moves account for 98.6% of strictly traceable synthetic misplacements. We predict that aligning input with target traversal should reduce assignment errors, while replacing nested output with record-level paths should reduce hierarchy errors. With predictions fixed before generating new instances, we test both interventions separately and together. On synthetic instances, each nearly eliminates its targeted error while leaving the other. Combined, they achieve exact matches for three 8-12B models on all new synthetic instances and a real-data validation set. These findings motivate evaluating record placement explicitly and jointly designing input organization and output representation to preserve value-path bindings.

Figures & tables

Appendix figures & tables18 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Structure Tax: How Structured Output affects LLMs Performance

    Oct 8, 2026Vineet Kumar, Kanishka, Bhuvanesh MandoraStructured Output GenerationStructured Reasoning in Language Models