Knowledge base/query tool issue
# support
m
Issue: My agent is querying an unknown knowledge base instead of mine, so callers never get the real address or company details. What I’ve Tried: Added a top‑of‑prompt rule to force the agent to use query_tool to my custom file (knowledge base). Created a query tool specifically for my agent to reference my knowledge base Renamed the fileKey to simple identifiers (e.g. kings_roofing_kb) and updated every prompt reference to match exactly. Moved the custom‑KB rule to the very top of the system prompt, ahead of all fallback logic. Despite these changes, the logs still show: Calling query tool: Function Arguments {"knowledgeBaseNames": ["new_knowledge_base"]} The correct knowledge base is in the file under the prompt section and in the query tool with a proper description and that tool is applied to my agent. The agent never pulls from the uploaded file. Could you help me identify what’s keeping my agent from using the correct file and how to fix it? I’ve made sure to have the knowledge base file in the file area, created a query tool with the file prompted the agent and created a new agent to solely query to knowledge base tool but i cannot get it to work https://cdn.discordapp.com/attachments/1399940886451720253/1399940886648848579/Screenshot_2025-07-29_212414.png?ex=688ad40d&is=6889828d&hm=b25f5d214b8d6acf848665826ed0c93e25ed90fb35396cb907ca5c5e67e542a6& https://cdn.discordapp.com/attachments/1399940886451720253/1399940887148236901/Screenshot_2025-07-29_212431.png?ex=688ad40d&is=6889828d&hm=cf674e051a5f19a2c178255cb43736c8a3441489a6ed0c4963cf8f26dd044ac9&
k
Try re-upload the file, recreate the query tool with the correct file ID, ensure it’s attached to the assistant, and verify that prompt logic clearly triggers the tool using the exact KB name.. https://docs.vapi.ai/knowledge-base/using-query-tool
k
Attached to your assistant, your system prompt explicitly instructs using that tool by name..
g
I have the same issue, i am wasting hours - someone can solve this "simple" issue? It can not be so hard to do a simple things like this
m
A peer told me vapi was doing some updates and to give it a couple days then try again
g
in the meantime if I had brought VAPI into production would everything have crashed? seriously? Someone can explain? If this possibility exists, it cannot be used in vape production!
@User
@Kings_big💫 can u help please
c
@giodea how can I assist you?
m
The knowledge query tool doesnt work in chat but if you speak to the agent it works.
try to talk to the assistant and see if that fixes your issue
and if the agent requires an additional message (you have to say something after it calls the tool to get it to reply) delete all message options in the query tool.
c
Switch to a chat-compatible model, ensure the KB is properly attached, update system prompts to use the tool, verify file formats and sizes..
m
@Marc2020 is the query tool working for you properly now? I have been facing similar issues as well
Been spending hours on this lol
m
Try doing a voice call and see if it works (calls the tool) from what I experienced the agent won’t trigger the tool on text conversations
c
Just to echo Marcus, assistants using chat have an issue with using the query tool but work just fine in a voice call. Try using a voice call with your configuration and if it works in a voice call, that means your configuration is correct. Let us know if you get stuck
3 Views