arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2505.04016cs.CLcs.AIcs.LG
收藏

SLOT:结构化大语言模型的输出

SLOT: Structuring the Output of Large Language Models

Amazon Web Services(亚马逊网络服务)

Darren Yow-Bang Wang, Zhengyuan Shen, Soumya Smruti Mishra, Zhichao Xu, Yifei Teng, Haibo Ding

AI总结:

SLOT提出一种与模型无关的后处理框架,通过微调轻量级语言模型将LLM非结构化输出转换为精确结构化格式,在模式准确性和内容保真度上显著超越更大规模的专有模型。

摘要:

结构化输出对于智能体和信息抽取等关键应用中的大语言模型(LLMs)至关重要。尽管LLMs能力强大,但其输出常常偏离预定义的模式,严重阻碍了可靠应用的开发。我们提出SLOT(Structured LLM Output Transformer,结构化大语言模型输出转换器),这是一种与模型无关的方法,可将非结构化的LLM输出转换为精确的结构化格式。现有解决方案主要依赖受限解码技术或与特定模型紧密耦合,而SLOT采用一个经过微调的轻量级语言模型作为后处理层,从而在各种LLMs和模式规范之间实现灵活性。我们引入了一套系统的数据策展与合成流程,以及一种形式化的评估方法,用于同时量化模式准确性和内容保真度。实验结果表明,经过微调的Mistral-7B模型结合受限解码实现了近乎完美的模式准确性(99.5%)和内容相似度(94.0%),分别以显著优势超越Claude-3.5-Sonnet(+25和+20个百分点)。值得注意的是,即使是像Llama-3.2-1B这样的紧凑模型,在配备SLOT后也能达到甚至超越规模大得多的专有模型的结构化输出能力,从而在资源受限环境中实现可靠的结构化生成。

英文摘要:

Structured outputs are essential for large language models (LLMs) in critical applications like agents and information extraction. Despite their capabilities, LLMs often generate outputs that deviate from predefined schemas, significantly hampering reliable application development. We present SLOT (Structured LLM Output Transformer), a model-agnostic approach that transforms unstructured LLM outputs into precise structured formats. While existing solutions predominantly rely on constrained decoding techniques or are tightly coupled with specific models, SLOT employs a fine-tuned lightweight language model as a post-processing layer, achieving flexibility across various LLMs and schema specifications. We introduce a systematic pipeline for data curation and synthesis alongside a formal evaluation methodology that quantifies both schema accuracy and content fidelity. Our results demonstrate that fine-tuned Mistral-7B model with constrained decoding achieves near perfect schema accuracy (99.5%) and content similarity (94.0%), outperforming Claude-3.5-Sonnet by substantial margins (+25 and +20 percentage points, respectively). Notably, even compact models like Llama-3.2-1B can match or exceed the structured output capabilities of much larger proprietary models when equipped with SLOT, enabling reliable structured generation in resource-constrained environments.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑