Assistant keeps talking over itself and isn't usin...
# support
s
We have an assistant that has a knowledge base using the query tool but it keeps talking over itself and doesn't seem to be using the KB unless we explicitly tell it to use the kb. Call ID: e3491c86-8635-4286-bb1b-dba033814e47
v
Hi there! 👋 I see you're having issues with your assistant talking over itself and not using the knowledge base properly. Unfortunately, I can't diagnose the exact issue with your specific call ID without access to the detailed logs. However, I can definitely help with general troubleshooting steps for both issues you're experiencing. ## Why your assistant might not be using the KB automatically According to the [knowledge base documentation](https://docs.vapi.ai/knowledgebase), there are several reasons why your assistant might not be using the KB unless explicitly told to: 1. **System Prompt Configuration**: Your assistant may need explicit instructions in the system prompt to utilize the KB. Try customizing your system prompt with something like: "You are a smart assistant who responds to user queries using the information from your KnowledgeBase. If the answer is not in the KnowledgeBase say 'I do not know'." 2. **Knowledge Base Association**: After the migration from Canonical to Trieve, you need to attach the Knowledge Base using the API. Check if your KB is properly linked to the assistant with the correct
knowledgeBaseId
. 3. **API Key Scope**: The issue might be related to an incorrect API key scope. Try creating a new API key with the proper role and scope for the dataset in context. 4. **Configuration Parameters**: Verify your KB configuration parameters like
topK
,
fileIds
, and
maxTokens
are correctly set. ## For the "talking over itself" issue Based on the [troubleshooting information](https://discord.com/channels/1211482211119796234/1335002895736635402) I found, your assistant might be talking over itself due to: 1. **Voice Echos**: If there are voice echos in the audio background, the AI might keep speaking to itself. 2. **Endpointing Settings**: Aggressive endpointing settings can cause repetition. Try increasing the endpointing value to 300 and setting
waitSeconds
to 0.8.
3. **Model Temperature**: A high model temperature (close to 1) can lead to hallucinations. Consider adjusting your model temperature to a range between 0 and 0.3. 4. **Assistant Hearing Itself**: The assistant might be picking up its own audio output and re-processing it as input, especially if the end user has their phone on speakerphone mode at high volume. 5. **System Messages Timing**: System messages sent to the LLM immediately can interrupt the current output. Try adding system messages to the conversation context but wait until there's a new turn before sending them to the LLM. You might want to try implementing the
assistantOverrides.maxDurationSeconds
parameter or custom endpointing rules to prevent interruptions. Would you like me to provide more specific configuration examples for either of these issues? Sources: - [Knowledge Base Configuration and Association](https://discord.com/channels/1211482211119796234/1336051824402239579) - [API Usage for Knowledge Base Attachment](https://discord.com/channels/1211482211119796234/1336674769055252594) - [System Prompt Customization](https://docs.vapi.ai/knowledgebase) - [Voice Echos](https://discord.com/channels/1211482211119796234/1335002895736635402) - [Aggressive Endpointing Settings](https://discord.com/channels/1211482211119796234/1343636482874933340) - [High Model Temperature](https://discord.com/channels/1211482211119796234/1331035264751112202) - [Assistant Hearing Its Own Voice](https://discord.com/channels/1211482211119796234/1337125226747662427) - [System Messages Interrupting LLM Output](https://discord.com/channels/1211482211119796234/1338730919904673853) - [Implement Interrupt Prevention Measures](https://discord.com/channels/1211482211119796234/1335807780287676456)
s
@Shubham Bajaj
k
To help track down this issue, could you share one or two: - When exactly this happened (the timestamp) - What response you expected to get - What response you actually got instead This would really help us figure out what went wrong!
s
Timestamp of When the Call Started: 1745343200907 What Response I Expected: An answer saying the email of our client What Respone I Got: The assistant talking over itself so we didn't understand its answer at all Here's how it usually responds to queries during our latest calls: https://cdn.discordapp.com/attachments/1364293800515604640/1364302123155853364/image.png?ex=68092cdd&is=6807db5d&hm=4cbd234911655d6b3974de79b3cb565067a6ca32cf07c156eebf05d097b78320&
I also sent over the call id in my post but just sending this again in case you need it @Kings_big💫 : Call ID: e3491c86-8635-4286-bb1b-dba033814e47 Please let me know if you need any other information, thanks!
k
Looking into it
s
Hi @Kings_big💫 please let us know if there are any updates. Thank you!
Hello @Kings_big💫 just following up on this since we're still encoutering the issue. Thanks!
Call Id: 231611cc-1a6d-426f-922c-c29332699263
k
You're using a tool of type function, you will have to use the query tool; also check the Knowledge Base docs and recreate the tool, and it will work
s
Hi @Kings_big💫 we have tried that and we followed the knowledge base docs and it is still doing the issue of it being very confusing. It answers the user's query then proceeds to say something else completely different. Call ID: 920fd58e-7724-44d2-bb33-463e40e65d2a
It already gave the email address but then proceeds to say that it can't give it to me
k
There is an ongoing issue on our side where llm1, which invokes the KB tool, also generates the response, and llm2, which generates the response based on KB chunks. In your case, the llm1 has responded with a made-up email, and the llm2, based on the KB chunks retrieved, says it's after office hours. The second answer came based on your KB chunks. For your reference, I am sharing the request sent. You need to reduce the number of files related to the KB because of huge chunks of file, the response is not being generated properly.
s
Thanks, got it. When you fix the ongoing issue on your end, will all of this work correctly again without us having to reduce the number of files related to the kb? @Kings_big💫
k
Sure
s
Thanks @Kings_big💫 . Please let us know when the issue has been resolved.
Hi @Kings_big💫 @Shubham Bajaj @Sahil are there updates about this issue? Thank you!
k
Not resolve yet
2 Views