<#C088ZNU7QQ5|ask-ai> My agent just tried to use a...
# ask-ai
f
#ask-ai My agent just tried to use a function tool that does not exist! I've not seen this behaviour before - is it something that's known to happen? Or is it an artifact of some bad prompting?
t
Thanks for reaching out, Steve. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I understand how frustrating it can be when an agent tries to use a function tool that isn’t registered or doesn’t exist. Usually, the system gently filters out these calls before they run, so the tool call is simply ignored rather than causing an error. However, if the system does try to execute an unregistered tool, it might lead to an exception or an unresolved reference. This often happens due to a misconfiguration or an issue during the tool registration process. Making sure all tools are properly registered in the agent's tool context can really help avoid these problems. If you think there’s a specific issue or if you’d like me to assist you further, please share the details—I’m here to help you get this sorted out. Sources: livekit-agents/livekit/agents/voice/agent_activity.py | plugins/openai/src/realtime/realtime_model.ts | Tool definition and use | LiveKit docs
f
Pretty sure it's the prompting tbh. It looks like LLM extended an existing pattern (matching existing tools with name 'updateUser<THING>') - to imply the existance of a tool, using information from the instructions.
t
That makes perfect sense! Sometimes, the LLM might pick up on patterns in the instructions or naming conventions and assume a tool exists, even if it doesn’t. This can happen when the model tries to fill in the gaps based on what it’s seen before, without double-checking if the tool is actually available. To help with this, you can clearly define which tools are available in your instructions or set some boundaries to stop the LLM from making guesses. If you’d like, I’m here to help you fine-tune those instructions or work through this together—just let me know!