type), how to match (query_by), and how much retrieval work to spend (mode).
Parameters that matter
Recommended configurations
Typical patterns
Personalized answer with memories
Personalized answer with memories
Use this when the answer should combine shared knowledge with user-specific context. Always pass the same
collection used at memory ingestion.Fan out across teams, workspaces, or users
Fan out across teams, workspaces, or users
Use this when the same question should search several collection scopes and return one globally ranked result set. Use a list for equal weighting, or an object when one scope should influence ranking more strongly.
Filtered query for a specific slice
Filtered query for a specific slice
Use
metadata_filters when you already know the slice you want. Top-level keys match schema-backed metadata fields; declare hot filters in database_metadata_schema with enable_match: true. Free-form per-source fields go under additional_metadata (document_metadata is a legacy alias). Multiple filters are ANDed exact-match constraints.Exact phrase lookup
Exact phrase lookup
Use text query when literal wording matters: legal clauses, SKUs, error codes, IDs, or compliance references.
Response summary
POST /query returns ranked data.chunks[], deduplicated data.sources[], optional data.graph_context, and optional data.additional_context from forceful relations. Preserve data.chunks[] order when building prompts; HydraDB has already ranked the results. For prompt formatting and citation patterns, see How to Use API Results.
Related sections
- Query - full endpoint reference
- Usage - Query - conceptual overview, retrieval modes, and ranking behavior
- Usage - Metadata - filtering with database and document metadata
- Concepts - Context Graphs - graph context and relation paths