dead-brownD
VAPI2mo ago
dead-brown

Assistants consistently repeat messages

Hello,

I'm noticing that my assistants are repeating their second messages (first response to the user calling) on nearly every call my platform's users make.

Call ids where this occurs:
  • 019a6e90-77df-777a-b835-28ecc6d82bf6
  • 019a6ea7-959f-777d-a1b9-ea7776ad2f09
  • 019a6e8b-f5fa-777e-a6a0-9a4724445177
  • 019a5532-0447-7551-8d1f-e0330efcd3b1
  • 019a4fe6-e3eb-755e-bc15-72897088ae99
  • 019a5447-3f31-7442-983b-48f9e9067fba
  • 019a55b5-dad6-7883-9d77-db38462d19a7
  • 019a5a27-feec-700b-96bb-d79ed6c53157
  • 019a5a10-8ac1-7229-b484-c2f2557aae22
  • 019a55e6-e415-7110-b964-a554d082dc29
  • 019a553c-0cbc-711a-a772-5be6ad52a838
  • 019a5532-0447-7551-8d1f-e0330efcd3b1
  • 019a5447-3f31-7442-983b-48f9e9067fba
  • and many more
specs:
  • I am using gpt4o as my model, 11labs as my voice provider, and deepgram as my transcriber
  • transient assistanst created via api
How to reproduce (one of many ways):
  • Make a call with my assistant who has a system prompt with turn based mechanics (much like workflows)
  • Call starts with the assistant saying "Hello?"
  • user responds with "Hi, is this Adam?"
  • the assistant will say something like "Hi. This is Adam Piasecki. Who's calling? Yes. This is Adam Piasecki. Who's calling?" (this is just one example of a repeated phrase I see)
My investigation:
When looking at the vapi call logs, I can see that two api calls are made to gpt4o for the first message for each failing call. The first api call is made with a partial user message role message which the assistant responds to
  // request (truncated)
  {
    "role": "user",
    "content": "Hey. Is this"
  }
  // response (truncated)
  "response": {
    "content": "Hi, this is Adam Piasecki. Who's calling?"
  },

Then the second api call is made with the full user message to which the assistant also responds
  // request (truncated)
  {
    "role": "user",
    "content": "Hey. Is this Adam?"
  }
  // response (truncated)
  "response": {
    "content": "Yes, this is Adam. Who's calling?"
  },


These api calls are made within milliseconds of each other which then gets passed to the voice provider to say both messages back to back.

I've tried updating my system prompts to add logic around conversation paths and preventing repeating, changing the voice id, changing the voice provider. None of these have helped resolve the issue.

why is the behavior above happening, and is there a work-around?

I know others are experiencing assistants repeating messages. Not sure if they have the same root cause:
Thanks
Was this page helpful?