Using same prompt for voice & chat
# prompt-tip
n
Voice & chat have some small differences, for example on voice I want to repeat things and confirm spelling whereas on chat I don't need to do that. So far I've been using separate (but 90% similar) prompts to accomplish that. I'm wondering if there's a way to accomplish with a single prompt. Is the LLM aware of its context (chat vs voice) so that I can tell it e.g. "if you're in chat mode then you do not need to confirm the spelling..." What would be the best way to do that? Thanks!
j
That happens because most LLMs don’t automatically know whether they’re in chat or voice mode unless you pass that info through metadata or context variables. I can help you set that up are you using Vapi, Retell, or a custom LLM integration for your agent?
n
thanks @Joshua and sorry for the delayed reply i didn't see this. i'm using vapi
j
Got it since you’re using Vapi, it’s totally possible to make one unified prompt. You just need to pass a mode variable (like "context": "voice" or "context": "chat") through the session metadata or webhook. The LLM isn’t aware by default.I’ve set this up before want to message me? I can show you the exact way to structure the prompt so it automatically adapts to chat or voice mode.