For the complete documentation index, see llms.txt. This page is also available as Markdown.

Common issues with advanced functions

When using advanced functions (function calling) , you may run into issues with certain models:

  • Function description that is too long;

  • Function response that is too long.

Let's look at both in detail 👇

Description too long

If your function's description exceeds 1,024 characters, some models (like OpenAI's) may respond with an error and refuse to answer the user's request. In this case, the Agent will respond with "I'm sorry, my responses are limited. You need to ask me the right questions", regardless of whether the function actually ran or not.

If you have a function with a very long description:

  1. Move part of the description to the instructions;

  2. Keep the function description within 1,024 characters.

-> This will allow you, in case of service issues, to quickly switch models and providers without additional configuration.

Even though we recommend keeping the description within 1,024 characters, on AIsuru you can still write longer descriptions, even though the description field shows a 1,024-character limit.

Function response too long

If your function returns an excessively long response, the language model may refuse to answer with "I'm sorry, my responses are limited. You need to ask me the right questions".

This happens because each language model has a maximum context limit it can handle. The limit varies by model and is particularly common when you use a web page URL as the function's webhook.

If you need to link to particularly long web pages, we suggest:

  1. Extracting only the relevant text sections from the page;

  2. Providing this information to the Agent in a more concise format (such as .txt, .md, or minimized .json);

  3. Considering the use of a model with a larger context window.

This way, the Agent can process the information without hitting the model's limits.

Note for web browsing: The built-in web search function has a 200,000-character limit for HTML pages. If you're using custom functions to access very long web pages, consider using the built-in web browsing function or pre-processing the content to reduce its size.

Function name too long

If your function's name exceeds 64 characters, all providers will return an error and the function cannot be saved or used.

To fix this:

  1. Use concise but descriptive names (e.g., book_appointment instead of book_specialist_medical_appointment_with_email_notification)

  2. Avoid repetition in the name

  3. Use common abbreviations where appropriate

How do you check if advanced functions are being called?

To verify that your functions are actually being used:

  1. Go to the Conversations section of your Agent

  2. Open a conversation where you think a function was used

  3. Look for the debug icon next to messages

  4. Click the bug icon to see the details of the function call

This lets you quickly verify whether your functions are being called and what results they're returning.

Last updated