parveen
05/05/2025, 12:04 PMVapi Support Bot
05/05/2025, 12:06 PMbash
curl --request PATCH 'https://api.vapi.ai/assistant/<ASSISTANT_ID>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--data '{
"model": {
"knowledgeBaseId": "<KNOWLEDGE_BASE_ID>",
"provider": "openai"
}
}'
For detailed guidance, check the documentation at [https://docs.vapi.ai/knowledgebase](https://docs.vapi.ai/knowledgebase).
Sources:
- [Vapi Knowledge Base Documentation](https://docs.vapi.ai/knowledgebase)
- [Discord Channel Discussion](https://discord.com/channels/1211482211119796234/1336909771290185802)Kings_bigđź’«
05/05/2025, 12:11 PMparveen
05/06/2025, 7:00 AMKings_bigđź’«
05/06/2025, 3:40 PMEthan Tan
05/08/2025, 10:16 AMChiranjeet Mishra
05/08/2025, 11:10 AMEthan Tan
05/08/2025, 12:50 PM{
"type": "query",
"function": {
"name": "knowledge-base-query"
},
"knowledgeBases": [
{
"provider": "google",
"model": "gemini-2.5-flash-preview-04-17",
"name": "jp-knowledge-base",
"description": "Use this knowledge base to draw from my knowledge, teaching, and stories",
"fileIds": [
"9db9757d-9d72-4120-a488-9031e6df7d7c"
]
}
]
}
It worked when I tested it with a single line file, but when I uploaded a 40kb text file with about 7k words, it just kept hallucinating the answers. When I looked at the logs, I saw that it made a tool call, but I can't see what's returned in it so I can't tell if it's searching or returning effectively, or where the problem is
Call ID: 3cedaf89-7600-42b4-9a7c-5a6c2b2e7566
Can you assist please?
Thank you
https://cdn.discordapp.com/attachments/1368921166554730568/1370019964391522375/Screenshot_2025-05-08_at_13.49.08.png?ex=681dfa05&is=681ca885&hm=44bbaa470bee55946a9f187785aaf119a98b0f4cc0f1ab32d7e54f51e4483ef9&Chiranjeet Mishra
05/10/2025, 11:40 PMEthan Tan
05/12/2025, 10:37 PM{
"role": "user",
"time": 1747059043395,
"endTime": 1747059046195,
"message": "But is there something specific he says about judgments?",
"duration": 2800,
"secondsFromStart": 182.826
}
{
"role": "tool_calls",
"time": 1747059049770,
"message": "",
"toolCalls": [
{
"id": "call_7AXxJ1VxITmvsrCyHNitYc0z",
"type": "function",
"function": {
"name": "knowledge-base-query",
"arguments": "{\"knowledgeBaseNames\": [\"jp-knowledge-base\"]}"
}
}
],
"secondsFromStart": 184.32
}
{
"name": "knowledge-base-query",
"role": "tool_call_result",
"time": 1747059049773,
"result": "Success.",
"toolCallId": "call_7AXxJ1VxITmvsrCyHNitYc0z",
"secondsFromStart": 184.323
}
PARTIAL RESPONSE
{
"role": "bot",
"time": 1747059054527,
"source": "model",
"endTime": 1747059055212,
"message": "C17 (\"Upgrade Your InnerAh, judgements. Yeah. J P talks about judgements as the very bricks of our",
"duration": 7988,
"secondsFromStart": 189.107
}
Then, a hallucinated response, doesn't use the KB's response
{
"role": "user",
"time": 1747059068595,
"endTime": 1747059068995,
"message": "Hello?",
"duration": 400,
"secondsFromStart": 205.698
}
{
"role": "bot",
"time": 1747059075376,
"source": "model",
"endTime": 1747059075550,
"message": "I'm here, Ethan. Let me give you something straight from J P’s way of speaking:. He also says, “Judgments are like clouds in the sky—they pass. Freedom is remembering you’re the sky, not the clouds.”. How does that land for you? ",
"duration": 37756,
"secondsFromStart": 209.959
}Ethan Tan
05/14/2025, 10:21 PMEthan Tan
05/15/2025, 8:36 AMChiranjeet Mishra
05/17/2025, 4:02 AM