Tool Use & Function Calling: Scenarios
Questions covered
- The model keeps calling
search_orderswhen users ask about refunds policy (which should usesearch_policies). Fix it. - An agent with a
send_emailtool was tricked by a malicious document into emailing internal data. How do you redesign? - Tool calls return huge JSON responses (50 KB) and the agent's quality drops. What do you do?
- The model invents arguments (fake order IDs) when the user didn't provide them. How do you fix it?
- You need the model to call a payment-refund API safely. Describe the flow.
- Latency is high because the agent makes 6 sequential tool calls. How do you speed it up?
This lesson is part of AI & ML Interview Prep. Unlock the full course to read it, take the quiz and track your progress.