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.
Research Article
Open Access