Urgent.News

What's breaking now, across thousands of outlets.

AI

When The Bot Has Three Tools Available And Confidently Picks The Wrong One

Once a conversational system gets wired up to more than one external tool, database lookup, calendar booking, payment processing, a new failure category appears that has nothing to do with whether any individual tool works correctly. The model has to first decide which tool a given request actually calls for, and that routing decision, often treated as trivial during development, turns out to be…

When a conversational system has multiple external tools available, a new failure category emerges beyond individual tool functionality. The model must decide which tool to use for a given request, but this routing decision often proves fragile in real-world scenarios. Tool calling, or function calling, is the modern term for this process, where the model selects the appropriate tool based on the user's message before proceeding.

Most demonstrations use clear cases, like booking an appointment or checking a balance, but real conversations are rarely that simple. The true difficulty arises when two tools seem plausible for a request, as often occurs between a general knowledge base search tool and a more specific structured lookup tool. A user asking about order status should go to the order status tool, but a user asking about return policy for damaged items could logically be handled by either tool.

Without explicit routing guidance, the model's choice fluctuates based on phrasing, leading to inconsistent and subtly degraded responses that may not generate the same error signals as complete failures. The issue becomes more severe when tools have real side effects, such as booking actions or payment triggers, as these require confirmation before execution.

The most common approach to fixing routing ambiguity is to provide more detailed descriptions for each tool, but this only goes so far in resolving requests that sit in the overlap zone between two tools. A more effective solution involves building an explicit disambiguation layer into the system prompt, instructing the model to recognize when a request could plausibly map to multiple tools and either ask for clarification or apply a tiebreaking rule.

For instance, if a request could be handled by either the general knowledge tool or the order-specific tool, prefer the order-specific tool when an order reference is present in the conversation. This approach resolves ambiguity deterministically, rather than relying on the model's implicit judgment, which causes inconsistency. For higher stakes cases involving write-capable actions, the focus should be on requiring confirmation before invoking any tool capable of real side effects, rather than attempting to perfect routing accuracy.

This aligns with the broader principle of tiered permission handling, where read-only tools can be invoked on reasonable inference, while tools with real consequences require explicit confirmation.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

The LLM Is Not Your Ranker. Four Layers, and It Only Touches Two

The pitch usually goes: send the catalog and the user's history to a model, get back a ranked list, delete the recommender.

  • LLMs should not replace classic top-k ranking metrics
  • LLM recommendation framed as retrieval-and-reasoning
  • LLM's primary role in layers 2 and 3 of four-layer stack

Jev use case รวม 7 หมวด จากโปรเจกต์จริง 100 กว่ารายการ

โดย Nokka (นก-กา) | 21 กันยายน 2569 บทความนี้เขียนโดย AI (โมเดล glm-5.3 ของผู้ให้บริการ ollama-cloud) ผ่าน Hermes Agent จาก Nous Research ตรวจสอบและเรียบเรียงโดย Nokka Jev โมเดลตัดสินใจของ TypeSafe…

AI Can Write Frontend Code — What Should Developers Still Know?

A few years ago, writing frontend code meant spending a lot of time typing HTML, CSS, and JavaScript yourself. Today, AI can generate a complete component in seconds.

  • HTML fundamentals essential despite AI code generation
  • CSS expertise needed for responsive design and optimization
  • JavaScript fundamentals crucial for understanding AI-generated code

More from Monday 21 September →