Issue with AI Agent Interrupting Customers While P...
# support
g
Hello VAPI Support Team, I’m encountering a problem with the AI Agent when customers provide their phone numbers or emails. If a customer speaks slowly or pauses briefly while giving their contact details, the AI Agent prematurely interprets this as the end of their input and moves on to the next step. This results in incomplete or incorrect information being captured. An example of this issue occurred at reference ID 0e4acfa4-dd63-473b-ba00-5b7c2518eff7. I’d like to improve how the AI Agent handles these situations, possibly by allowing a longer pause before concluding the user has finished speaking. Could you please advise on how best to adjust these settings or implement a fix? Thank you for your assistance.
v
Hi there! 👋 I understand you're experiencing an issue with your AI Agent prematurely interpreting pauses as the end of input when customers are providing contact details. While I don't have specific information about the reference ID you mentioned, I can definitely help with adjusting your settings to allow for longer pauses. Here are several effective ways to fix this issue: ### 1. Adjust Wait Time Parameters You can modify these key parameters: - **`numWordsToInterruptAssistant`**: Increase this to 3-5 words to give customers more time to speak before the AI can interrupt - **`maxDurationSeconds`**: Set this to 5-10 seconds to define how long the AI waits for a response - **`startSpeakingPlan.waitSeconds`**: Increase from the default of 0.4 seconds to around 0.8-2 seconds to add delay before the assistant starts speaking For example:
Copy code
javascript
const assistant = {
  // other configurations
  numWordsToInterruptAssistant: 5,
  maxDurationSeconds: 10,
  startSpeakingPlan: {
    waitSeconds: 0.8
  }
};
[Source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334027136305991750) ### 2. Enable Smart Endpointing Enable the
smartEndpointingEnabled
feature which uses advanced processing to detect when a customer has truly finished speaking, even with pauses:
Copy code
javascript
const assistant = {
  // other configurations
  startSpeakingPlan: {
    waitSeconds: 0.8,
    smartEndpointingEnabled: true
  }
};
[Source](https://docs.vapi.ai/customization/speech-configuration) ### 3. Adjust Transcriber Settings For Deepgram, you can set the
endpointing
parameter to a higher value (e.g., 300) to allow for longer pauses:
Copy code
javascript
const assistant = {
  // other configurations
  transcriber: {
    model: "nova-2",
    language: "en",
    provider: "deepgram",
    endpointing: 300
  }
};
[Source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1338497725917827196)
### 4. Implement Context Management in Your Prompt Add context management to your prompt to help the AI remember where it was in the conversation:
Copy code
javascript
const CONTEXT_MANAGEMENT = `
[Context Management]
- Maintain a running list of collected information
- On interruption, store current progress
- After handling interruption, explicitly return to last incomplete item
- Before ending call, verify all required information is collected
`;
[Source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1344181455567196170) ### 5. Use Custom Endpointing Rules Implement custom endpointing rules to instruct the pipeline to pause for user input for a specified duration, especially useful for collecting contact details. [Source](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1335807780287676456) Would you like more specific guidance on implementing any of these solutions for your particular use case? Sources: - [Adjusting numWordsToInterruptAssistant and maxDurationSeconds](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334027136305991750) - [Smart Endpointing Configuration](https://docs.vapi.ai/customization/speech-configuration) - [Transcriber Settings for Deepgram](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1338497725917827196) - [Context Management Implementation](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1344181455567196170) - [Custom Endpointing Rules](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1335807780287676456)
p
Hello brother, this is not something the support can help with, they can only give you advice. The issue is with the prompt and instructions
k
Hey @GTS, checking if this is resolved for you
p
Hello brother, this is not something the support can help with, they can only give you advice. The issue is with the prompt and instructions