Train AI with data in excel spreadsheet
# support
v
To have your AI answer questions using data from an external Excel spreadsheet, convert your spreadsheet to a
.csv
file and upload it as a Knowledge Base in Vapi. Then, associate this file with your assistant so it can answer based on your Q&A pairs. For programmatic setup via HTTPS/JSON, use the API to create a knowledge base:
Copy code
json
POST https://api.vapi.ai/knowledge-base
{
  "provider": "custom-knowledge-base",
  "files": ["<your_uploaded_file_id>"]
}
This ensures your assistant will answer using the data you provided. Note: Real-time reading from a live spreadsheet is not currently supported—data must be uploaded first. [See full docs](https://docs.vapi.ai/knowledge-base) Sources: - [Vapi Knowledge Base Documentation](https://docs.vapi.ai/knowledge-base) - [Vapi API Reference: Create Knowledge Base](https://docs.vapi.ai/api-reference/knowledge-bases/create)
w
How can I make my AI trained with data that is external? I have a list of questions and answers to those questions. When AI gets asked a certain question it has to answer it as it is in that spreadsheet. Because there is 40+ questions I need to have it externally. How can I make it go and read the answer to question asked? I would like to implement that feature in my HTTPS request for making a call because all my settings for making the call are defined there via code (JSON)
v
You can implement your Q&A system with 40+ predefined question-answer pairs using Vapi's Query KB Tool. How It Works 1. **User Question**: When a user asks a question, it's sent to your Vapi assistant 2. **KB Tool Activation**: The assistant recognizes that it should use the Query KB Tool(based on your prompting) to find information 3. **Knowledge Base Search**: The tool searches your knowledge base (your uploaded PDF) for content matching the question 4. **Matching Process**: Vapi uses semantic search to match the query with the most relevant Q&A pair in your data 5. **Answer Retrieval**: The answer from your spreadsheet is retrieved and sent back to the assistant 6. **Response Generation**: The assistant delivers this answer to the user You can now access the KB directly through the dashboard. Here’s a short video that explains how to use it: .
2 Views