Skip to main content

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 same POST /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 call POST /context/ingest with type=knowledge, HydraDB walks each source through a pipeline:
  1. Parses the input - PDF, DOCX, Markdown, CSV, plain text, or app-source JSON.
  2. Chunks the content into semantically coherent segments.
  3. Extracts entities and relationships, building graph nodes and edges (see Context Graphs).
  4. Embeds every chunk into the dense and sparse vector stores.
  5. Indexes the result so it becomes queryable via POST /query.
The pipeline runs asynchronously. The ingest call returns 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.
Reach for Memories instead when the content is:
  • 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 (both paths):
All endpoints return this envelope shape. Access the payload via 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. Poll GET /context/status with the ids you got back from ingestion. The snippets below loop until every item reaches a terminal state (completed or errored):
Status values move forward through queuedprocessinggraph_creationcompleted (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 on POST /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 the additional_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:
At query time, linked sources are returned in the 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.
Knowledge items only. Forceful relations work within the same store. Pointing a Knowledge item at a Memory ID (or vice versa) will silently return nothing at query time.
thinking mode only. Forceful-relation context is fetched only when mode: "thinking" is set on the query request. In fast mode, query_forceful_relations is ignored even if set to true.

8. Metadata on knowledge

Metadata is how you bridge structured filters and semantic search. Attach metadata at ingestion to enable deterministic narrowing at query time:
Then at query time:
For hot, supported top-level filters, declare 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