1. What it is
Knowledge is the shared, database-wide context that every user and agent in a database can query - product documents, internal wikis, policy PDFs, Slack threads, Notion pages, CSVs, emails, and anything else that ought to be reusable across the workspace. Knowledge is the counterpart to Memories, which holds per-user context. Both are retrievable through the samePOST /query endpoint, but they live in separate stores; you pick which one to query via the type parameter (see Query).
One endpoint, two stores. Knowledge and memories are stored separately, but a single
POST /query call can hit both via type: "all" - results are merged and re-ranked together. Pick type: "knowledge" for shared-doc RAG, type: "memory" for per-user context, or type: "all" for personalized answers grounded in both. See Query for the full picture.2. What it does
When you callPOST /context/ingest with type=knowledge, HydraDB walks each source through a pipeline:
- Parses the input - PDF, DOCX, Markdown, CSV, plain text, or app-source JSON.
- Chunks the content into semantically coherent segments.
- Extracts entities and relationships, building graph nodes and edges (see Context Graphs).
- Embeds every chunk into the dense and sparse vector stores.
- Indexes the result so it becomes queryable via
POST /query.
202 Accepted with ids; the content isn’t queryable until indexing_status reaches at least graph_creation. Poll GET /context/status to track progress - see the full status table at Ingestion Status.
3. When to use it
Reach for Knowledge ingestion when the content is:- Shared across all users in your database - product docs, policy PDFs, runbooks, wikis, internal tooling.
- Static or infrequently updated - versioned by replacing the source rather than appending.
- Document-structured rather than conversational - files, threads, pages, articles.
- User preferences or behavioral signals tied to one person.
- Per-user conversation history that should shape future answers for that user.
- Anything that should personalize a single user’s experience.
When in doubt, ask “would a different user benefit from seeing this?” - if yes, Knowledge; if no, Memory.
4. Two ingestion paths
POST /context/ingest with type=knowledge accepts two content formats in the same request - you can send either, or both at once. Pick the path that matches what you have on hand:
- Path A when you have binary files HydraDB should parse for you.
- Path B when you have pre-extracted text from an app or connector and want to skip parsing.
Path A - Files
Binary files HydraDB should parse and chunk: PDF, DOCX, Markdown, CSV, TXT.Path B - App sources
Pre-parsed records from connected apps. You supply app-native fields (kind, provider, external_id, and fields), metadata, and optional attachments/comments. Use this when your application already extracts content from Slack messages, Notion pages, Gmail messages, tickets, or CRM records and you want HydraDB to preserve app structure instead of treating the item as generic text.
Both paths are available. Use Path A for original documents that need parsing. Use Path B for app objects when you already have structured fields and want app-aware query behavior.
response.data (e.g. response.data.results), not at the top level.
5. Verifying processing
Ingestion is async, so you need to confirm each source actually finished before it’ll show up in query. PollGET /context/status with the ids you got back from ingestion. The snippets below loop until every item reaches a terminal state (completed or errored):
queued → processing → graph_creation → completed (or land in errored on failure). Poll every few seconds; most documents complete in 1–5 minutes. The full table - including the success alias that occasionally appears for completed - is on Ingestion Status.
graph_creation is already queryable. Items in this state are retrievable via POST /query. Wait for completed only when you specifically need full graph traversal (graph_context: true).6. Key parameters
The full schema lives onPOST /context/ingest. Below are the fields you’ll touch most often, grouped by where they live in the request.
File metadata (document_metadata array items)
App source model (app_knowledge array items)
Request-level fields
7. Forceful relations
Forceful relations let you declare links between Knowledge sources at ingestion time. When a query matches a source that has forceful relations attached, HydraDB pulls the linked sources into theadditional_context field of the query response alongside the primary chunks.
This is separate from the entity and relationship context graph HydraDB builds automatically. Graph extraction is derived from content; forceful relations are declared by you - useful when you know two documents belong together (a contract and its addendum, a runbook and its troubleshooting guide) but the text doesn’t make the connection explicit. Forceful relations link whole sources; to declare the full entity/relation graph within a single document (replacing extraction for it), use Bring Your Own Graph.
For file uploads, set relations.ids on the matching document_metadata item. For app sources, prefer the app-native relations[] shape so each link can carry a predicate and provider-aware target:
additional_context field of the query response. query_forceful_relations defaults to true - you only need to set it explicitly if you want to disable forceful-relation expansion.
8. Metadata on knowledge
Metadata is how you bridge structured filters and semantic search. Attachmetadata at ingestion to enable deterministic narrowing at query time:
metadata keys in the database metadata schema with enable_match: true - undeclared keys are silently ignored at query time. additional_metadata is stored alongside the source for display and bookkeeping; to filter on it, nest the keys under additional_metadata in metadata_filters (e.g. {"metadata_filters": {"additional_metadata": {"author": "Alice"}}}). document_metadata is accepted only as a legacy alias for that nested filter namespace.
See Metadata for schema design, filter examples, and the metadata vs additional_metadata decision rule. See Create Database for the schema field configuration (enable_match, enable_dense_embedding, enable_sparse_embedding).
9. Common mistakes
Related
- Memories - the per-user counterpart to Knowledge
- Query - how
POST /queryretrieves Knowledge - Metadata - designing filterable schemas
- Context Graphs - how the graph layer enriches retrieval
- Ingest Content - API Reference
- Ingestion Status - API Reference