I'm trying to create an AI that handles leads coming from ads.
The AI's prompt contains instructions on how to conduct the service. In the middle of the instructions, I ask the AI to perform actions in the CRM, for example, after asking the lead for their name, I request:
"create a new contact in the CRM"
And then there is a function with the description:
"use this function to create a new contact in the CRM"
In this case, it works perfectly. The AI returns the function it will use, and the JSON parameters that the function requires. Then, through Python, I execute the function that creates a new contact in the CRM.
However, in the prompt, I ask the AI to perform another action. After asking all the questions to the lead, I ask the AI to add a tag "tag_name" in the CRM, and I created a function with the description:
"use this function to add the tag 'tag_name' in the CRM"
to identify which leads have answered all the questions.
But in this case, the AI is not understanding that it needs to call this function. Sometimes it works, but most of the time it doesn’t call it.
What would be the ideal prompt and function description to make the AI understand that it needs to call a function?