Retrieve
POST/api/v1/retrievers/:retriever_id/retrieve
Retrieve data using a Retriever.
Request
Path Parameters
Cookie Parameters
- application/json
Body
required
The mode of composite retrieval.
Possible values: [routing
, full
]
full
The number of nodes to retrieve after reranking over retrieved nodes from all retrieval tools.
6
The query to retrieve against.
Responses
- 200
- 422
Successful Response
- application/json
- Schema
- Example (from schema)
Schema
Array [
- MOD1
- MOD1
- MOD1
]
Array [
]
nodes
object[]
The retrieved nodes from the composite retrieval.
node
object
required
The ID of the retrieved node.
The ID of the retriever this node was retrieved from.
The name of the retrieval pipeline this node was retrieved from.
The ID of the pipeline this node was retrieved from.
Metadata associated with the retrieved node.
The text of the retrieved node.
start_char_idx
object
required
The start character index of the retrieved node in the document
anyOf
integer
end_char_idx
object
required
The end character index of the retrieved node in the document
anyOf
integer
score
object
anyOf
number
CompositeRetrievedTextNodeWithScore
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
{
"nodes": [
{
"node": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"retriever_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"retriever_pipeline_name": "string",
"pipeline_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"metadata": {},
"text": "string",
"start_char_idx": 0,
"end_char_idx": 0
},
"score": 0,
"class_name": "CompositeRetrievedTextNodeWithScore"
}
],
"image_nodes": [
{
"node": {
"page_index": 0,
"file_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"image_size": 0
},
"score": 0,
"class_name": "NodeWithScore"
}
]
}
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"
}
]
}