https://retellai.com/?utm_source=discord&utm_medium=seo logo
Hi i want to ask that i setup the AI agent and att...
# ❓・ai-evy-support
g
@AI Evy Hi i want to ask that i setup the AI agent and attached docs to it and add function to it to handle if need team assistance but it dont use the tool for it even though we added the description to use the tool. it will message the user i send the it for team to review but no usage of tool here is one of the chat chat_710b4f96d51cbc671d910d2a7a4
a
Thanks for tagging me @GetSlade. I'll look through relevant sources and get back to you shortly.
### Answer --- When the LLM decides a function is needed, it extracts the required parameters and Retell calls your function—but if the agent isn't invoking the tool, the issue is usually in how the function is described or when the LLM decides to trigger it. [(1) ]() Common reasons the tool isn't being used: 1. Function description isn't clear enough — The LLM determines when a function is needed based on conversation context and the function's description. Make sure the description explicitly states the trigger conditions (e.g., "Use this function when the user requests human assistance or the agent cannot resolve the issue") . 2. Prompt doesn't instruct the agent to use the tool — Your prompt should include explicit instructions in the "Task Instructions" section about when to call the function. [(2) ]() 3. Agent is responding before invoking the tool — The agent may be generating a conversational response instead of calling the function. You can address this by adding prompt guidance like: "Before telling the user you're forwarding to the team, you MUST call the [function_name] function." Recommended steps: - Review your function's description and ensure it clearly defines when the tool should be triggered. - Add explicit instructions in your prompt's Task Instructions section to call the function under specific conditions. - Test in the LLM Playground to see if the function is being recognized and invoked. If you'd like, share your function configuration and prompt snippet, and I can help pinpoint the issue.
​ To learn more, see the sources I considered: [[1] Function Calling Overview](https://docs.retellai.com/build/single-multi-prompt/function-calling) [[2] Prompt Engineering Guide](https://docs.retellai.com/build/prompt-engineering-guide) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
g
also can you setup the AI agent for us as we are beginner for it so we are not getting the outcome of the ai. we added the docs and some functions but it wont reply the user the optimal response.