Upgrade to Pro — share decks privately, control downloads, hide ads and more …

PLaMo 3.0 Primeの構造化出力サポート

PLaMo 3.0 Primeの構造化出力サポート

2026年7月30日に開催された「PFN LLMオープンハウス」での講演資料です。

Preferred Networks PRO

July 30, 2026

Transcript

55 slides
  1. PLaMo 3.0 Primeは構造化出力をサポート 指定したJSONSchemaに従うJSON文字列を必ず出力させることができる "response_format": { "type": "json_schema", "json_schema": {

    "name": "company", "schema": { "type": "object", "properties": { "name": {"type": "string"}, "founded_year": {"type": "integer"}, "location": {"type": "string"}, "employees": {"type": "integer"} }, "required": ["name", "founded_year", "location", "employees"], "additionalProperties": false } } } 9
  2. PLaMo 3.0 Primeは構造化出力をサポート 指定したJSONSchemaに従うJSON文字列を必ず出力させることができる "response_format": { "type": "json_schema", "json_schema": {

    "name": "company", "schema": { "type": "object", "properties": { "name": {"type": "string"}, "founded_year": {"type": "integer"}, "location": {"type": "string"}, "employees": {"type": "integer"} }, "required": ["name", "founded_year", "location", "employees"], "additionalProperties": false } } 10 } chat-completionsのリクエストの一部
  3. PLaMo 3.0 Primeは構造化出力をサポート 指定したJSONSchemaに従うJSON文字列を必ず出力させることが "response_format": { できる "type": "json_schema", "json_schema":

    { "name": "company", "schema": { "type": "object", "properties": { "name": {"type": "string"}, "founded_year": {"type": "integer"}, "location": {"type": "string"}, "employees": {"type": "integer"} }, "required": ["name", "founded_year", "location", "employees"], "additionalProperties": false } } } 11
  4. PLaMo 3.0 Primeは構造化出力をサポート 指定したJSONSchemaに従うJSON文字列を必ず出力させることができる リクエスト "response_format": { "type": "json_schema", "json_schema":

    { "name": "company", "schema": { "type": "object", "properties": { "name": {"type": "string"}, "founded_year": {"type": "integer"}, "location": {"type": "string"}, "employees": {"type": "integer"} }, "required": ["name", "founded_year", "location", "employees"], "additionalProperties": false } } } 12 "model": "plamo-3.0-prime", "response_format": (省略), "messages": [{"role": "user", "content": "次の文から情報を抽出 してください : 「ほしぞら書店株式会 社は2011年5月に横浜市中区で設 立された。従業員は約 120名。」"}],
  5. PLaMo 3.0 Primeは構造化出力をサポート 指定したJSONSchemaに従うJSON文字列を必ず出力 "response_format": { させることができる "type": "json_schema", "json_schema":

    { "model": "plamo-3.0-prime", "name": "company", {"name": "ほしぞら書店株式会社 ", "response_format": (省略), "schema": { "founded_year": 2011, "type": "object", "location": "横浜市中区 ", "messages": [{"role": "user", "properties": { "employees": 120} "name": {"type": "string"}, "content": "次の文から情報を抽出 "founded_year": {"type": "integer"}, "location": {"type": "string"}, してください : 「ほしぞら書店株式会 "employees": {"type": "integer"} レスポンス 社は2011年5月に横浜市中区で設 }, "required": ["name", "founded_year", "location", "employees"], 立された。従業員は約 120名。」"}], "additionalProperties": false } } } 13
  6. 構造化出力の仕組み 1. 与えられた文法からステートマシン を構築 2. ステートマシンがボキャブラリマスク を生成 ボキャブラリマスクは文法に沿うトークンだけ を抜き 出す

    3. トークンをサンプル する 4. サンプルしたトークンでステートマシンを更新 5. 完了状態になるまで2~4を繰り返し PFN Confidential
  7. 構造化出力の仕組み 1. 与えられた文法からステートマシンを構築 2. ステートマシンがボキャブラリマスクを生成 ボキャブラリマスクは文法に沿うトークンだけ を抜き abcde 出す ,

    3. トークンをサンプルする ボキャブラリ hoge 4. サンプルしたトークンでステートマシンを更新 {(中括弧開き) 5. 完了状態になるまで2~4を繰り返し bar {"comment": "OK PFN Confidential 次どうする "(ダブルクオート) ...
  8. 構造化出力の仕組み 1. 与えられた文法からステートマシンを構築 2. ステートマシンがボキャブラリマスクを生成 ボキャブラリマスクは文法に沿うトークン だけを抜き abcde 出す マスク

    XXXXXXXXXX 3. トークンをサンプルする 生成! hoge 4. サンプルしたトークンでステートマシンを更新 XXXXXXXXXX 5. 完了状態になるまで2~4を繰り返し bar {"comment": "OK PFN Confidential 次どうする "(ダブルクオート) ...
  9. 構造化出力の仕組み abcde XXXXXXXXXX hoge 1. 与えられた文法からステートマシンを構築 XXXXXXXXXX 2. ステートマシンがボキャブラリマスクを生成 bar

    ボキャブラリマスクは文法に沿うトークンだけを抜き XXXXXXXXXX "(ダブルクオート) 出す ... 3. トークンをサンプルする 4. サンプルしたトークンでステートマシンを更新 今回はこちらをサンプル 5.{"comment": 完了状態になるまで2~4を繰り返し "OK" PFN Confidential
  10. 構造化出力の仕組み 1. 与えられた文法からステートマシンを構築 XXXXXXXXXX 新しいボキャブラリマスクを生成 2. ステートマシンがボキャブラリマスク,(カンマ) を生成 XXXXXXXXXX ボキャブラリマスクは文法に沿うトークンだけ

    を抜き XXXXXXXXXX 出す XXXXXXXXXX 3. トークンをサンプル する XXXXXXXXXX 4.{"comment": サンプルしたトークンでステートマシンを更新 "OK" 次どうする 5. 完了状態になるまで 2~4を繰り返し ↺ PFN Confidential
  11. PLaMo 3.0 Primeは構造化出力をサポート 指定したJSONSchemaに従うJSON文字列を必ず出力 "response_format": { させることができる "type": "json_schema", "json_schema":

    { "model": "plamo-3.0-prime", "name": "company", {"name": "ほしぞら書店株式会社 ", "response_format": (省略), "schema": { "founded_year": 2011, "type": "object", "location": "横浜市中区 ", "messages": [{"role": "user", "properties": { "employees": 120} "name": {"type": "string"}, "content": "次の文から情報を抽出 "founded_year": {"type": "integer"}, "location": {"type": "string"}, してください : 「ほしぞら書店株式会 "employees": {"type": "integer"} レスポンス 社は2011年5月に横浜市中区で設 }, "required": ["name", "founded_year", "location", "employees"], 立された。従業員は約 120名。」"}], "additionalProperties": false } } } 21
  12. PLaMo 3.0 Primeは構造化出力をサポート 指定したJSONSchemaに従うJSON文字列を必ず出力 "response_format": { させることができる "type": "json_schema", "json_schema":

    { "model": "plamo-3.0-prime", "name": "company", {"name": "ほしぞら書店株式会社 ", 実は内部ではJSONSchemaだけではなく "messages": "schema": { [{"role": "user", "founded_year": 2011, "type": "object", "location": "横浜市中区 ", "content": "次の文から情報を抽出 「推論」と「ツール呼出し」でも "properties": { "employees": 120} "name":: {"type": "string"}, してください 「ほしぞら書店株式会 構造化出力を利用している "founded_year": {"type": "integer"}, "location": {"type": "string"}, 社は2011年5月に横浜市中区で設 "employees": {"type": "integer"} 立された。従業員は約 120名。」"}], }, "required": ["name", "founded_year", "location", "employees"], "additionalProperties": false } } } 22
  13. Chat-completions リクエスト 構造化 出力 推論 を設定 パーサー 入出力上書きプロキシ PFN Confidential

    g n i n lls ent a c t o _ n s l o c ea oo . r t . . e g ge ge a a a s ss ss mes e e m m PLaMo推論時のデータの流れ 23 ツール 呼出 パーサー 後処理 レスポンス
  14. Chat-completions リクエスト 構造化 出力 推論 を設定 パーサー 入出力上書きプロキシ PFN Confidential

    g n i n lls ent a c t o _ n s l o c ea oo . r t . . e g ge ge a a a s ss ss mes e e m m PLaMo推論時のデータの流れ 24 ツール 呼出 パーサー 後処理 レスポンス
  15. Chat-completions リクエスト 構造化 出力 推論 を設定 パーサー 入出力上書きプロキシ PFN Confidential

    g n i n lls ent a c t o _ n s l o c ea oo . r t . . e g ge ge a a a s ss ss mes e e m m PLaMo推論時のデータの流れ 25 ツール 呼出 パーサー 後処理 レスポンス
  16. Chat-completions リクエスト 構造化 出力 推論 を設定 パーサー 入出力上書きプロキシ PFN Confidential

    g n i n lls ent a c t o _ n s l o c ea oo . r t . . e g ge ge a a a s ss ss mes e e m m PLaMo推論時のデータの流れ 26 ツール 呼出 パーサー 後処理 レスポンス
  17. Chat-completions リクエスト 構造化 出力 推論 を設定 パーサー 入出力上書きプロキシ PFN Confidential

    g n i n lls ent a c t o _ n s l o c ea oo . r t . . e g ge ge a a a s ss ss mes e e m m PLaMo推論時のデータの流れ 27 ツール 呼出 パーサー 後処理 レスポンス
  18. 入力部分 <|plamo:tag|>system ... <|plamo:tag|>tool_definitions<|plamo:constrain|>json<|plamo:msg|> ...tool definitions... <|plamo:tag|>user<|plamo:msg|> ... <|plamo:tag|>assistant ...PFML3

    annotations... <|plamo:msg|> <|plamo:begin_think:plamo|> ...reasoning_content... <|plamo:end_think:plamo|> ...free text... OR/AND ```json ...JSON_text... ``` <|plamo:begin_tool_requests:plamo|> <|plamo:begin_tool_request:plamo|> <|plamo:begin_tool_name:plamo|> ...tool_name... <|plamo:end_tool_name:plamo|> <|plamo:begin_tool_arguments:plamo|> <|plamo:constrain|>json <|plamo:msg|>...tool_arguments... <|plamo:end_tool_arguments:plamo|> <|plamo:end_tool_request:plamo|> ...other tool_request... <|plamo:end_tool_requests:plamo|> PLaMo 3.0 Primeの 入出力フォーマット 推論 コンテント 出力部分 ツール呼出し ※読みやすさのために改行・空白を入れていますが、実際はありません PFN Confidential 28
  19. 入力部分 <|plamo:tag|>system ... <|plamo:tag|>tool_definitions<|plamo:constrain|>json<|plamo:msg|> ...tool definitions... <|plamo:tag|>user<|plamo:msg|> ... <|plamo:tag|>assistant ...PFML3

    annotations... <|plamo:msg|> <|plamo:begin_think:plamo|> ...reasoning_content... <|plamo:end_think:plamo|> ...free text... OR/AND ```json ...JSON_text... ``` <|plamo:begin_tool_requests:plamo|> <|plamo:begin_tool_request:plamo|> <|plamo:begin_tool_name:plamo|> ...tool_name... <|plamo:end_tool_name:plamo|> <|plamo:begin_tool_arguments:plamo|> <|plamo:constrain|>json <|plamo:msg|>...tool_arguments... <|plamo:end_tool_arguments:plamo|> <|plamo:end_tool_request:plamo|> ...other tool_request... <|plamo:end_tool_requests:plamo|> PLaMo 3.0 Primeの 入出力フォーマット 推論 コンテント <|plamo:begin_think:plamo|> 出力部分 ツール呼出し ...reasoning_content... (tool_calls) <|plamo:end_think:plamo|> PFN Confidential 29
  20. 入力部分 <|plamo:tag|>system ... <|plamo:tag|>tool_definitions<|plamo:constrain|>json<|plamo:msg|> ...tool definitions... <|plamo:tag|>user<|plamo:msg|> ... <|plamo:tag|>assistant ...PFML3

    annotations... <|plamo:msg|> <|plamo:begin_think:plamo|> ...reasoning_content... <|plamo:end_think:plamo|> ...free text... OR/AND ```json ...JSON_text... ``` <|plamo:begin_tool_requests:plamo|> <|plamo:begin_tool_request:plamo|> <|plamo:begin_tool_name:plamo|> ...tool_name... <|plamo:end_tool_name:plamo|> <|plamo:begin_tool_arguments:plamo|> <|plamo:constrain|>json <|plamo:msg|>...tool_arguments... <|plamo:end_tool_arguments:plamo|> <|plamo:end_tool_request:plamo|> ...other tool_request... <|plamo:end_tool_requests:plamo|> PLaMo 3.0 Primeの 入出力フォーマット 推論 コンテント <|plamo:begin_think:plamo|> 出力部分 ツール呼出し ...reasoning_content... (tool_calls) <|plamo:end_think:plamo|> PFN Confidential 30
  21. 推論 / ツール呼出し パーサー 推論 / ツール呼出し パーサーは モデルからの生の出力をパース →

    OpenAI APIのレスポンス形式に変換 する ❌推論パーサーなし : choices[0].message.content == “<|plamo:begin_think:plamo|>I say hello<|plamo:end_think:plamo|>hello...” ⭕推論パーサーあり : choices[0].message.reasoning == “I say hello” choices[0].message.content == “hello...” PFN Confidential 31 ※ツール呼出し パーサーも同様
  22. Chat-completions リクエスト 構造化 出力 推論 を設定 パーサー 入出力上書きプロキシ PFN Confidential

    g n i n lls ent a c t o _ n s l o c ea oo . r t . . e g ge ge a a a s ss ss mes e e m m PLaMo推論時のデータの流れ 32 ツール 呼出 パーサー 後処理 レスポンス
  23. Chat-completions リクエスト 構造化 出力 推論 を設定 パーサー 入出力上書きプロキシ PFN Confidential

    g n i n lls ent a c t o _ n s l o c ea oo . r t . . e g ge ge a a a s ss ss mes e e m m PLaMo推論時のデータの流れ 33 ツール 呼出 パーサー 後処理 レスポンス
  24. 推論 / ツール呼出し / コンテントのための構造化出力 推論 / ツール呼出し / コンテント

    に パースできることを保証する 構造化 出力 を設定 それに加えて、 コンテントのJSONSchema サポート PFN Confidential 34
  25. 推論 / ツール呼出し / コンテントのための構造化出力 推論 / ツール呼出し / コンテント

    に 構造化 パースできることを保証する それに加えて、 JSONじゃない! コンテントのJSONSchema サポート <|plamo:begin_think:plamo|> ...reasoning_content... <|plamo:end_think:plamo|> PFN Confidential 35 出力 を設定
  26. 推論 / ツール呼出し / コンテントのための構造化出力 推論 / ツール呼出し / コンテント

    に 構造化 パースできることを保証する それに加えて、 JSONじゃない! コンテントのJSONSchema サポート <|plamo:begin_think:plamo|> 出力 を設定 Lark formatで指定 ...reasoning_content... <|plamo:end_think:plamo|> PFN Confidential 36
  27. PLaMo 3.0 Primeの構造化出力バックエンド : llguidance OpenAI API公式も使っているllguidanceを採用 • 他のバックエンドより高速: outlines,

    xgrammar... • JSONSchemaだけでなく文脈自由文法のLark formatをサポート PFN Confidential 37 引用元: https://raw.githubusercontent.com/guidance-ai/jsonschemabench/main/maskbench/plots/hero.png
  28. PLaMo 3.0 Primeの構造化出力バックエンド : llguidance OpenAI API公式も使っているllguidanceを採用 ※Rust製のllguidanceに • 他のバックエンドより高速:

    outlines, xgrammar... PLaMoサポートを追加するために • JSONSchemaだけでなく文脈自由文法のLark formatをサポート plamo3 tokenizerのRust移植を実施 PFN Confidential 38 引用元: https://raw.githubusercontent.com/guidance-ai/jsonschemabench/main/maskbench/plots/hero.png
  29. Lark formatによる構造化出力の文法定義 太字部分 はリクエストごとに設定される部分 start: assistant_message assistant_message: reasoning content_and_function_calling reasoning:

    <|plamo:begin_ "think" :plamo|> REASONING_CONTENT <|plamo:end_ "think" :plamo|> REASONING_CONTENT: /[\s\S]{1,}/ content_and_function_calling: content function_calling content: "```json\n" %json {"type": "object", "properties": {"answer": {"type": "string"}, "score": {"type": "integer"}}, "required": ["answer", "score"]} "\n```" ( <|plamo:begin_ "tool_requests" :plamo|> | <|plamo:tag|> ) function_calling: tool_requests tool_requests: tool_request <|plamo:end_ "tool_requests" :plamo|> <|plamo:tag|> tool_request: <|plamo:begin_ "tool_request" :plamo|> ( <|plamo:begin_ "tool_name" :plamo|> "get_weather" <|plamo:end_ "tool_name" :plamo|> <|plamo:begin_ "tool_arguments" :plamo|> <|plamo:constrain|> "json" <|plamo:msg|> %json {"type": "object", "properties": {"location": {"type": "string"}, "unit": {"type": "string", "enum": ["c", "f"]}}, "required": ["location"], "additionalProperties": false} <|plamo:end_ "tool_arguments" :plamo|> ) <|plamo:end_ "tool_request" :plamo|> ※この文法定義は「 JSONSchema指定あり」「reasoning有効」「tool_choice=auto」の場合のもの PFN Confidential 39
  30. Lark formatによる構造化出力の文法定義 太字部分 はリクエストごとに設定される部分 start: assistant_message assistant_message: reasoning content_and_function_calling reasoning:

    <|plamo:begin_ "think" :plamo|> REASONING_CONTENT <|plamo:end_ "think" :plamo|> REASONING_CONTENT: /[\s\S]{1,}/ content_and_function_calling: content function_calling content: "```json\n" %json {"type": "object", "properties": {"answer": {"type": "string"}, "score": {"type": "integer"}}, "required": ["answer", "score"]} "\n```" ( <|plamo:begin_ "tool_requests" :plamo|> | <|plamo:tag|> ) function_calling: tool_requests tool_requests: tool_request <|plamo:end_ "tool_requests" :plamo|> <|plamo:tag|> tool_request: <|plamo:begin_ "tool_request" :plamo|> ( <|plamo:begin_ "tool_name" :plamo|> "get_weather" <|plamo:end_ "tool_name" :plamo|> <|plamo:begin_ "tool_arguments" :plamo|> <|plamo:constrain|> "json" <|plamo:msg|> %json {"type": "object", "properties": {"location": {"type": "string"}, "unit": {"type": "string", "enum": ["c", "f"]}}, "required": ["location"], "additionalProperties": false} <|plamo:end_ "tool_arguments" :plamo|> ) <|plamo:end_ "tool_request" :plamo|> ※この文法定義は「 JSONSchema指定あり」「reasoning有効」「tool_choice=auto」の場合のもの PFN Confidential 40
  31. Lark formatによる構造化出力の文法定義 start: assistant_message assistant_message: reasoning content_and_function_calling reasoning: <|plamo:begin_ "think"

    :plamo|> REASONING_CONTENT <|plamo:end_ "think" :plamo|> REASONING_CONTENT: /[\s\S]{1,}/ content_and_function_calling: content function_calling content: "```json\n" %json {"type": "object", "properties": {"answer": {"type": "string"}, "score": {"type": "integer"}}, "required": ["answer", "score"]} "\n```" ( <|plamo:begin_ "tool_requests" :plamo|> | <|plamo:tag|> ) function_calling: tool_requests tool_requests: tool_request <|plamo:end_ "tool_requests" :plamo|> <|plamo:tag|> ※この文法定義は「 JSONSchema指定あり」「reasoning有効」「tool_choice=auto」の場合のもの tool_request: <|plamo:begin_ "tool_request" :plamo|> ( <|plamo:begin_ "tool_name" :plamo|> "get_weather" <|plamo:end_ "tool_name" :plamo|> <|plamo:begin_ "tool_arguments" :plamo|> <|plamo:constrain|> "json" PFN Confidential 41 <|plamo:msg|> %json {"type": "object", "properties": {"location": {"type": "string"}, "unit": {"type":
  32. Lark formatによる構造化出力の文法定義 start: assistant_message assistant_message: reasoning content_and_function_calling reasoning: <|plamo:begin_ "think"

    :plamo|> REASONING_CONTENT <|plamo:end_ "think" :plamo|> 出力を保証 REASONING_CONTENT: /[\s\S]{1,}/ content_and_function_calling: content function_calling content: "```json\n" %json {"type": "object", "properties": {"answer": {"type": "string"}, "score": {"type": "integer"}}, "required": ["answer", "score"]} "\n```" ( <|plamo:begin_ "tool_requests" :plamo|> | <|plamo:tag|> ) function_calling: tool_requests tool_requests: tool_request <|plamo:end_ "tool_requests" :plamo|> <|plamo:tag|> ※この文法定義は「 JSONSchema指定あり」「reasoning有効」「tool_choice=auto」の場合のもの tool_request: <|plamo:begin_ "tool_request" :plamo|> ( <|plamo:begin_ "tool_name" :plamo|> "get_weather" <|plamo:end_ "tool_name" :plamo|> <|plamo:begin_ "tool_arguments" :plamo|> <|plamo:constrain|> "json" PFN Confidential 42 <|plamo:msg|> %json {"type": "object", "properties": {"location": {"type": "string"}, "unit": {"type": <|plamo:begin_think:plamo|> ...reasoning_content... <|plamo:end_think:plamo|>
  33. Lark formatによる構造化出力の文法定義 太字部分 はリクエストごとに設定される部分 start: assistant_message assistant_message: reasoning content_and_function_calling reasoning:

    <|plamo:begin_ "think" :plamo|> REASONING_CONTENT <|plamo:end_ "think" :plamo|> REASONING_CONTENT: /[\s\S]{1,}/ content_and_function_calling: content function_calling content: "```json\n" %json {"type": "object", "properties": {"answer": {"type": "string"}, "score": {"type": "integer"}}, "required": ["answer", "score"]} "\n```" ( <|plamo:begin_ "tool_requests" :plamo|> | <|plamo:tag|> ) function_calling: tool_requests tool_requests: tool_request <|plamo:end_ "tool_requests" :plamo|> <|plamo:tag|> tool_request: <|plamo:begin_ "tool_request" :plamo|> ( <|plamo:begin_ "tool_name" :plamo|> "get_weather" <|plamo:end_ "tool_name" :plamo|> <|plamo:begin_ "tool_arguments" :plamo|> <|plamo:constrain|> "json" <|plamo:msg|> %json {"type": "object", "properties": {"location": {"type": "string"}, "unit": {"type": "string", "enum": ["c", "f"]}}, "required": ["location"], "additionalProperties": false} <|plamo:end_ "tool_arguments" :plamo|> ) <|plamo:end_ "tool_request" :plamo|> ※この文法定義は「 JSONSchema指定あり」「reasoning有効」「tool_choice=auto」の場合のもの PFN Confidential 43
  34. Lark formatによる構造化出力の文法定義 太字部分 はリクエストごとに設定される部分 start: assistant_message assistant_message: reasoning content_and_function_calling reasoning:

    <|plamo:begin_ "think" :plamo|> REASONING_CONTENT <|plamo:end_ "think" :plamo|> REASONING_CONTENT: /[\s\S]{1,}/ content_and_function_calling: content function_calling content: "```json\n" %json {"type": "object", "properties": {"answer": {"type": "string"}, "score": {"type": "integer"}}, "required": ["answer", "score"]} "\n```" ( <|plamo:begin_ "tool_requests" :plamo|> | <|plamo:tag|> ) function_calling: tool_requests tool_requests: tool_request <|plamo:end_ "tool_requests" :plamo|> <|plamo:tag|> tool_request: <|plamo:begin_ "tool_request" :plamo|> ( <|plamo:begin_ "tool_name" :plamo|> "get_weather" <|plamo:end_ "tool_name" :plamo|> <|plamo:begin_ "tool_arguments" :plamo|> <|plamo:constrain|> "json" <|plamo:msg|> %json {"type": "object", "properties": {"location": {"type": "string"}, Lark format中でJSONSchemaを記述 "unit": {"type": "string", "enum": ["c", "f"]}}, "required": ["location"], "additionalProperties": false} <|plamo:end_ "tool_arguments" :plamo|> ) <|plamo:end_ "tool_request" :plamo|> ※この文法定義は「 JSONSchema指定あり」「reasoning有効」「tool_choice=auto」の場合のもの PFN Confidential 44
  35. 構造化出力の限界 構造化出力はLLMからの出力が特定のフォーマットに沿うように強制する しかしこれはモデルが出力する内容の精度には無関係 無限空白 /改行問題 として 構造化出力によってLLMの出力が壊滅するパターン 1. JSON文字列内で文字列を引用しようとして「"」を書く 2.

    JSON文字列が完結してしまう(本当は「\"」にする必要があった) 3. 構造化出力がJSON文法に沿う続きの出力を強制(戻れない) 4. LLMはJSON文法としては合法な「空白文字」を無限に連続出力する → 破綻、max_tokensを使い切る 構造化出力でよく発生する {"comment": "面白い感想だと思います。特に冒頭の",▢▢▢ ▢▢▢▢▢▢▢▢▢▢▢▢▢▢▢▢▢▢... 52

More Decks by Preferred Networks

Other Decks in Technology