Losing context between "First Message" and prompts
# support
p
I am using a straightforward First Message, something like: "Hello and thank you for calling [Company]. Who am I speaking with?" When the caller responds with their name, 80% of the time it works as expected, and the AI responds with "Nice to meet you [Name]." But 20% of the time, the AI responds with something like "It sounds like you're asking about [Name], and..." I would assume the AI agent should maintain context between the first message and the prompt, since it does work correctly 80% of the time... Should I move the question of "Who am I speaking with" inside the Prompt, or should this not be necessary? Any other suggestions?
v
@Phil It's great to hear that the AI is performing correctly most of the time. However, for the instances where it's not maintaining context as expected, there are a few strategies you can employ to improve consistency: 1. **Contextual Clues**: Ensure that the AI is programmed to recognize the context of the conversation. This means that when it asks for a name, it should be prepared to receive a name in response and continue the conversation accordingly. 2. **Prompt Structure**: You could indeed move the question "Who am I speaking with?" inside the prompt to make it more explicit that the expected response is a name. This might help the AI to better understand the context. 3. **Training**: If the AI is trainable, you might consider providing more examples of the correct interaction to improve its understanding and response accuracy. 4. **Fallback Responses**: Implement a fallback mechanism where if the AI detects an unexpected response, it reiterates the question or asks for clarification. 5. **Update the AI Model**: If the AI is based on a model that receives updates, ensure that it's running on the latest version, as updates often include improvements to context understanding. 6. **Feedback Loop**: Implement a system where such incorrect responses can be flagged and used as feedback to improve the AI's performance over time. If you have the ability to modify the AI's behavior, these suggestions could help. Otherwise, if you're experiencing this issue with a third-party AI service, it might be best to reach out to their support team for more specific guidance.
You can continue this conversation by mentioning me in the message.
j
The first message isn't part of the prompt, so you will have to work around this with something like "the user may give their name at the start of the conversation"
p
@Jotham I've tried variations of this as well, but the same issue occurs. I think it might have something to do with having call forwarding prompts included in an "Other Possible Inquiries" area of the prompt, which utilizes a callTransfer tool to forward the call to someone by name or by company department. So my thought is that when the caller starts the conversation with their name, the AI agent thinks the caller is asking to transfer to someone with that first name, although that name doesn't even exist in the prompt for a call forwarding. Does that make sense?
j
Yeah I see your issue. An idea you could try "firstMessageMode": "assistant-speaks-first-with-model-generated-message" This way you can prompt what the first message should be. Let me know if you try it, I'm curious if this adds latency to the first message
Or alternatively, trying to prompt it like "If the user states a name at the start of the conversation, you must assume this is the users name. Do not transfer the call at the start of the conversation"
p
I'm trying to avoid too much non-UI work, so I tried your alternative method but unforunately that didn't work either. So I ended up having to remove some other rules I had in place regarding call transfers, which will be a bit of a loss, but this ended up fixing the issue at the beginning, which is most important of course.
2 Views