ratty-blush
ratty-blush6mo ago

custom knowledge base issue

Hello. Starting a few days ago my custom knowledge base no longer seems to work. https://dashboard.vapi.ai/calls/2598ae4c-4dbe-4952-99fb-59f147035f5f In logs it says that after 750ms the bot gave up waiting for the knowledge base. Where can I configure this timeout?
22 Replies
Vapi Support Bot
Hi there! 👋 I see you're having an issue with your custom knowledge base timing out. I don't have specific information on how to directly configure the 750ms timeout you're seeing in your logs. However, I can share what I know about timeout settings for knowledge bases in Vapi. According to the documentation, there are a few timeout-related settings you should know about: 1. The default timeout for assistant requests is 7.5 seconds (7500ms) according to Discord discussions. 2. There is a timeoutSeconds parameter that can be configured in the knowledge base configuration, with a default value of 20 seconds. This appears in the JSON structure for creating phone calls and configuring assistants:
{
"knowledgeBase": {
"server": {
"url": "url",
"timeoutSeconds": 20,
"backoffPlan": {
"maxRetries": 0,
"type": {
"key": "value"
},
"baseDelaySeconds": 1
}
}
},
"knowledgeBaseId": "knowledgeBaseId"
}
{
"knowledgeBase": {
"server": {
"url": "url",
"timeoutSeconds": 20,
"backoffPlan": {
"maxRetries": 0,
"type": {
"key": "value"
},
"baseDelaySeconds": 1
}
}
},
"knowledgeBaseId": "knowledgeBaseId"
}
3. Currently, according to Discord discussions, "there is no way to manually set a large timeout" but the Vapi team is working on adding this ability. 4. You might also want to look into the waitSeconds parameter, which some users have set to 0.8 as a good median value. The 750ms timeout you're seeing is significantly shorter than the default timeouts mentioned in the documentation, which suggests there might be another configuration or issue at play. Is there anything else about your custom knowledge base configuration you'd like me to help with? Sources: - Discord discussion about default timeout
extended-salmon
extended-salmon6mo ago
@Alexandru Bagu was the guide helpful
ratty-blush
ratty-blushOP6mo ago
No
ratty-blush
ratty-blushOP6mo ago
No description
ratty-blush
ratty-blushOP6mo ago
Same result The http request lasted ~1.82s
extended-salmon
extended-salmon6mo ago
Go to your assistant’s configuration settings where the knowledge base is integrated, locate the knowledge base section in your assistant’s configuration and set the timeout seconds parameter to a value between 20 and 600 seconds, depending on your requirements then save the changes and redeploy your assistant to apply the new settings..
ratty-blush
ratty-blushOP6mo ago
I tried to find those settings but I dont see them anywhere
robust-apricot
robust-apricot6mo ago
did you create the knowledgebase with trieve ? or did you do it with vapi (when it was accesible via dashboard?)
robust-apricot
robust-apricot6mo ago
trieve is the best way to use knowledgebases in vapi now here is a step by step video i made https://www.youtube.com/watch?v=chGi_7LuvNk&t=40s
Aibaze Foundations
YouTube
How to add Knowledge bases in VAPI with TRIEVE | Tutorial in 6 minutes
We're diving into how VAPI knowledge bases integrate with Trieve (check it out at: https://trieve.ai) to transform your assistant. With security 🔒 and efficiency ⏩ in mind, learn how to build a robust system. 🗣️ 🔥 In this video, we break down: ➡️ How to create a knowledge base for your assistant ➡️ Uploading your ID t...
Sahil
Sahil6mo ago
🔵 15:43:02:326 [user LOG] Knowledge base retrieval aborted. Request took too long. Waited for 750 ms
🔵 15:43:04:015 Couldn't Retrieve Knowledge Base. Error: Custom KB Read Request Aborted. Abort Reason: Knowledge base retrieval timed out. Aborted after 750 ms
{
"provider": "custom-knowledge-base",
"server": {
"url": "https://private-knowledge.bss-lab.it/vapi-query-knowledge/e611875e-9ae2-4292-88f1-155680a8aba2",
"secret": "AHDnK822UagM9DQ4LzPdoE3MaW3UbhYFq5BnaFaPf4LrJ8KDLpk75NwsAsBseKvq",
"timeoutSeconds": 10,
"headers": {},
"backoffPlan": {
"maxRetries": 0,
"type": "fixed",
"baseDelaySeconds": 0
}
}
}
{
"provider": "custom-knowledge-base",
"server": {
"url": "https://private-knowledge.bss-lab.it/vapi-query-knowledge/e611875e-9ae2-4292-88f1-155680a8aba2",
"secret": "AHDnK822UagM9DQ4LzPdoE3MaW3UbhYFq5BnaFaPf4LrJ8KDLpk75NwsAsBseKvq",
"timeoutSeconds": 10,
"headers": {},
"backoffPlan": {
"maxRetries": 0,
"type": "fixed",
"baseDelaySeconds": 0
}
}
}
Hey, this is on our side, and I'll be asking the team to update it. We have a hardcoded value of 750 milliseconds, so even if you add any higher or lower value, it won't work. It will be fixed and hardcoded as of now. So, wait for some time, and then it will be resolved.
ratty-blush
ratty-blushOP5mo ago
Any idea when this is going to be implemented?
extended-salmon
extended-salmon5mo ago
We will ping you when resolved appreciate your patience thanks
distinguished-scarlet
distinguished-scarlet5mo ago
Is there an update on this? I've been dealing with the same issue, where the assistant gives up on the knowledge base after 750ms and generates a made-up response to the user's question.
fascinating-indigo
fascinating-indigo5mo ago
Following - seeing the same issue
Sahil
Sahil5mo ago
Hey guys this issue will be picked in next sprint cycle staring from next week. Hey, the issue has been fixed, and it will be deployed to daily org channel by today's US time.
correct-apricot
correct-apricot4mo ago
hi! i have some problem now, i get error " [LOG] Knowledge base retrieval aborted. Request took too long. Waited for 750 ms". is that some bug or diferent ? I deleted knowledge created again but result is some. Why ? Please Help! 10:05:52:049 [LOG] Knowledge base retrieval aborted. Request took too long. Waited for 750 ms
Sahil
Sahil4mo ago
Hey! To help track down this issue, could you share: - The call ID
correct-apricot
correct-apricot4mo ago
callid: d0188511-44e2-48ad-b937-c604b76a3109
Sahil
Sahil4mo ago
Hey @Samet, just to confirm this issue is resolved right?
correct-apricot
correct-apricot4mo ago
no. Frankly, being stuck at the short system prompt upsets me. Isn't there a way to increase the delay in the response on the Trieve side? I want the assistant to respond late, but only if it responds with data. Do you have a suggestion?
Sahil
Sahil4mo ago
All I can say is to add to roadmap at https://roadmap.vapi.ai/ we will add it soon.

Did you find this page helpful?