Knowledge Base
ConceptsA knowledge base is a collection of documents organized for RAG chat and semantic search. When you ask a question, DocLD searches only the documents in the selected knowledge base, providing focused, relevant answers. Knowledge bases scope vector search by filtering which documents belong to each collection.
Why Knowledge Bases Matter
| Benefit | Description |
|---|---|
| Scoped context | Chat searches only relevant documents, not your entire library |
| Better accuracy | Curated content leads to more precise answers |
| Team use | Share knowledge bases with colleagues for consistent Q&A |
| Isolation | Separate knowledge bases for different projects, clients, or departments |
Without knowledge bases, a single query would search all documents, which can dilute relevance and expose content across unrelated use cases.
Creating and Using
- Create — Create a knowledge base via the dashboard or API
- Add documents — Upload documents or add from your document library
- Process — Documents are parsed, chunked, embedded, and indexed
- Chat — Select the knowledge base and start chatting—DocLD searches only those documents
Documents are indexed in Pinecone; knowledge base membership is stored as metadata so queries filter to the right documents. The index stores chunks with knowledge base metadata for filtering.
Document Lifecycle
| Stage | Description |
|---|---|
| Upload | Document is uploaded and associated with the knowledge base |
| Process | Parsing, chunking, embedding run |
| Index | Chunks are stored in the index with knowledge base metadata |
| Search | Vector search filters by knowledge base |
| Remove | Removing a document from a knowledge base removes its chunks from search scope |
Documents can belong to multiple knowledge bases. Removing a document from one knowledge base does not remove it from others.
Templates
Templates pre-configure retrieval settings for common use cases:
| Template | Chunking | Top-k | Reranking | Response Style |
|---|---|---|---|---|
| Legal | Section-based | 10–15 | LLM | Formal, citation-heavy |
| Invoice | Table-aware | 5–10 | Heuristic | Concise, numbers-focused |
| Research | Paragraph-based | 15–20 | Hybrid | Detailed, exploratory |
| Technical | Section-based | 10–15 | Heuristic | Code-aware, structured |
Templates set chunking strategy, top-k, reranking type, and response style. You can start from a template and customize.
Search Behavior
When you query a knowledge base:
- Query is embedded and sent to Pinecone
- Metadata filter restricts search to documents in the knowledge base
- Vector search returns top-k similar chunks
- Optional reranking refines the order
- LLM generates an answer with citations
Related Concepts
Knowledge bases scope RAG and vector search. Embedding and chunking determine what gets indexed. The index stores chunks with knowledge base metadata for filtering.