Research Article

Research on Structured Output of Large Language Models Based on Dual-Dimensional Testing

Chao Zhang*
Chengdu University of Information Technology

* Corresponding author: [email protected]

Abstract

This study evaluates multiple constraint methods and output formats for producing structured data with large language models. To move beyond JSON-centered discussions, it builds a dual-dimensional testing framework in which output formats are compared horizontally and constraint methods are compared vertically. The experiments use practical extraction tasks and measure syntactic correctness, semantic correctness, response time, and token consumption across local open-source models and commercial lightweight models. The results show that JSON, although widely used in practice, is not always the most efficient structured output format. CSV and TSV perform well for flat tabular tasks, while JSON with validation or constrained decoding is more suitable when stability and schema compliance are critical. The findings indicate that output formats and constraint methods should be selected according to task shape, latency budget, model capability, and tolerance for downstream repair, rather than from a fixed preference for a single format.

Keywords: Large language models; structured output; dual-dimensional evaluation; JSON; benchmark
Published: September 22, 2026
DOI: 10.54254/2755-2721/2026.GL37071
Volume: ACE Vol.257
pp. 112-119
Download PDF

References

  1. Wang, L., Ma, C., Feng, X., Zhang, Z., Yang, H., Zhang, J., et al. (2024). A survey on large language model based autonomous agents.Frontiers of Computer Science, 18, Art. no. 186345. https://doi.org/10.1007/s11704-024-40231-1
  2. Luo, Z., Xu, C., Zhao, P., Sun, Q., Geng, X., Hu, W., et al. (2024). WizardCoder: Empowering code large language models with Evol-Instruct. InProceedings of the 12th International Conference on Learning Representations (ICLR). https://arxiv.org/abs/2306.08568
  3. Chiang, W.-L., Zheng, L., Sheng, Y., Angelopoulos, A. N., Li, T., Li, D., et al. (2024). Chatbot Arena: An open platform for evaluating LLMs by human preference. InProceedings of the 41st International Conference on Machine Learning (ICML). https://arxiv.org/abs/2403.04132
  4. Hu, R., & Wu, S. (2025). RL-Struct: A lightweight reinforcement learning framework for reliable structured output in LLMs.arXiv preprint arXiv:2512.00319. https://doi.org/10.48550/arXiv.2512.00319
  5. Lu, Y., Li, H., Cong, X., Zhang, Z., Wu, Y., Lin, Y., et al. (2025). Learning to generate structured output with schema reinforcement learning.arXiv preprint arXiv:2502.18878. https://doi.org/10.48550/arXiv.2502.18878
  6. Geng, S., Döner, B., Wendler, C., Josifoski, M., & West, R. (2024). Sketch-guided constrained decoding for boosting blackbox large language models without logit access. InProceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (ACL). https://doi.org/10.48550/arXiv.2401.09967
  7. Yang, J., Jiang, D., He, L., et al. (2026, January). StructEval: Benchmarking LLMs' capabilities to generate structural outputs.Transactions on Machine Learning Research. https://openreview.net/forum?id=buDwV7LUA7
  8. Geng, S., Cooper, H., Moskal, M., Jenkins, S., Berman, J., Ranchin, N., et al. (2025). JSONSchemaBench: A rigorous benchmark of structured outputs for language models.arXiv preprint arXiv:2501.10868. https://doi.org/10.48550/arXiv.2501.10868
  9. Geng, S., Josifoski, M., Peyrard, M., & West, R. (2023). Grammar-constrained decoding for structured NLP tasks without finetuning. InProceedings of the 2023 Conference on Empirical Methods in Natural Language Processing (EMNLP)(pp. 10932–10952). https://doi.org/10.18653/v1/2023.emnlp-main.674
  10. Li, H., Dong, Q., Chen, J., Su, H., Zhou, Y., Ai, Q., et al. (2024). LLMs-as-judges: A comprehensive survey on LLM-based evaluation methods.arXiv preprint arXiv:2412.05579. https://doi.org/10.48550/arXiv.2412.05579