Why does my character hallucinate External API data

Hi, I’m trying to integrate External APIs into my character and I’m running into issues with how the model generates responses.

Scenario:

I have a character that is supposed to provide real-time information, for example searches for points of interest (restaurants, ATMs, attractions, etc.) via an External API I configured called search_places, based on Google Places. I tested the API calls in my code and they work correctly.

However, when I chat with the character in the Playground:

  • sometimes the character responds correctly based on the real API results,

  • other times the character invents data that is not present in the API results,

  • or it mixes real API data with unverified information generated by the model.

Currently I am not using Narrative Design or advanced triggers — my character relies on the Character Description only.

My Character Description includes clear instructions such as:

“Never invent real-time data.
When updated information is requested (weather, places, etc.), always use external tools available to get reliable data.”

However this is not sufficient to guarantee that the model actually calls the API or correctly uses the returned data.

My specific question:

What is the recommended best practice for using External APIs with Convai so that the model does not hallucinate or invent information that is not present in the API results?

Hello,

To investigate this properly, could you please share:

  • The Character ID

  • The Session ID(s) where this behavior occurred

  • Which LLM you are using for this character

Hi, thanks for the quick response — I’m happy to provide the details you requested.

Below are the specific identifiers and settings related to the sessions where the character returned incorrect / hallucinated information.

:small_blue_diamond: Character ID:
8dd072c6-0822-11f1-9957-42010a7be027

:small_blue_diamond: Session ID(s) with incorrect behavior:

c5779974669689518623e7e76cf12122

Please let me know if you need additional session IDs for further investigation.

:small_blue_diamond: LLM Model used for this character:
gpt-4o

To clarify the issue:

I have an External API method called search_places which correctly returns results from Google Places. The first response within the Session ID is correct and based on real API data.

From the second response onward in the same session, the character starts generating invented locations that do not exist.

If it can help with the investigation, I can also share the code I use to call the API.

Thank you for sharing these details.

I’ve passed this on to our team, and they will review it and follow up here as soon as possible. Thank you for your patience in the meantime.

1 Like

Hi, any updates on this?

Hi, any updates on this?

We’ll share an update in this thread as soon as there is one. Thank you for your patience in the meantime.

Hi, can you pls confirm if you are still facing the issue ?

Hi, I can confirm that the issue is still occurring.
I’ve run several tests on other characters as well, updating the character description and setting up triggers in the Narrative Design, but I continue to experience incorrect behaviors.
I would really appreciate more detailed guidance, both for resolving the issue and for properly integrating the external APIs, as the current documentation hasn’t been sufficient to clarify my doubts.
Without more in-depth support, I’m concerned that I may not be able to continue using the service.

Sorry for the delay, the issue has been identified. And we are in the process of rolling out the patch.

Regarding the issue, it was due to :
‘required’ is required to be supplied and to be an array including every key in properties. Missing ‘city’.

It seems your input description didn’t met this criteria leading to failed tool callings, leading to hallucinated information.

Hello,

Could you please try again?