sagelearnai

Tool Use & Function Calling: Scenarios

Questions covered

  1. The model keeps calling search_orders when users ask about refunds policy (which should use search_policies). Fix it.
  2. An agent with a send_email tool was tricked by a malicious document into emailing internal data. How do you redesign?
  3. Tool calls return huge JSON responses (50 KB) and the agent's quality drops. What do you do?
  4. The model invents arguments (fake order IDs) when the user didn't provide them. How do you fix it?
  5. You need the model to call a payment-refund API safely. Describe the flow.
  6. 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.

See plans →

Last reviewed 2026-11-05.