CCARF Practice Question
Correct answer: B
A: System prompt instructions cannot guarantee tool use when tool_choice is 'auto'. The API-level tool_choice parameter is the authoritative mechanism.
B: Setting tool_choice to {type: 'tool', name: 'extract_data'} forces the model to call that specific tool on every request, guaranteeing schema-compliant structured output with no possibility of text-only responses.
C: Retrying with the same 'auto' tool_choice may produce the same text response. Fixing tool_choice eliminates the problem at the API level rather than patching it after the fact.
D: Prompt-based JSON is less reliable than tool_use. It risks syntax errors and missing fields. Forcing the tool via tool_choice is the correct approach.