EOT / Skipping Turns
The Problem
There are cases where an agent should not respond to the user immediately after a transcription is received. This often happens during data entry tasks where users naturally pause while thinking or reading information, such as dictating a credit card number or ID. For example:The Solution: skip_turn()
You can control this behavior by instructing the agent to use theskip_turn() tool. This tool explicitly tells the system: “I have received input, but I am choosing not to speak yet. I will wait for the user to continue.”
skip_turn() allows the agent to effectively “pass” its turn, keeping the microphone open for the user to finish their thought.
Example Flow
Here is how the interaction looks when the agent usesskip_turn():
Advanced Pattern: Partial Input Validation
You can combineskip_turn() with validation tools to handle partial inputs robustly.
Scenario: Collecting a credit card number.
- Tool Definition: Create a
validate_credit_card(number)tool. - Validation Logic: If the input number is too short, the tool should return a specific error message.
- Error Message: “Input is too short. Call skip_turn() to wait for the user to finish speaking.”
- Agent Behavior: The agent calls the validation tool, sees the error instructing it to wait, and calls
skip_turn().