add_pdf(), add_website(), and add_text(). Documents are automatically chunked and vectorized for retrieval.
Quick Start
add_pdf()
Add a PDF document to the knowledge base.Parameters
Examples
add_docx()
Add a Word document to the knowledge base.Parameters
Example
add_txt()
Add a plain text file to the knowledge base.Parameters
Example
add_website()
Add website content to the knowledge base with optional crawling.Parameters
Examples
add_text()
Add raw text content directly to the knowledge base.Parameters
Examples
Chunking Configuration
Documents are split into chunks for efficient retrieval. Configure chunking to optimize for your use case:Small Chunks (Precise Retrieval)
- FAQ-style content
- Technical documentation
- When precision is important
Large Chunks (More Context)
- Narrative content
- Legal documents
- When context is important
Bulk Document Loading
Examples
Documentation Website
Support Knowledge Base
Mixed Content
Error Handling
Processing Time
Document processing can take time, especially for:- Large PDFs (many pages)
- Website crawling (many pages)
- Complex documents