演習 › 全問
問題 Q4-11
90 / 120分野4・ツール使用とJSONスキーマ
まだ解いていません。
種類の分からない書類(請求書、契約書、領収書のいずれか)が届く。種類ごとの3つの抽出ツールを定義してある。必ずどれかのツールで構造化して出力させたい。tool_choice の設定として最も適切なものはどれか。
正解は C
- Aauto では、ツールを使わず、文章で返す場合があります。
- B特定の種類に固定すると、他の種類の書類を誤って処理します。
- C正解です。any は、どれかのツールを必ず呼びます。書類の種類が不明でも、構造化した出力が得られます。
- Dnone は、ツールを使わせません。
考え方:種類が不明で、必ず構造化したいなら tool_choice は any。
出典:Claude Certified Architect – Foundations Exam Guide v1.0(英語)
The distinction between tool_choice: "auto" (model may return text instead of calling a tool), "any" (model must call a tool but can choose which), and forced tool selection (model must call a specific named tool)https://everpath-course-content.s3-accelerate.amazonaws.com/instructor…(取得 2026-11-20)
出典:Claude Certified Architect – Foundations Exam Guide v1.0(英語)
Setting tool_choice: "any" to guarantee structured output when multiple extraction schemas exist and the document type is unknownhttps://everpath-course-content.s3-accelerate.amazonaws.com/instructor…(取得 2026-11-20)