演習 › 全問
問題 Q2-11
44 / 120分野2・ツールの配分とツール選択の設定
まだ解いていません。
文書の種類が不明な状態で、請求書用、契約書用、領収書用の3つの抽出ツールのうち、必ずどれかを呼ばせて、構造化された出力を得たい。tool_choice の設定として最も適切なものはどれか。
正解は D
- Aauto では、ツールを呼ばず、文章で答えてしまうことがあります。構造化された出力の保証になりません。
- B請求書用に固定すると、他の種類の文書に合わないツールで抽出して、誤りが出ます。
- Cnone では、構造化出力が得られません。
- D正解です。any は、どれかのツールを必ず呼ばせます。種類が不明でも、構造化された出力が得られます。
考え方:文書の種類が不明で、必ず構造化したいなら any。
出典:Claude Certified Architect – Foundations Exam Guide v1.0(英語)
Setting tool_choice: "any" to guarantee the model calls a tool rather than returning conversational texthttps://everpath-course-content.s3-accelerate.amazonaws.com/instructor…(取得 2026-11-20)
出典:Define tools
combine tool_choice: {"type": "any"} with strict tool use to guarantee both that one of your tools is called and that the tool inputs strictly follow your schema.https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-t…(取得 2026-11-20)