Run Search
POST/api/v1/pipelines/:pipeline_id/retrieve
Get retrieval results for a managed pipeline and a query
Request
Path Parameters
Cookie Parameters
- application/json
Body
required
- MOD1
- MOD1
- MOD1
- MOD1
- MOD1
- MOD1
- MetadataFilters
Array [
- MetadataFilter
- MOD1
- MOD2
- MOD3
- MOD4
- MOD5
- MOD6
Array [
]
Array [
]
Array [
]
]
- FilterCondition
- MOD1
dense_similarity_top_k
object
Number of nodes for dense retrieval.
anyOf
integer
Possible values: >= 1
and <= 100
dense_similarity_cutoff
object
Minimum similarity score wrt query for retrieval
anyOf
number
Possible values: <= 1
sparse_similarity_top_k
object
Number of nodes for sparse retrieval.
anyOf
integer
Possible values: >= 1
and <= 100
enable_reranking
object
Enable reranking for retrieval
anyOf
boolean
rerank_top_n
object
Number of reranked nodes for returning.
anyOf
integer
Possible values: >= 1
and <= 100
alpha
object
Alpha value for hybrid retrieval to determine the weights between dense and sparse retrieval. 0 is sparse retrieval and 1 is dense retrieval.
anyOf
number
Possible values: <= 1
search_filters
object
Search filters for retrieval.
anyOf
Metadata filters for vector stores.
filters
object[]
required
anyOf
Comprehensive metadata filter for vector stores to support more operators.
Value uses Strict* types, as int, float and str are compatible types and were all converted to string before.
See: https://docs.pydantic.dev/latest/usage/types/#strict-types
value
object
required
anyOf
integer
number
string
string
number
integer
Vector store filter operator.
Possible values: [==
, >
, <
, !=
, >=
, <=
, in
, nin
, any
, all
, text_match
, contains
, is_empty
]
==
condition
object
anyOf
Vector store filter conditions to combine different filters.
string
Possible values: [and
, or
]
files_top_k
object
Number of files to retrieve (only for retrieval mode files_via_metadata and files_via_content).
anyOf
integer
Possible values: >= 1
and <= 5
The retrieval mode for the query.
Possible values: [chunks
, files_via_metadata
, files_via_content
, auto_routed
]
auto_routed
Whether to retrieve image nodes.
false
The query to retrieve against.
base_component
Responses
- 200
- 422
Successful Response
- application/json
- Schema
- Example (from schema)
Schema
Array [
- MOD1
Array [
]
- RelatedNodeInfo
- MOD2
- ObjectType
- MOD1
Array [
- ObjectType
- MOD1
]
- MOD1
- MOD1
- MOD1
]
Array [
]
The ID of the pipeline that the query was retrieved against.
retrieval_nodes
object[]
required
The nodes retrieved by the pipeline for the given query.
node
object
required
Unique ID of the node.
embedding
object
Embedding of the node.
anyOf
number
A flat dictionary of metadata fields
Metadata keys that are excluded from text for the embed model.
Metadata keys that are excluded from text for the LLM.
relationships
object
A mapping of relationships to other node information.
property name*
object
anyOf
node_type
object
anyOf
string
Possible values: [1
, 2
, 3
, 4
]
hash
object
anyOf
string
RelatedNodeInfo
node_type
object
anyOf
string
Possible values: [1
, 2
, 3
, 4
]
hash
object
anyOf
string
RelatedNodeInfo
Text content of the node.
MIME type of the node content.
text/plain
start_char_idx
object
Start char index of the node.
anyOf
integer
end_char_idx
object
End char index of the node.
anyOf
integer
Template for how text is formatted, with {content} and {metadata_str} placeholders.
{metadata_str}
{content}
Template for how metadata is formatted, with {key} and {value} placeholders.
{key}: {value}
Separator between metadata fields when converting to string.
TextNode
score
object
anyOf
number
TextNodeWithScore
image_nodes
object[]
The image nodes retrieved by the pipeline for the given query.
node
object
required
The index of the page for which the screenshot is taken (0-indexed)
The ID of the file that the page screenshot was taken from
The size of the image in bytes
The score of the screenshot node
NodeWithScore
retrieval_latency
object
required
The end-to-end latency for retrieval and reranking.
metadata
object
Metadata associated with the retrieval execution
RetrieveResults
{
"pipeline_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"retrieval_nodes": [
{
"node": {
"id_": "string",
"embedding": [
null
],
"extra_info": {},
"excluded_embed_metadata_keys": [
"string"
],
"excluded_llm_metadata_keys": [
"string"
],
"relationships": {},
"text": "string",
"mimetype": "text/plain",
"start_char_idx": 0,
"end_char_idx": 0,
"text_template": "{metadata_str}\n\n{content}",
"metadata_template": "{key}: {value}",
"metadata_seperator": "\n",
"class_name": "TextNode"
},
"score": 0,
"class_name": "TextNodeWithScore"
}
],
"image_nodes": [
{
"node": {
"page_index": 0,
"file_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"image_size": 0
},
"score": 0,
"class_name": "NodeWithScore"
}
],
"retrieval_latency": {},
"metadata": {},
"class_name": "RetrieveResults"
}
Validation Error
- application/json
- Schema
- Example (from schema)
Schema
Array [
Array [
- MOD1
- MOD2
]
]
detail
object[]
loc
object[]
required
anyOf
string
integer
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}