NVIDIA Certified Professional – Accelerated AI Infrastructure — Question 3
You are designing a virtual assistant that helps users check weather updates via external APIs. During testing, the agent frequently calls the incorrect tools, often hallucinating endpoints or returning incorrect formats. You suspect the prompt structure might be the root cause of these failures.
Which prompt design best supports consistent tool invocation in this agent?
Answer options
- A. Rely on the agent’s internal knowledge to infer tool usage
- B. Include tool names in natural language but without parameter examples
- C. Provide only a generic system instruction with no examples
- D. Use structured prompt templates with few-shot tool usage examples
Correct answer: D
Explanation
The correct answer is D because structured prompt templates with few-shot examples provide clear guidance on how to properly use the tools, reducing ambiguity. Options A, B, and C do not offer sufficient structure or clarity, which can lead to inconsistent tool invocation and incorrect outputs.