Squads Context
# support
i
Is it possible to pass conversation context throughout the call with a Squad? I have assistant 1 who can transfer to a appointment booker assistant. Essentially, I just want to be able to able to pass the main topic/context of the conversation between assistant 1 and the customer to the appointment booker assistant if the call is transferred to the booker.
v
@Ibrahim Yes, it is possible to pass conversation context throughout the call with a Squad. When assistant 1 transfers the call to the appointment booker assistant, the context of the conversation can be shared so that the appointment booker is up to speed with the customer's needs and the topic of discussion. This ensures a seamless transition and a better experience for the customer, as they won't need to repeat information. If you need guidance on how to implement this context passing in your specific setup or if you have any other questions, please feel free to ask!
You can continue this conversation by mentioning me in the message.
i
How would I share that context?
v
@Ibrahim To share the context between assistants in a call, you would typically use a shared data structure or a context object that can be accessed by both assistants. Here's a general approach to achieve this: 1. **Capture Context**: Assistant 1 should capture the context of the conversation. This could include the customer's intent, any collected data (like name, account number, etc.), and the main topic of the conversation. 2. **Store Context**: The captured context should be stored in a format that can be easily transferred. This could be a JSON object, a key-value pair, or any other structured data format that both assistants can understand. 3. **Transfer Context**: When the call is transferred to the appointment booker assistant, the stored context should be passed along with the transfer request. This can be done through an API call, a database update, or any other method that your system supports for inter-process communication. 4. **Retrieve Context**: The appointment booker assistant should retrieve the passed context as soon as the call is transferred. This might involve reading from a database, accepting an incoming API payload, or accessing shared memory, depending on your system's architecture. 5. **Utilize Context**: Finally, the appointment booker assistant should use the retrieved context to continue the conversation seamlessly, without requiring the customer to repeat information. If you're using a specific platform or API for your voice assistants, there might be built-in features or best practices for context sharing that you can leverage. Please let me know if you need assistance with a particular system or API, and I'll be happy to help further!
i
Can you give an example
v
@Ibrahim Certainly! Here's a simplified example of how context might be shared between two voice assistants using a hypothetical API: Let's say Assistant 1 is having a conversation with the customer and determines that they want to book an appointment. Assistant 1 gathers the necessary information, such as the type of appointment and preferred dates. Assistant 1 Context Capture:
Copy code
json
{
  "customerName": "John Doe",
  "appointmentType": "Dental Checkup",
  "preferredDate": "2023-07-15",
  "notes": "Customer prefers late afternoon appointments if possible."
}
Context Transfer: Assistant 1 then initiates a transfer to the appointment booker assistant. Along with the transfer command, Assistant 1 sends the context as a JSON object. Appointment Booker Assistant Context Retrieval: Upon receiving the transfer, the appointment booker assistant retrieves the context object and parses it to understand the customer's needs. Utilizing the Context: The appointment booker assistant then starts the conversation by acknowledging the received context: "Hello, John Doe! I see you're interested in booking a dental checkup for July 15th, and you'd prefer a late afternoon slot. Let me check the availability for you." This example demonstrates how context can be captured, transferred, and utilized to provide a seamless transition between assistants and a better customer experience. The exact implementation details would depend on the specific APIs and systems you are using. If you need more detailed guidance tailored to your setup, please provide additional information about the tools or platforms you're working with.
i
How to implement "context transfer" and "context retrieval". Doesn't seem supported from what I can tell on the documentation
@User
s
It is automatically passed. You don't need to anything.
i
Ok will test it out. Thank you for the help.
m
interesting. So that means that the maxTokens param should be apply at the squad level @Sahil ? If the full conversation is passed from an agent to another, does it mean that each agent should have a maxToken param that can support the full expected conversation?
s
Yeah, it will be applied to squad level.
m
On our side we noticed that we had better results when testing on an agent directly, rather than with squads. For instance: We have a squad with 2 agents. - Agent1: IVR that redirects to agent 2 if caller asked to book a meeting - Agent2: booking agent Agent 2 is being told in system prompt that he should book meetings with 1 week delay. When I call Agent 2 directly: 1 week delay guideline is respected. When I call Agent 1 and ask to book a meeting, I'm redirected to agent 2, and I'm able to book a meeting but 1 week delay guideline is not respected most of the time. So I was wondering how the context conversation is handled with squads? For instance, when call is forwarded to a squad member, what's is the priority in the context window between on-going conversation and squad member system prompt? What are the impact when we reach the maxToken?
5 Views