STED and Consistency Scoring: A Framework for Evaluating LLM Structured Output Reliability

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Wang, Guanghui, Yu, Jinze, Zhang, Xing, Jiang, Dayuan, Song, Yin, Deb, Tomal, Liu, Xuefeng, He, Peiyang
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866909978005078016
author Wang, Guanghui
Yu, Jinze
Zhang, Xing
Jiang, Dayuan
Song, Yin
Deb, Tomal
Liu, Xuefeng
He, Peiyang
author_facet Wang, Guanghui
Yu, Jinze
Zhang, Xing
Jiang, Dayuan
Song, Yin
Deb, Tomal
Liu, Xuefeng
He, Peiyang
contents Large Language Models (LLMs) are increasingly deployed for structured data generation, yet output consistency remains critical for production applications. We introduce a comprehensive framework for evaluating and improving consistency in LLM-generated structured outputs. Our approach combines: (1) STED (Semantic Tree Edit Distance), a novel similarity metric balancing semantic flexibility with structural strictness when comparing JSON outputs, and (2) a consistency scoring framework aggregating multiple STED measurements across repeated generations to quantify reliability. Through systematic experiments on synthetic datasets with controlled schema, expression, and semantic variations, we demonstrate STED achieves superior performance ($0.86-0.90$ similarity for semantic equivalents, $0.0$ for structural breaks) compared to existing metrics including TED, BERTScore, and DeepDiff. Applying our framework to benchmark six LLMs reveals significant variations: Claude-3.7-Sonnet demonstrates exceptional consistency, maintaining near-perfect structural reliability even at high temperatures ($T=0.9$), while models like Claude-3-Haiku and Nova-Pro exhibit substantial degradation requiring careful tuning. Our framework enables practical applications including targeted model selection for structured tasks, iterative prompt refinement for reproducible results, and diagnostic analysis to identify inconsistency root causes. This work provides theoretical foundations and practical tools for ensuring reliable structured output generation in LLM-based production systems.
format Preprint
id arxiv_https___arxiv_org_abs_2512_23712
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle STED and Consistency Scoring: A Framework for Evaluating LLM Structured Output Reliability
Wang, Guanghui
Yu, Jinze
Zhang, Xing
Jiang, Dayuan
Song, Yin
Deb, Tomal
Liu, Xuefeng
He, Peiyang
Computation and Language
Artificial Intelligence
Large Language Models (LLMs) are increasingly deployed for structured data generation, yet output consistency remains critical for production applications. We introduce a comprehensive framework for evaluating and improving consistency in LLM-generated structured outputs. Our approach combines: (1) STED (Semantic Tree Edit Distance), a novel similarity metric balancing semantic flexibility with structural strictness when comparing JSON outputs, and (2) a consistency scoring framework aggregating multiple STED measurements across repeated generations to quantify reliability. Through systematic experiments on synthetic datasets with controlled schema, expression, and semantic variations, we demonstrate STED achieves superior performance ($0.86-0.90$ similarity for semantic equivalents, $0.0$ for structural breaks) compared to existing metrics including TED, BERTScore, and DeepDiff. Applying our framework to benchmark six LLMs reveals significant variations: Claude-3.7-Sonnet demonstrates exceptional consistency, maintaining near-perfect structural reliability even at high temperatures ($T=0.9$), while models like Claude-3-Haiku and Nova-Pro exhibit substantial degradation requiring careful tuning. Our framework enables practical applications including targeted model selection for structured tasks, iterative prompt refinement for reproducible results, and diagnostic analysis to identify inconsistency root causes. This work provides theoretical foundations and practical tools for ensuring reliable structured output generation in LLM-based production systems.
title STED and Consistency Scoring: A Framework for Evaluating LLM Structured Output Reliability
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2512.23712