Skip to content
ML Academy

LLMs, GenAI, RAG, agents, evaluation · insight-1569

Keep "no results" and "the call failed" as different tool outcomes

Evidence type
practitioner heuristic
Difficulty
easy
Roles
ML engineer, Applied AI
Industries
aviation, retail

Summary: situation, action, reason, boundary

  1. Situation

    A lookup tool returns an empty list both when no record matches and when the backing service is down.

  2. Action

    Return a distinct error status with a retryable flag for failures, reserve the empty result for a successful search that found nothing, and test the agent's behaviour on both cases.

  3. Reason

    The model can only reason from what the tool says, so an outage reported as emptiness is read as a fact about the world.

  4. Boundary

    Search, lookup and list tools.

Symptom or risk

The agent concludes that the customer has no booking and tells them so, turning an outage into a confident wrong answer.

Exceptions

None for tools whose results drive a decision.

Trade-offs

Wrappers must propagate error details instead of swallowing them.

Pitfalls

Default values and caught exceptions that convert errors into empty data.

Lessons and concepts