Knowledge Bases
Organize documents into searchable collections for context-aware AI chat and semantic search.
What are Knowledge Bases?
Knowledge bases are collections of documents that provide context for AI-powered chat. When you ask a question, DocLD searches the knowledge base for relevant information and provides answers with citations.
Key benefits:
- Focused context - Chat only searches relevant documents
- Better accuracy - More precise answers from curated content
- Team collaboration - Share knowledge bases with your team
- Analytics - Track what questions are being asked
Creating a Knowledge Base
From the Dashboard
- Go to Knowledge Bases in the sidebar
- Click Create Knowledge Base
- Enter a name and description
- Optionally select a template
- Add documents
Using Templates
Templates provide pre-configured settings for common use cases:
| Template | Best For |
|---|---|
| Legal | Contracts, agreements, legal documents |
| Invoice | Invoices, receipts, financial documents |
| Research | Papers, articles, research documents |
| Technical | Documentation, manuals, guides |
Templates configure:
- Retrieval settings (how many results to fetch)
- Chunking strategy (how documents are split)
- Response style (concise vs detailed)
Adding Documents
Upload New Documents
Drag and drop files directly into a knowledge base, or select an existing knowledge base when uploading.
Add Existing Documents
Add documents you’ve already uploaded:
- Open a knowledge base
- Click Add Documents
- Select from your document library
- Click Add Selected
Batch Operations
Add multiple documents at once via the dashboard or API:
curl -X POST "/api/knowledge-bases/{id}/documents/batch" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"document_ids": ["doc1", "doc2", "doc3"]}'Chatting with Knowledge Bases
Once documents are added, start chatting:
- Open the knowledge base
- Click Chat or go to the Chat page
- Select your knowledge base from the dropdown
- Ask questions
How RAG Works
- Query - Your question is sent to Pinecone; embeddings and search happen server-side (llama-text-embed-v2)
- Search - Similar content is found in the knowledge base
- Retrieve - Relevant chunks are gathered
- Generate - AI creates an answer using the context
- Cite - Sources are linked to the response
Chat Modes
| Mode | Description |
|---|---|
| Fast | Quick responses, fewer citations |
| Balanced | Default - good balance of speed and accuracy |
| Thorough | Comprehensive search, more citations |
Smart Suggestions
DocLD analyzes your knowledge base and suggests:
- Related documents - Documents that would improve coverage
- Gap analysis - Topics that aren’t well covered
- Duplicate detection - Potential duplicate documents
Access suggestions from the knowledge base page or via API.
Analytics
Track how your knowledge base is being used:
- Query volume - How many questions are asked
- Popular topics - Most common question themes
- Response quality - Confidence scores and feedback
- Document usage - Which documents are cited most
View analytics from the knowledge base page under the Analytics tab.
Settings
Configure knowledge base behavior:
Retrieval Settings
{
"retrieval": {
"top_k": 5,
"threshold": 0.7,
"reranking": true
}
}| Setting | Default | Description |
|---|---|---|
top_k | 5 | Number of chunks to retrieve |
threshold | 0.7 | Minimum relevance score |
reranking | true | Re-rank results for accuracy |
Chunking Settings
{
"chunking": {
"strategy": "semantic",
"max_size": 1000,
"overlap": 100
}
}| Setting | Default | Description |
|---|---|---|
strategy | semantic | How to split: semantic, fixed, page |
max_size | 1000 | Maximum chunk size (characters) |
overlap | 100 | Overlap between chunks |
Sharing & Collaboration
Organization Knowledge Bases
Create knowledge bases at the organization level to share with team members:
- Create a knowledge base
- Select an organization
- All organization members can access it
Member Permissions
| Role | Permissions |
|---|---|
| Owner | Full access, delete |
| Admin | Manage documents, settings |
| Member | Chat, view |
| Viewer | Chat only |
Best Practices
- Keep focused - One topic or domain per knowledge base
- Quality over quantity - Curated content beats volume
- Update regularly - Keep documents current
- Review analytics - See what’s working
- Use templates - Start with pre-configured settings
- Remove duplicates - Use duplicate detection
API Reference
See the Knowledge Bases API for programmatic access.