Delay control
Add filler phrases to your high-latency functions and avoid long silences.
Use the Delay control panel to improve the user experience when a function takes longer than expected. Inserting transition utterances while a function is still processing prevents long silences and helps interactions feel more natural and responsive.
Key benefits
- Keep users engaged: Provide real-time feedback rather than leaving users waiting in silence.
- Fully configurable timing: Control when and how often delay responses play.
- Supports multiple utterances: Define a sequence of responses to use as interim messages.
- Works across different function types: Available for global and flow functions (not supported on start or end functions).
Important timing behavior
Delay timing does not begin from when the user stops speaking. It starts when the function begins executing — which can happen seconds later due to LLM, ASR, or model routing latency.
This means that if you set a delay of 1s
, filler utterances may not begin until several seconds after silence, depending on system load and model timing.
When setting delays, consider the full turn latency — not just the time your function takes to respond. For LLM-heavy flows, use shorter delays like 0–0.5s
or include immediate filler lines directly in the step prompt.
How it works
-
Define delay responses
- Create a list of phrases the assistant can say while waiting for a function to complete.
- These might include confirmations, status updates, or even sound effects like ‘keyboard typing.’
-
Configure delay timing
- Set the initial delay (in seconds) after function execution begins.
- Define the interval between each subsequent utterance.
-
Specify utterance length
- For sound-based responses (e.g., typing noises), specify the expected duration to pace playback accurately.
Example scenario
A restaurant booking function takes several seconds to confirm availability:
- The user asks for a table.
- The assistant immediately says: “Let me check availability for you.”
- After 0.5s, it plays: “Just a moment, I’m still checking…”
- After another 2s, it plays: “Thanks for waiting!”
- Once complete, the assistant returns: “Your table is booked!”
Creating a new delay control phrase
- Navigate to the Functions tab and select a function.
- Open the Delay control panel.
- Add one or more delay responses.
- Set the initial delay and interval.
- Optionally, specify the length of sound-based utterances.
- Save changes and test in the chat panel to preview the delay behavior.
You can reference state variables inside delay responses using the $
symbol.
For example:
Still checking availability at $branch_name...
The assistant will substitute the value automatically.
Best practices
- Keep filler utterances brief and natural — a mix of phrases like “Still working on it…” or “[typing]” helps maintain trust.
- Avoid overly repetitive or robotic phrasing.
- Use delay control sparingly: if your function is fast (under 1 second), it might not need filler responses at all.
- For very slow flows, consider adding initial speech directly in the step prompt and letting the delay control handle the fallback.
This feature is ideal for API-based functions and LLM utility functions that experience irregular latency. It’s not suitable for conversational steps where the function is near-instant or where multiple branches could be chosen.