1:1 mentoring with Big Tech AI engineers
Q4

Your agent is taking 15 tool calls to complete a task that should take 3. What do you do?

Fundamentals & Architecture

Tool UseDebuggingAgentsOptimization

How to Answer

"I'd diagnose in this order:

  • (1)Check tool descriptions — are they ambiguous? If the agent can't tell which tool to use, it tries them all. Fix the descriptions.
  • (2)Check if it's re-calling the same tool — add deduplication.
  • (3)Check context bloat — after 10 calls, the context is so long the model loses track. Add observation summarization.
  • (4)Consider a planner step — if the agent is wandering, a plan upfront constrains the path.
  • (5)Check the system prompt — add explicit guidance like 'you should need at most 5 tool calls for this type of task.'"