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
Headers
Request body
Response
Successful Response