AI / Agentic AI Interview Questions
How do you troubleshoot an agent that repeatedly calls the wrong tool?
- Review the tool's schema and description, since the agent only ever sees the declared name and description, not the implementation, a vague or overlapping description is a common root cause
- Check for context bloat, if many tools with similar-sounding descriptions are all injected into context at once, the agent may struggle to distinguish between them
- Examine recent reasoning traces to see what the agent's stated thought was before the wrong tool call, this often reveals a misunderstanding rather than a random error
- Test whether narrowing the set of tools exposed for that specific step resolves the issue, which points to a selection problem rather than a reasoning problem
- Check whether the underlying task itself is genuinely ambiguous, in which case the fix may be clarifying the prompt or goal rather than the tool descriptions
In most cases, this kind of misbehavior traces back to the tool's description acting as an unclear contract rather than a flaw in the model's reasoning ability itself, which is why refining descriptions is usually the first and most effective fix to try.
More Related questions...