A Knowledge Base is a collection of custom files that contain information on specific topics or domains. By integrating a Knowledge Base into your AI assistant, you can enable it to provide more accurate and informative responses to user queries based on your own data. Knowledge Bases are available through both the Vapi API and dashboard.
Using a Knowledge Base with your AI assistant offers several benefits:
Knowledge Bases are configured through the API or dashboard. For advanced configuration options, view all configurable properties in the API Reference.
There are two main approaches to creating a Knowledge Base in Vapi:
Build > Files in your Vapi dashboard.txt, .pdf, .docx, etc.)Vapi supports various file formats for Knowledge Bases including: .txt, .pdf, .docx, .doc, .csv, .md, .tsv, .yaml, .json, .xml, and .log files.

Build > Assistant
Instruct your assistant to use the knowledge base when relevant by adding appropriate prompts in your assistant’s configuration. This helps ensure the assistant knows when to reference the knowledge base versus using its general knowledge.
For example, if you have a knowledge base about your company’s products, you might add this prompt:
Review your assistant configuration to ensure all settings are correct
Click the “Publish” button to make your changes live
This automatically creates a default knowledge base (using the query tool) with the selected files for the assistant
When you publish an assistant with selected files, Vapi automatically creates a query tool with those files configured as a knowledge base. For more advanced configurations, use the API method described below or see our Query Tool documentation.
For more advanced configurations, you can create and configure Knowledge Bases using the API through the Query Tool. This method offers greater flexibility and control over your knowledge base setup.
For detailed instructions on creating and configuring knowledge bases via the API, please refer to our dedicated guide: Using the Query Tool for Knowledge Bases.
The API method allows you to:
This approach is recommended for developers and users who need precise control over their knowledge base implementation or are integrating Vapi into existing systems programmatically.
For more information on creating effective Knowledge Bases, check out our tutorial on Best Practices for Knowledge Base Creation.
By following these guidelines, you can create a comprehensive Knowledge Base that enhances the capabilities of your AI assistant and provides valuable information to users.
Currently, Vapi’s Knowledge Base functionality supports Google as a provider with Gemini models for knowledge retrieval. For the most up-to-date information on supported providers and models, please refer to our API documentation.