input_type="query", searches the vector database, and returns the closest stored chunks.
Use this page to understand the retrieval stage. Use the interface-specific pages when you need exact parameters, flags, request fields, or response shapes.
Retrieval does not generate an answer. It returns chunks and scores. Use Chat when you want answer generation over retrieved context.
Basic retrieval
Query embeddings
Retrieval uses the configured embedding model withinput_type="query". This must match the model used during indexing, but not the input type.
Tuning knobs
Reranking
Reranking takes vector-search candidates and reorders them with a reranker. Retrieve wide, then rerank down.Query rewriting
Query rewriting turns a follow-up into a standalone search query before embedding. It needs an LLM.The SDK can use a configured LLM for rewriting. REST exposes rewrite flags, but the server still needs a usable LLM provider configured.
Query pipeline
query() is the high-level query helper. It wraps embedding and retrieval settings in stable nested objects and returns the same RetrieveResult shape.
The CLI
query command supports reranking, but it does not expose query rewrite flags yet. Use SDK or REST for query rewriting in the high-level query pipeline.Possible errors
Interface validation errors raise immediately in SDK and REST. Core retrieval failures are returned in the resulterrors list when processing can continue. See Errors for the shared shapes.
Next steps
- Use Chat to generate grounded answers from retrieved chunks.
- Use Pipeline Overview to see how retrieval fits into the full RAG flow.
- Use Vector Databases to verify provider names and collection settings.

