Skip to main content

Retrieve

POST 

/api/v1/retrievers/:retriever_id/retrieve

Retrieve data using a Retriever.

Request

Path Parameters

    retriever_id uuidrequired

Cookie Parameters

    session any

Body

required

    mode CompositeRetrievalMode (string)

    The mode of composite retrieval.

    Possible values: [routing, full]

    Default value: full
    rerank_top_n Rerank Top N (integer)

    The number of nodes to retrieve after reranking over retrieved nodes from all retrieval tools.

    Default value: 6
    query Query (string)required

    The query to retrieve against.

Responses

Successful Response

Schema

    nodes

    object[]

    The retrieved nodes from the composite retrieval.

  • Array [

  • node

    object

    required

    id uuidrequired

    The ID of the retrieved node.

    retriever_id uuidrequired

    The ID of the retriever this node was retrieved from.

    retriever_pipeline_name Retriever Pipeline Name (string)required

    The name of the retrieval pipeline this node was retrieved from.

    pipeline_id uuidrequired

    The ID of the pipeline this node was retrieved from.

    metadata object

    Metadata associated with the retrieved node.

    text Text (string)required

    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

    class_name Class Name (string)
    Default value: CompositeRetrievedTextNodeWithScore
  • ]

  • image_nodes

    object[]

    The image nodes retrieved by the pipeline for the given query.

  • Array [

  • node

    object

    required

    page_index Page Index (integer)required

    The index of the page for which the screenshot is taken (0-indexed)

    file_id uuidrequired

    The ID of the file that the page screenshot was taken from

    image_size Image Size (integer)required

    The size of the image in bytes

    score Score (number)required

    The score of the screenshot node

    class_name Class Name (string)
    Default value: NodeWithScore
  • ]