Upload Your Knowledge Base
Learn how to upload PDFs and documents to train your chatbot with your specific knowledge.
Step-by-Step Guide
Step 1: Access Knowledge Base Settings
Navigate to your chatbot editor and find the Knowledge Base section.
Step 2: Prepare Your Documents
Ensure your files are in supported formats (PDF, DOCX, TXT, CSV) and under 10MB each.
Step 3: Upload Files
Drag and drop your files or click to browse and select multiple files.
Practical Example:
// Upload file via JavaScript
const formData = new FormData();
formData.append('file', selectedFile);
formData.append('chatbotId', 'your-chatbot-id');
fetch('/api/knowledge-base/upload', {
method: 'POST',
headers: {
'Authorization': `Bearer ${apiKey}`
},
body: formData
})
.then(response => response.json())
.then(result => console.log('Upload successful:', result))
.catch(error => console.error('Upload failed:', error));See our code examples for complete upload implementations.
Step 4: Process and Train
Wait for the AI to process your documents and create searchable knowledge.
Processing Time:
- • Small files (TXT): ~30 seconds
- • Medium files (DOCX): ~2-3 minutes
- • Large files (PDF): ~5-10 minutes
- • Multiple files: Process sequentially
→ Pro tip: Upload files during off-peak hours for faster processing.
Supported File Formats
Portable Document Format
Microsoft Word Documents
Plain Text Files
Comma-Separated Values
File Size Limit
Each file must be under 10MB. For larger documents, consider splitting them into smaller sections.
Best Practices
Content Preparation
- Use clear, descriptive file names for better organization
- Include comprehensive content rather than just keywords
📄 Content Optimization Tips:
- • Use descriptive headings (H1, H2, H3)
- • Include keywords naturally in content
- • Add table of contents for long documents
- • Use bullet points and numbered lists
Maintenance
- Regularly update your knowledge base with new information
- Test your chatbot responses after uploading new content
Update Strategy:
// Check processing status periodically
async function checkProcessingStatus(chatbotId) {
const response = await fetch(`/api/knowledge-base/status/${chatbotId}`);
const status = await response.json();
return status.processingComplete;
}
// Monitor and update as needed
setInterval(async () => {
const isReady = await checkProcessingStatus('your-chatbot-id');
if (isReady) {
console.log('Knowledge base updated successfully!');
}
}, 30000); // Check every 30 secondsRelated Guides
Customize Your Chatbot
Configure your chatbot's personality and responses after setting up knowledge base.
Analytics & Optimization
Track how well your knowledge base content performs and optimize responses.
API Integration
Connect your knowledge base with external systems and APIs.
Advanced Features
Explore premium features that work with your knowledge base.
Troubleshooting
Common issues and their solutions with code examples
✗ Upload Failed
Check file size and format. Ensure you're within plan limits.
→ Processing Taking Too Long
Large files may take several minutes. Check processing status.
🤖 Chatbot Not Using New Knowledge
Wait for processing to complete, then test with relevant questions.
Rate Limiting Issues
Too many requests. Implement retry with backoff.
Need More Help?
Check our comprehensive code examples for complete implementations and advanced troubleshooting.
Next Steps
Customize Your Chatbot
Learn how to customize your chatbot's personality and responses.
API Reference
Explore the complete API documentation for advanced integrations.