Skip to main content

Run Search

POST 

/api/v1/pipelines/:pipeline_id/retrieve

Get retrieval results for a managed pipeline and a query

Request

Path Parameters

    pipeline_id uuidrequired

Cookie Parameters

    session any

Body

required

    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

  • Array [

  • 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

    key Key (string)required

    value

    object

    required

    anyOf

    integer

    operator FilterOperator (string)

    Vector store filter operator.

    Possible values: [==, >, <, !=, >=, <=, in, nin, any, all, text_match, contains, is_empty]

    Default value: ==
  • ]

  • 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

    retrieval_mode RetrievalMode (string)

    The retrieval mode for the query.

    Possible values: [chunks, files_via_metadata, files_via_content, auto_routed]

    Default value: auto_routed
    retrieve_image_nodes Retrieve Image Nodes (boolean)

    Whether to retrieve image nodes.

    Default value: false
    query Query (string)required

    The query to retrieve against.

    class_name Class Name (string)
    Default value: base_component

Responses

Successful Response

Schema

    pipeline_id uuidrequired

    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.

  • Array [

  • node

    object

    required

    id_ Id (string)

    Unique ID of the node.

    embedding

    object

    Embedding of the node.

    anyOf

  • Array [

  • number

  • ]

  • extra_info object

    A flat dictionary of metadata fields

    excluded_embed_metadata_keys string[]

    Metadata keys that are excluded from text for the embed model.

    excluded_llm_metadata_keys string[]

    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_id Node Id (string)required

    node_type

    object

    anyOf

    string

    Possible values: [1, 2, 3, 4]

    metadata object

    hash

    object

    anyOf

    string

    class_name Class Name (string)
    Default value: RelatedNodeInfo
    text Text (string)

    Text content of the node.

    Default value:
    mimetype Mimetype (string)

    MIME type of the node content.

    Default value: 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

    text_template Text Template (string)

    Template for how text is formatted, with {content} and {metadata_str} placeholders.

    Default value: {metadata_str} {content}
    metadata_template Metadata Template (string)

    Template for how metadata is formatted, with {key} and {value} placeholders.

    Default value: {key}: {value}
    metadata_seperator Metadata Seperator (string)

    Separator between metadata fields when converting to string.

    Default value:
    class_name Class Name (string)
    Default value: TextNode

    score

    object

    anyOf

    number

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

  • 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
  • ]

  • retrieval_latency

    object

    required

    The end-to-end latency for retrieval and reranking.

    property name* number

    metadata

    object

    Metadata associated with the retrieval execution

    property name* string
    class_name Class Name (string)
    Default value: RetrieveResults
Loading...