Generating Structured Outputs from Language Models: Benchmark and Studies

要約

構造化された出力を確実に生成することは、現代言語モデル(LM)アプリケーションにとって重要な機能になりました。
制約されたデコードは、生成中に構造化された出力を実施するためのセクター全体で支配的な技術として浮上しています。
採用の拡大にもかかわらず、制約されたデコードの行動とパフォーマンスの体系的な評価ではほとんど行われていません。
制約されたデコードフレームワークは、JSONスキーマを構造化されたデータ形式として標準化されており、ほとんどの用途はスキーマを与えられた制約コンプライアンスを保証します。
ただし、実際には方法の有効性についての理解が不十分です。
3つの重要な次元にわたって制約されたデコードアプローチを評価する評価フレームワークを提示します。制約に準拠した出力の生成効率、多様な制約タイプのカバレッジ、および生成された出力の品質です。
この評価を容易にするために、Jsonschemabenchを導入します。これは、さまざまな複雑さを伴う幅広い制約を含む10kの実世界のJSONスキーマを含む制約付きデコードのベンチマークです。
ベンチマークを既存の公式JSONスキーマテストスイートとペアにし、ガイダンス、アウトライン、ラマック、Xgrammar、Openai、Geminiなど、6つの最先端の制約付きデコードフレームワークを評価します。
広範な実験を通じて、実際のJSONスキーマを使用した構造化された生成の制約されたデコードの能力と制限に関する洞察を得ます。
私たちの仕事は、制約されたデコードフレームワークと構造化された生成タスクを改善するための実用的な洞察を提供し、制約されたデコードと構造化された生成を評価するための新しい基準を設定します。
https://github.com/guidance-ai/jsonschemabenchでjsonschemabenchをリリースします

要約(オリジナル)

Reliably generating structured outputs has become a critical capability for modern language model (LM) applications. Constrained decoding has emerged as the dominant technology across sectors for enforcing structured outputs during generation. Despite its growing adoption, little has been done with the systematic evaluation of the behaviors and performance of constrained decoding. Constrained decoding frameworks have standardized around JSON Schema as a structured data format, with most uses guaranteeing constraint compliance given a schema. However, there is poor understanding of the effectiveness of the methods in practice. We present an evaluation framework to assess constrained decoding approaches across three critical dimensions: efficiency in generating constraint-compliant outputs, coverage of diverse constraint types, and quality of the generated outputs. To facilitate this evaluation, we introduce JSONSchemaBench, a benchmark for constrained decoding comprising 10K real-world JSON schemas that encompass a wide range of constraints with varying complexity. We pair the benchmark with the existing official JSON Schema Test Suite and evaluate six state-of-the-art constrained decoding frameworks, including Guidance, Outlines, Llamacpp, XGrammar, OpenAI, and Gemini. Through extensive experiments, we gain insights into the capabilities and limitations of constrained decoding on structured generation with real-world JSON schemas. Our work provides actionable insights for improving constrained decoding frameworks and structured generation tasks, setting a new standard for evaluating constrained decoding and structured generation. We release JSONSchemaBench at https://github.com/guidance-ai/jsonschemabench

arxiv情報

著者 Saibo Geng,Hudson Cooper,Michał Moskal,Samuel Jenkins,Julian Berman,Nathan Ranchin,Robert West,Eric Horvitz,Harsha Nori
発行日 2025-02-10 15:41:37+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.CL パーマリンク