https://retellai.com/?utm_source=discord&utm_medium=seo logo
Hi, I have an issue
# ❓・ai-evy-support
n
@AI Evy Hi, I have an issue. When retell is sending a request to cal.com. The first request seems always to be in this format: tool_call_id: bd0c0ea970da79ca { "time": "2025-12-17T16:00:00", "timezone": "Europe/Brussels", "name": "Julie Peeters", "email": "hello@moon-landing.agency", "execution_message": "Dank u wel, mevrouw Peeters. Ik leg uw afspraak nu vast voor woensdag 17 december om 16:00 uur voor een tandartscontrole." } Eventhough I asked clearly to add phone number. It does not send the phone number in the request. When the AI receptionist aks again for the phone number. I get this request suddenly: tool_call_id: 8dad00e9dda91c97 { "time": "2025-12-17T16:00:00", "timezone": "Europe/Brussels", "name": "Julie Peeters", "email": "hello@moon-landing.agency", "attendeePhoneNumber": "+32488633682", "title": "Tandartsafspraak", "notes": "Eerstvolgende afspraak voor tandartscontrole", "guests": null, "rescheduleReason": null, "execution_message": "Dank u wel, mevrouw Peeters. Ik verwerk nu uw afspraak voor woensdag 17 december om 16:00 uur. U ontvangt zo meteen een bevestiging per sms." } In the second request, it adds the phone number and other fields as well. I tried to prompt it better but it won't add the phone number in the fist requrest. I tried it 10 times with different prompts but still nothing. How can this issue be resolved?
a
Thanks for tagging me @Nikita. I'll look through relevant sources and get back to you shortly.
2. Verbeter de function description Zorg ervoor dat de
description
van de functie expliciet vermeldt dat het telefoonnummer verplicht is vóórdat de functie wordt aangeroepen. [(1) ]() 3. Gebruik Extract Dynamic Variables Je kunt dynamische variabelen in real-time extraheren en opslaan tijdens het gesprek. Dit zorgt ervoor dat informatie zoals telefoonnummers betrouwbaar wordt verzameld voordat de booking-functie wordt aangeroepen. [(3) ]() 4. Controleer de prompt instructies Zorg dat je agent-prompt expliciet instrueert om eerst alle benodigde informatie (inclusief telefoonnummer) te verzamelen vóórdat de booking-functie wordt aangeroepen. Het kernprobleem is dat het LLM de functie te vroeg aanroept voordat alle parameters zijn verzameld. Door parameters als
required
te markeren en de functie-beschrijving te verduidelijken, zou het LLM moeten wachten tot alle informatie beschikbaar is.
​ To learn more, see the sources I considered: [[1] Function Calling Overview](https://docs.retellai.com/build/single-multi-prompt/function-calling) [[2] Integrate Function Calling](https://docs.retellai.com/integrate-llm/integrate-function-calling) [[3] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) ​
### Answer --- Dit probleem is gerelateerd aan hoe de LLM de functie-parameters extraheert tijdens het gesprek. Het LLM bepaalt zelf wanneer een functie nodig is en extraheert de benodigde informatie uit de conversatie. [(1) ]() Mogelijke oplossingen: 1. Markeer
attendeePhoneNumber
als verplicht in je function definition
Bij het definiëren van je custom function kun je parameters als
required
markeren. [(2) ]() Bijvoorbeeld:
Copy code
json
{
  "type": "object",
  "properties": {
    "time": {
      "type": "string",
      "description": "The appointment time"
    },
    "attendeePhoneNumber": {
      "type": "string",
      "description": "The phone number of the attendee in E.164 format"
    }
  },
  "required": ["time", "attendeePhoneNumber"]
}
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.