Retrieve Chunks

Retrieve relevant chunks.

The optional request.filters payload accepts equality checks (automatically matching scalars inside JSON arrays) plus the operators $and, $or, $nor, $not, $in, $nin, $exists, $regex, and $contains. Regex filters allow the optional i flag for case-insensitive matching, while $contains performs substring checks (case-insensitive by default, configurable via case_sensitive). Filters can be nested freely, for example:

{
  "$and": [
    {"category": "policy"},
    {"$or": [{"region": "emea"}, {"priority": {"$in": ["p0", "p1"]}}]}
  ]
}

Args: request: RetrieveRequest containing: - query: Search query text - filters: Optional metadata filters - k: Number of results (default: 4) - min_score: Minimum similarity threshold (default: 0.0) - use_reranking: Whether to use reranking - use_colpali: Whether to use ColPali-style embedding model - folder_name: Optional folder to scope the search to - end_user_id: Optional end-user ID to scope the search to auth: Authentication context

Returns: List[ChunkResult]: List of relevant chunks

post/retrieve/chunks

Headers

authorizationstring

Request body

querystring required
filtersobject nullable
kinteger
min_scorenumber
use_rerankingboolean nullable
use_colpaliboolean nullable
paddinginteger

Number of additional chunks/pages to retrieve before and after matched chunks (ColPali only)

graph_namestring nullable

Name of the graph to use for knowledge graph-enhanced retrieval

hop_depthinteger nullable

Number of relationship hops to traverse in the graph

include_pathsboolean nullable

Whether to include relationship paths in the response

end_user_idstring nullable

Optional end-user scope for the operation

Response

Successful Response

contentstring required
scorenumber required
document_idstring required
chunk_numberinteger required
metadataobject required
content_typestring required
filenamestring nullable
download_urlstring nullable
is_paddingboolean

Whether this chunk was added as padding

Changes