Query tools now working:
# support
v
To configure your Query Tool for retrieving TXT file content, ensure your assistant's system prompt explicitly instructs when to use the tool. For example:
Copy code
json
{
  "role": "system",
  "content": "You are a helpful assistant. When users ask about products or need information, use the 'knowledge-search' tool to search our knowledge base for accurate answers. Always call the knowledge-search tool before responding."
}
This helps the assistant properly access your TXT-based knowledge base and prevents retrieval errors. For more details, see the [Vapi Query Tool documentation](https://docs.vapi.ai/knowledge-base/using-query-tool). Source: - [Using the Query Tool for Knowledge Bases](https://docs.vapi.ai/knowledge-base/using-query-tool)
f
I’m experiencing an issue with the Query Tool in Vapi AI. Previously, I was able to upload a .txt file as a knowledgebase, assign it to an AI assistant, and the assistant could read and use it without problems. However, recently this no longer works—the AI assistant cannot access or read the uploaded knowledgebase. Could you please advise on what might be causing this and how to resolve it? For reference: File type: .txt Steps I followed: i uploaded the text file to vapi ai, created a query tool, described it, assigned the knowledgebase (text file), i assign it to my assistant, when i request to use it, the tool fails and the ai cannot read and he gives me this notification when he tried to access the tool "Cannot read properties of undefined (reading 'message" The json code for example looks like this: { "id": "26e3fd95-ae66-4f66-ba3d-8d563f6a0b18", "createdAt": "2025-12-11T15:49:55.275Z", "updatedAt": "2025-12-11T15:51:24.875Z", "type": "query", "function": { "name": "query_tool", "description": "this is a tool used to answer FAQs", "parameters": { "type": "object", "properties": {}, "required": [] } }, "messages": [ { "type": "request-start", "blocking": false } ], "orgId": "c4bad15c-08a9-4947-97b2-267c898b3629", "knowledgeBases": [ { "name": "new_knowledge_base", "provider": "google", "model": "gemini-2.0-flash", "description": "this is a tool used to answer FAQs", "fileIds": [ "ba9e64e9-ce8b-4d57-9b3d-8028d86fd02f" ] } ] } The issue that i think is the blocking.
c
Hi Shadow101, To resolve the issue with your query tool, ensure the following: 1. **System Prompt Configuration**: Make sure your assistant's system prompt specifically instructs the use of the query tool. For example:
Copy code
json
   {
     "role": "system",
     "content": "You are a helpful assistant. When users ask about products or need information, use the 'knowledge-search' tool to search our knowledge base for accurate answers. Always call the knowledge-search tool before responding."
   }
This ensures that the AI knows when to call the tool. 2. **Review Tool Configuration**: Double-check that your query tool is correctly set up with the necessary file IDs and descriptions in your configuration. You might want to recreate the tool using the correct parameters as detailed in the [Query Tool documentation](https://docs.vapi.ai/knowledge-base/using-query-tool). 3. **Check File Status**: Make sure the file status is not "failed" as this could prevent retrieval. If any files show a failed status, try re-uploading them and note any errors during the process. Following these steps should help your assistant access the uploaded .txt file for queries.