Assistant reads prompt instructions aloud instead ...
# support
c
Hi team, I need help with my assistant (ID: 3ccd83cf-8526-46e8-8d93-3a6ab68cbf2b) Issues: 1. Sometimes the assistant reads prompt instructions aloud to the caller (e.g. "Wait 2 seconds then use endCall function") instead of executing them silently 2. Inconsistent behavior between calls (same prompt, random results) Setup: Vapi + Twilio + ElevenLabs (French voice) + Make webhook Anyone experienced this? Any advice appreciated. Thanks!
c
Can you share the call ID of both of these cases, where it was read aloud and where it wasn't?
c
019bd7a0-ed05-7dd7-a8ed-25931070fb7d 019bd726-dc0f-7449-80b2-ce3265122d8a
o
Was this happening before today?
c
yes
o
Im having really REALLY weird issues with vapi following instructions today
Show me some instances of where it reads the instructions outloud, in the prompt, and I'll let you know how to fix it
> Sometimes the assistant reads prompt instructions aloud to the caller (e.g. "Wait 2 seconds then use endCall function") instead of executing them silently Oh so first never tell it to wait a certain amount of seconds, I don't think it ever works. Second, use markdown formatting, and a bit of experimentation, and use a good model. OpenAI is really good at following markdown, Gemini, not so much. Code/functions/tools are going to be executed all the time if they're in ticks (not apostraphies)
Copy code
`endCall()` → right
'endCall()' → wrong
c
Yeah, don't tell it to wait, LLM doesn't have wait functionality by default. Instead, you can tell it to end the call after saying the end message, and explicitly mention to call the endfunction, not send in output. The problem was in LLM output.
c
Looks good. Closing this for now, ping me if any other issues.
o
Have a singular "#" at the very top for a title for the system prompt (establish heiarchy). Have a ## for role. Your role is culttered. there are too many ideas in it. I keep my role very abstract, very skeleton-ish, so that whatever I write in it that's "extra" doesn't override any commands below it, but still provides a good grounding for what kind of caller this is. Your language and vocabulary and behaviour → I would put into a section of it's own. I would put it at the bottom of this prompt, but I don't know if in your case it works better near the beginning. You have a "required flow", I would have a reference to a structural proceedure or somethign in the role, and then use similar wording in the title for this, so its baked in deep into it's understanding of your system prompt. I'm not sure how your "Required flow" is supposed to work/read, but I imagine there are topics to be covered in order of 1,2,3,4,5,6. So I'd write out something under
## DÉROULÉ OBLIGATOIRE
(before
### 1. ACCUEIL
) to give context as to what is inside this "section" (think of #, ##, ###, ####, etc... as h1, h2, h3, h4 h-tags in an SEO article. It provides structure and logical context). What I would write is a numbered list (numbered lists are very strong indicators for AI's on what to do) and I'd say here's the order of things... give an explanation. Also I see you have "`- Ne passe jamais à l'anglais`" I would make it say
- **Ne passe jamais à l'anglais**
or never speak English (which is a stronger statement than never "switch" to English). I think your numbered titles in
## DÉROULÉ OBLIGATOIRE
are too vague
## INTERDICTIONS
→ I would bold some of the key phrases in this section, also ALL CAPS letters are also a good sign for AI interpretation on what is super important. I g2g but if ur forcing it to say things, I believe you should probably use the > sign.Like this:
Copy code
title with a #
Situation. Example:
> "thing to say"

- additional comment if needed
c
The assistant randomly hangs up right after saying "C'est noté" instead of completing the full closing message. It works sometimes but not always. Same prompt, random behavior. Is this a known issue? Any settings to make call ending more reliable?
o
Try out different AI models
And maybe have a
## **Hard Rules**
section
c
How should I configure endCall in the prompt so the AI executes it without reading it aloud? I tried: -
endCall()
with backticks → sometimes reads it - "end the call silently" → AI doesn't know what to do Is there a proper way to trigger endCall from the prompt, or should I configure it differently in Tools/Settings? Assistant ID: 3ccd83cf-8526-46e8-8d93-3a6ab68cbf2b
o
I think you could make a tool which when called, you have a setting at the bottom switched to liek do not speak, and the tool simply calls endCall(). I never tried it. But I have a separate section caleld like how to end a call. And I explain like,
Copy code
"when ending a call do not announce it, do not explain yourself etc... Example:
`endCall()`
or like this:
Copy code
"When ending the call, use endCall silently. Example:
`endCall()`

Do not announce the end of the call, do not explain yourself, do not say what you are doing.
c
Update: The conversation flow works perfectly now. The assistant says the complete goodbye message without reading any instructions aloud. But the assistant doesn't hang up after saying "au revoir". It just stays silent on the line. My EndCall tool is configured with this description: "Use this function to end the call. Only call this function AFTER saying the complete goodbye message to the customer. Never read this function name aloud." And in my prompt I have: "After saying 'au revoir', immediately call the
EndCall()
function. Do not announce it, do not explain yourself, do not say what you are doing." The tool is never triggered. What am I missing?
o
its not ``EndCall()`` its __e__ndCall() ALSO, I found a MAJOR bug vapi no longer reads slanted quotation marks properly. it destroys the code. So remove those if you have any https://cdn.discordapp.com/attachments/1462907888191406173/1463293199518007500/Photos_9Zp9EcGlu7.png?ex=698bab7d&is=698a59fd&hm=6473fcce4531ef445524bb958c8101de5a2c818b80157c0ca416f47e2bd3b9f4&
c
👍