Knowledge base not returning data when using chat
# support
m
Hi, We have configured an assistant with a knowledge base using query tool connected to a file containing the opening hours. Asking the assistant for the opening hours by calling in to the assistant it works well. But if we use the assistant chat feature the knowledge base does only return success without data, and then the assistant answers with a default answer that does not correspond to the data we have provided. Example caller id when it worked well: 019a6c2c-e270-7006-bc67-d531742907d2 But I can not find id for chat session, and it is with chat it is not working. What's wrong with the setup? Many thanks in advance 🙏🏽 https://cdn.discordapp.com/attachments/1437520740432875727/1437520741158621185/Screenshot_2025-11-10-08-37-15-59_3aea4af51f236e4932235fdada7d1643.jpg?ex=69425844&is=694106c4&hm=dc7d40650015f27f47c5f79ece148baa1444200e754a18bc37a48ff8f92fed72& https://cdn.discordapp.com/attachments/1437520740432875727/1437520741951078512/Screenshot_2025-11-10-08-37-54-56_3aea4af51f236e4932235fdada7d1643.jpg?ex=69425844&is=694106c4&hm=a30cfc0db8e0da35da00e9a079fa733fdefeb630a82f741b61e164fa6681e43c&
v
Thank you for the detailed description and screenshots. Based on the documentation, a common cause for the knowledge base not returning data in chat (while working for calls) is that the assistant’s system prompt may not explicitly instruct it to use the query tool for relevant queries in chat mode. The knowledge base description alone is not sufficient—**explicit instructions in the system prompt are required** for both voice and chat assistants to trigger the tool correctly ([see documentation](https://docs.vapi.ai/knowledge-base/using-query-tool)). Could you please confirm if your assistant’s system prompt for the chat feature specifically tells it to use the query tool (by name) when users ask about opening hours? Source: - [Using the Query Tool for Knowledge Bases](https://docs.vapi.ai/knowledge-base/using-query-tool)
c
Hi Mustafa Kaftan, To create and integrate a Knowledge Base for your Voice AI assistant using Vapi, you can follow these two main approaches: 1. **Dashboard Method**: - **Upload Files**: Navigate to
Build > Files
in the Vapi dashboard, click "Upload," and select files (.txt, .pdf, .docx, etc.). - **Configure Assistant**: Go to
Build > Assistant
, select your assistant, and attach the uploaded files in the "Knowledge Base" section. - **Publish**: Add prompts to your assistant to utilize the knowledge base when necessary and publish the assistant to make it live. For detailed steps, see [Introduction to Knowledge Bases](https://docs.vapi.ai/knowledge-base). 2. **API Method**: - You can upload files and configure a custom setup using direct API calls for advanced configurations. This includes creating a query tool to tailor the assistant's knowledge retrieval. For more on this, refer to [Using the Query Tool for Knowledge Bases](https://docs.vapi.ai/knowledge-base/using-query-tool). If you're looking to set up a custom knowledge base, you can create your own server for document retrieval as outlined in the [Custom Knowledge Base](https://docs.vapi.ai/knowledge-base/custom-knowledge-base) documentation. Make sure to test the setup with various queries to ensure proper integration and response accuracy.
m
When using a custom knowledge base - do I still need to use the query tool? like a setup through weavite with endpoint kb/search on vapi i see the response from kb/search, but the assistant is not using that data
4 Views