Knowledge Bases
Knowledge is where you store the files and collections that your AI can search, read, and reason over. Upload PDFs, spreadsheets, code, or any text-based document. Build collections around projects, teams, or topics. When a model needs an answer, it pulls from your knowledge base instead of guessing.
Unlike Notes, which inject full content into every message, Knowledge uses retrieval (RAG) to find the relevant chunks on demand. This makes it the right choice for large document sets where injecting everything would exceed the context window.
Why Knowledge?
Your documents become searchable by AI
Upload a folder of contracts, technical specs, or research papers. The AI searches them by meaning, not just keywords, and cites where it found the answer.
Two retrieval modes for different needs
Choose Focused Retrieval (RAG) to let the AI search large collections efficiently, or Full Context to inject an entire document word-for-word when precision matters.
Autonomous exploration with native function calling
With native function calling enabled, models don't just search. They browse your knowledge bases, read files page by page, and synthesize across multiple documents without manual prompting.
Scoped access keeps things organized
Attach specific knowledge bases to a model so it only searches what's relevant. Or leave it unscoped and let the model discover everything the user has access to.
Key Features
| 📄 9 vector databases | ChromaDB and PGVector (officially maintained), plus additional options: Qdrant, Milvus, OpenSearch, Elasticsearch, and more |
| 🔍 Hybrid search | BM25 keyword search + vector search with cross-encoder reranking |
| 📑 5 extraction engines | Tika, Docling, Azure, Mistral OCR, custom loaders |
| 🤖 Agentic retrieval | Models browse, search, and read your documents autonomously |
| 📄 Full context mode | Inject entire documents with no chunking |
| 📦 Export and API | Back up knowledge bases as zip files, manage via REST API |
| 🏷️ Tags | Tag knowledge bases for organization, then filter the list by tag |
| 🗂️ Document records | Answers cite a document's title, version and effective date; superseded versions stay out of answers |
Retrieval Modes
When attaching files or knowledge bases to a model, click on the attached item to toggle between modes:
Focused Retrieval (default)
Uses RAG to find and inject the most relevant chunks based on the user's query. When hybrid search is enabled (ENABLE_RAG_HYBRID_SEARCH), retrieval combines BM25 keyword search with vector search, plus reranking for accuracy.
Best for large document sets where only specific sections are relevant.
Full Context
Injects the complete content of the file into every message. No chunking, no semantic search. Always injected regardless of native function calling settings, so the model doesn't need to call any tools to access it.
Best for short reference documents, style guides, or context that's always relevant.
Agentic Knowledge Tools
With native function calling enabled, models interact with your knowledge bases using built-in tools. Which tools appear depends on whether specific knowledge is attached to the model:
| Tool | Attached KB | No KB attached | Description |
|---|---|---|---|
list_knowledge | ✅ | ❌ | List the knowledge bases, standalone files, and notes attached to the model |
list_knowledge_bases | ❌ | ✅ | Browse available knowledge bases with file counts |
search_knowledge_bases | ❌ | ✅ | Find knowledge bases by name or description |
query_knowledge_bases | ❌ | ✅ | Search KB names/descriptions by semantic similarity |
search_knowledge_files | ✅ (scoped) | ✅ (all) | Search files by filename |
query_knowledge_files | ✅ (scoped) | ✅ | Search file contents using the RAG pipeline |
view_file | ✅ | ❌ | Read file content with pagination (offset/max_chars) |
view_knowledge_file | ✅ | ✅ | Read file content from any accessible KB |
view_note | ✅ | ❌ | Read attached notes |
The key split: list_knowledge and list_knowledge_bases are mutually exclusive. Attaching a KB scopes the model to only those documents. Leaving it unscoped lets the model discover everything the user has access to.
Reading with view_file
view_file and view_knowledge_file page through a file by character: pass offset and max_chars (default 10000, hard cap 100000). The response includes pagination metadata when the file is truncated, so the model can request the next slice.
In agentic flows, a typical pattern is: query_knowledge_files to locate the relevant document, then view_file to read the surrounding context.
Autonomous exploration works best with frontier models that can intelligently chain search, browse, and synthesize. Smaller models may struggle with multi-step retrieval. Administrators can disable the Knowledge Base tool category per-model in Workspace > Models > Edit > Builtin Tools.
For the full list of built-in agentic tools, see the Native/Agentic Mode Tools Guide.
When native function calling is enabled, attached knowledge is not automatically injected. The model must call the knowledge tools to search and retrieve. If your model isn't using attached knowledge:
- Add system prompt instructions telling the model to use
list_knowledgeandquery_knowledge_files. - Disable native function calling for that model to restore automatic RAG injection.
- Switch to Full Context mode for the attachment to bypass RAG entirely.
Setting Up a Knowledge Base
- Click Workspace in the sidebar, then select Knowledge.
- Click + New Knowledge and give it a name and description.
- Upload files or add existing documents.
- Attach the knowledge base to a model in Workspace > Models > Edit, or reference it in chat with
#.
Tags
Add tags while creating or editing a knowledge base — type a tag and press Enter, or type it and click Save directly, both commit the tag. On the Workspace > Knowledge list, the tag dropdown next to the search box filters the visible list down to knowledge bases carrying the selected tag.
Per-knowledge base chunking configuration
Each knowledge base can override the global chunking defaults set in Admin Panel > Settings > Documents. This lets you tune how documents are split and embedded on a per-collection basis without touching the server-wide settings.
Available settings
| Setting | What it controls |
|---|---|
| Chunking Strategy | How text is split: Character (recursive) splits on character boundaries, Token splits by token count, Markdown headers splits on H1–H6 first then character-splits the subsections. Leave blank to use the global default. |
| Chunk Size | Maximum characters (or tokens, depending on strategy) per chunk. Leave blank to inherit the server default (CHUNK_SIZE). |
| Chunk Overlap | Characters (or tokens) shared between adjacent chunks to preserve cross-boundary context. Leave blank to inherit CHUNK_OVERLAP. |
Setting during creation
Expand Advanced chunking settings on the Create a knowledge base form to set chunk strategy, size, and overlap before the first file is added.
Changing after creation
Open the knowledge base in Workspace > Knowledge, then expand the Chunking settings section (below the description). Changes are saved automatically via debounce. The current strategy is shown as a badge (e.g. character, markdown, or Global default).
Chunk settings only apply when a file is being embedded. Existing files are not automatically re-chunked when you change these settings. To apply the new settings to already-indexed files, remove each file from the KB and re-add it, or use the bulk reprocess action.
Strategy guide
| Strategy | Best for |
|---|---|
| Character (recursive) | General prose, PDFs, HTML — the default and usually the safest choice |
| Token | When you need precise context-window budgeting (e.g. feeding chunks to a model with a tight token limit) |
| Markdown headers | Structured docs, READMEs, wikis — preserves logical document sections; pairs well with a Chunk Min Size Target to merge tiny sub-sections |
| Global default | Defers to the server-wide TEXT_SPLITTER setting; use when you want all KBs to change together |
Precedence
KB-level settings override the global defaults. When a KB has no chunk strategy set (null), processing falls through to the server-wide TEXT_SPLITTER and ENABLE_MARKDOWN_HEADER_TEXT_SPLITTER settings.
Exporting
Admins can export an entire knowledge base as a zip file via the item menu (three dots) > Export. Files are converted to .txt for universal compatibility. Regular users will not see the Export option.
Keep a knowledge base in sync automatically
To fill a knowledge base from a folder, Git repo, Confluence space, S3 bucket, Jira project or any of 44 other sources, and keep it current as they change, use Knowledge Sync (OIKB). It uploads only new and modified files, removes deleted ones, and can run on a schedule or on push webhooks.
How a synced knowledge base behaves:
- Only what changed is sent. Each run compares the source's files with the knowledge base by folder, file name and SHA-256 checksum.
- The source's folders are kept as part of each file's path (for example
docs/api), so files with the same name in different folders stay apart. A folder goes away with its last file. - Files you add by hand are left alone. A sync deletes only files it uploaded itself. The one exception: a file you added by hand at the top level, with the same name as a file in the source, is replaced by the synced copy rather than kept twice.
- A file Studio can't read (an unsupported format, for example) still appears in the knowledge base, marked as failed, so it isn't uploaded again on every run.
- The API key that Knowledge Sync uses must belong to a user who can write to the knowledge base: its owner, someone it is shared with for writing, or an admin.
Document records and superseded documents
A file synced with Knowledge Sync can carry a document record: where it came from and which version it is. Every field is optional:
| Field | Meaning |
|---|---|
title | The document's title, when the file name is not enough |
version | Version label, for example 3.2 |
effective_date | The date it takes effect, YYYY-MM-DD |
url | Link to the original |
author | Author or owning team |
status | current or superseded |
family | Groups the versions of one document, for example a circular number |
What the record changes:
- Answers name their sources properly. The record is indexed with every part of the file, so the model can cite the document's title, version and effective date, not just a file name. The citation window shows the record: title, version, effective date, a Superseded badge, and an Original document link.
- Superseded documents stay out of answers. Parts of documents marked
supersededare stored but left out of retrieval (focused, hybrid and full-context alike). For audit questions about older versions, open the knowledge base, and in the settings below its description tick Include superseded documents in answers. - Records are checked on upload. A record with an unknown field, a status other than
currentorsuperseded, a date not inYYYY-MM-DDform or a relative URL is refused, with the field named.
A record reaches the index when its file is processed. If Knowledge Sync sent records while Hrida.ai was older than 1.1.0, they were stored but not indexed: re-index the knowledge base once after upgrading (see below).
API access
Knowledge bases can be managed programmatically:
Files
POST /api/v1/files/— Upload filesGET /api/v1/files/{id}/process/status— Check processing statusPOST /api/v1/knowledge/{id}/file/add— Add files to a knowledge base
File processing happens asynchronously. You must poll the status endpoint until processing completes before adding files to a knowledge base, or you'll get an "empty content" error. See API Endpoints for workflow examples.
Sync (used by Knowledge Sync)
POST /api/v1/knowledge/{id}/sync/diff— Compare a list of files with the knowledge basePOST /api/v1/knowledge/{id}/sync/cleanup— Remove files a sync replaced or deletedPOST /api/v1/knowledge/{id}/dirs/create— Create a folder for the next uploadsPOST /api/v1/files/withknowledge_idin its metadata — Upload a file straight into a knowledge base
See Syncing a Knowledge Base for the request and response formats.
Re-index
POST /api/v1/knowledge/{id}/reindex— Index one knowledge base's files again, for example so that files added before document records get the record fields. Anyone who may write to the knowledge base can run it. See Re-indexing a Knowledge Base.
Use Cases
Project documentation
Upload your team's technical specs, architecture docs, and runbooks into a knowledge base. Attach it to a "Project Assistant" model. The AI answers questions grounded in your actual documentation instead of generic training data.
Legal and compliance review
Load contracts, policies, and regulatory documents. Ask the AI to find specific clauses, compare terms across agreements, or flag inconsistencies.
Research synthesis
Add dozens of papers to a knowledge base. The AI searches across all of them to answer questions, find supporting evidence, or identify contradictions between studies.
Limitations
Context window with Full Context mode
"Using Entire Document" injects the full text. A large document attached to a model with a small context window will crowd out conversation history.
Processing delay for API uploads
Files uploaded via API are processed asynchronously. Attempting to use a file before processing completes will fail silently or return empty results.
Native function calling changes behavior
Enabling native function calling changes how knowledge bases work. If your KB suddenly stops producing results, check whether function_calling: native was set in global model defaults. See Knowledge Base troubleshooting for details.