<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>shibuiyusuke</author_name>
  <author_url>https://blog.hatena.ne.jp/shibuiyusuke/</author_url>
  <blog_title>LayerX エンジニアブログ</blog_title>
  <blog_url>https://tech.layerx.co.jp/</blog_url>
  <categories>
    <anon>AI Agent</anon>
    <anon>AI・LLM事業部</anon>
    <anon>LLM</anon>
  </categories>
  <description>2022年末のOpenAI GPT公開以降、LLMをソフトウェアに組み込む流れが広がる中で、2023年6月のFunction callingの登場は画期的でした。これは出力形式をJSONで定義し、LLMの応答を構造化できる仕組みで、現在はStructured Outputとして発展しています。 しかし、Structured Outputを使うには毎回出力形式を定義する必要があり、ユーザー入力型のシステムでは困難です。LLMは柔軟な自然言語応答が強みですが、出力の自由度が高すぎるとソフトウェアで扱いにくいという課題があります。 この課題を解決するために、**プロンプトから自動でStructured Outputを生成するライブラリ「auto-structured-output」**を開発しました。これはプロンプトを解析してPydanticモデルを自動生成し、OpenAI APIのStructured Output形式に準拠した型安全な出力を実現します。これにより、LLM出力の安定性と情報構造の一貫性を簡単に確保できます。</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftech.layerx.co.jp%2Fentry%2F2025%2F10%2F06%2F080000&quot; title=&quot;LLMの出力構造を推論して自動的に構造化する - LayerX エンジニアブログ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/s/shibuiyusuke/20251006/20251006064716.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2025-10-06 08:34:45</published>
  <title>LLMの出力構造を推論して自動的に構造化する</title>
  <type>rich</type>
  <url>https://tech.layerx.co.jp/entry/2025/10/06/080000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
