Anthropic finds over 10,000 vulnerabilities with Project GlasswingSynthID expands to Google Search and ChromeGoal mode now available across all Codex platformsCodex Thursday adds remote Mac controlAnthropic publishes early Project Glasswing resultsAnthropic updates vulnerability disclosure dashboardReleases new science-focused AI skills toolGemini 3.5 Flash released with enhanced research toolsGoogle launches ADK for Kotlin and Android 0.1.0Gemini 3.5 Flash officially launchedAI solves long-standing open math problem for first timeGoogle announces Gemini Omni for video creationUse multiple agents with Gemini OmniOpenAI Introduces Guaranteed Capacity for Long-Term ComputeGemini for Science assists with research tasksSynthID watermark and verification tool added to AI imagesGoogle I/O 2026 to unveil new AI breakthroughsOpenAI boosts image provenance and verificationKPMG rolls out Claude globally, starting with taxGoogle adds Managed Agents to the Gemini APIAnthropic finds over 10,000 vulnerabilities with Project GlasswingSynthID expands to Google Search and ChromeGoal mode now available across all Codex platformsCodex Thursday adds remote Mac controlAnthropic publishes early Project Glasswing resultsAnthropic updates vulnerability disclosure dashboardReleases new science-focused AI skills toolGemini 3.5 Flash released with enhanced research toolsGoogle launches ADK for Kotlin and Android 0.1.0Gemini 3.5 Flash officially launchedAI solves long-standing open math problem for first timeGoogle announces Gemini Omni for video creationUse multiple agents with Gemini OmniOpenAI Introduces Guaranteed Capacity for Long-Term ComputeGemini for Science assists with research tasksSynthID watermark and verification tool added to AI imagesGoogle I/O 2026 to unveil new AI breakthroughsOpenAI boosts image provenance and verificationKPMG rolls out Claude globally, starting with taxGoogle adds Managed Agents to the Gemini API
🔒 公式発表のみ掲載。噂・リーク・情報商材は載せません。
← Back to glossary

Structured Output

構造化出力

こうぞうかしゅつりょく

Definition

Structured output is an output style that forces responses into a predefined structure so downstream systems can process them reliably. It is important for integrating LLMs into applications and workflows.

LLMの回答を「人間が読む」だけでなく「プログラムが処理する」用途が急増しています。しかし自然言語の出力をそのままコードで扱おうとすると、フォーマットのばらつきに悩まされます。構造化出力とは、LLMの応答をJSON・XML・YAMLなどの機械可読な形式で生成させる技術で、出力を下流のプログラムが確実にパースできるようにするものです。

なぜ構造化出力が求められるのか

LLMをアプリケーションに組み込む場面では、出力を次の処理に渡す必要があります。たとえば「ユーザーのレビューから、評価(1〜5)、要約、キーワードを抽出して」という処理を行う場合、結果がプログラムで確実にパースできるJSONでないと、後続の処理が破綻します。「たいていJSON形式で返してくれるが、たまにフォーマットが崩れる」という不安定さは、本番環境では許容できません。

実現のアプローチ

構造化出力を実現する方法は大きく3つあります。プロンプトでの指示は最もシンプルで、「以下のJSON形式で出力してください」とスキーマを示す方法です。手軽ですが、モデルがスキーマに従わない場合があります。

APIレベルのスキーマ強制は、OpenAIの「Structured Outputs」機能やAnthropicのツール利用機能で実現できます。JSONスキーマを定義してAPIに渡すと、モデルの出力が必ずそのスキーマに準拠することが保証されます。出力の型安全性がAPI側で担保されるため、最も信頼性の高い方法です。

後処理での修正は、モデルの自由形式の出力から正規表現やパーサーで必要な情報を抽出する方法です。柔軟性は高いですが、実装が複雑になりがちです。

関数呼び出しとの関係

構造化出力と関数呼び出し(Function Calling)は密接に関連しています。関数呼び出しでは、モデルが「どの関数をどの引数で呼ぶか」をJSON形式で出力します。これは本質的に構造化出力の一形態です。実際、OpenAIのStructured Outputs機能は、関数呼び出しと同じ技術基盤の上に構築されています。関数呼び出しは「アクションのための構造化出力」と捉えることもできます。

設計のベストプラクティス

スキーマ設計にはいくつかのコツがあります。フィールド名は説明的にすること(`s`より`sentiment_score`)。列挙型(enum)を活用すること(自由テキストより選択肢を制限)。ネストを深くしすぎないこと(2〜3階層まで)。そしてオプショナルフィールドにはデフォルト値を用意することです。

実務での活用シーン

構造化出力は、データ抽出パイプライン、分類・タグ付けシステム、APIのレスポンス生成、フォーム入力の自動化など、LLMの出力をプログラムが消費するあらゆる場面で活用されています。AIアプリケーション開発において、構造化出力の設計は「プロンプトエンジニアリング」と同様に重要なスキルです。

h
hayami

Stay on top of OpenAI, Google & Anthropic updates. An AI digest for business professionals.

Source Policy

We use only official sources. Each article links to the original announcement so you can verify it yourself.

© 2026 hayami. All rights reserved.