AI Agent does not work good

  • mainkpibs
    Fecha de consulta 23 de mayo de 2025, 7:10

    Hi , I have three problems at this moment

    1)this kind of answer can not be possible>


    Chatbot> He recibido tu correo electrónico. Estoy consultando tu información en nuestra base de datos.

    You said:ya?Sofia said Textually>

    Respuestas condicionales sobre pólizas:

    • Si existe {{ full_name }}: Hola {{ full_name }}, tu póliza activa es {{ plan1 }} con {{ insurer1 }}.
    • Si existen {{ plan1 }} y {{ insurer1 }} pero no {{ full_name }}: Tu póliza activa es {{ plan1 }} con {{ insurer1 }}.
    • Si no hay datos válidos: No he encontrado datos válidos o hay discrepancias en la información de tu póliza. Por favor, contacta a soporte para verificar tus datos.
    • Si no hay datos en absoluto: No se encontraron datos asociados a ese correo o la conexión con la base de datos falló. Por favor, verifica tu correo o intenta nuevamente más tarde.

    I mean chatbot can not anwser with techincal instrucctions, actions or rules to users.

    2)Dinamyc Variables are not being recognized for the Agent.
    3) When user provides email > call API and paste {{ email }} to the api to bring the JSON
    is not working well. It is not calling it when user provides email, but call when user ask for their policies. Althought the api calling was succefull, the chatbot did not recognized the dinamyc variables.

    Jotform Thread 27283081 Screenshot
  • John Jotform Support
    Fecha de respuesta 23 de mayo de 2025, 8:04

    Hi Jesus,

    Thanks for reaching out to Jotform Support. I understand the issue, but I’ll need a bit of time to work out a solution. I’ll get back to you shortly.

    Thanks for your patience, we appreciate it.

  • John Jotform Support
    Fecha de respuesta 24 de mayo de 2025, 8:37

    Hi Jesus,

    I've been checking your AI Agent named Sofia: Agente de Atención al Cliente, but I wasn’t able to find any Send API Request tool set up for the agent. When we format the API Execution message, there’s an option to insert dynamic values that come from the API request. You can easily set up the Send API Request tool for your AI Agent to trigger an API request based on the user's question. Let me show you how:

    1. In AI Agent Builder, in the blue navigation bar at the top of the page, click on Train.

    2. Click on Tools in the menu on the left, and then select Take Note.

    AI Agent does not work good Image 1 Screenshot 70

    3. In the Setup your API request section, enter your API Request URL or Endpoint in the API Request field.

    4. Then, in the API Request dropdown, select the type of request. In this example, I used the Get Request to retrieve information from the API endpoint I added.

    5. Clicking on the Gear icon opens a window where you can add query information such as HTTP Header and Request Data, if any. Don't forget to click on Save after adding them.

    AI Agent does not work good Image 2 Screenshot 81

    6. Click on Test Your API Request to see if the query is working. 

    7. In the window that opens, you’ll see data from your API endpoint if the request is successful. If not, an error message will appear. When that happens, double-check the request URL and query details, then give it another try.

    8. You can click toggle API Request to On position to show the request panel side by side with the response panel.

    9. Click on Ok when everything works as expected.

    AI Agent does not work good Image 3 Screenshot 92

    9. Next, the API Execution Message section is enabled by default. You can format the message that your agent will convey to the user with data from the request in the Message box.

    10. Click on Insert Value on the upper right side of the Message box to insert data from the API request.

    AI Agent does not work good Image 4 Screenshot 103

    11. Now, go ahead and add a prompt under the Agent Prompt section. This is what tells your agent exactly when to run the API request. The more specific your prompt is, the better the results will be.

    12. Click on Save, and you're done. 

    AI Agent does not work good Image 5 Screenshot 114

    Check out the screencast below to see how it works:

    AI Agent does not work good Image 6 Screenshot 125 If that’s not exactly what you’re looking for, can you explain a bit more so I can help you better? If you could share with us screenshots of what the Tool or Action you've set up that's not working as expected, we'll do a more in-depth investigation and work on finding a solution. We’ve got a guide here that’ll show you how to do that.

    Let us know if you need any more help.