Skip to content
Get started

Retrievers

Create Retriever
client.retrievers.create(RetrieverCreateParams { name, organization_id, project_id, pipelines } params, RequestOptionsoptions?): Retriever { id, name, project_id, 3 more }
POST/api/v1/retrievers
Upsert Retriever
client.retrievers.upsert(RetrieverUpsertParams { name, organization_id, project_id, pipelines } params, RequestOptionsoptions?): Retriever { id, name, project_id, 3 more }
PUT/api/v1/retrievers
List Retrievers
client.retrievers.list(RetrieverListParams { name, organization_id, project_id } query?, RequestOptionsoptions?): RetrieverListResponse { id, name, project_id, 3 more }
GET/api/v1/retrievers
Get Retriever
client.retrievers.get(stringretrieverID, RetrieverGetParams { organization_id, project_id } query?, RequestOptionsoptions?): Retriever { id, name, project_id, 3 more }
GET/api/v1/retrievers/{retriever_id}
Update Retriever
client.retrievers.update(stringretrieverID, RetrieverUpdateParams { pipelines, name } body, RequestOptionsoptions?): Retriever { id, name, project_id, 3 more }
PUT/api/v1/retrievers/{retriever_id}
Delete Retriever
client.retrievers.delete(stringretrieverID, RequestOptionsoptions?): void
DELETE/api/v1/retrievers/{retriever_id}
Direct Retrieve
client.retrievers.search(RetrieverSearchParams { query, organization_id, project_id, 4 more } params, RequestOptionsoptions?): CompositeRetrievalResult { image_nodes, nodes, page_figure_nodes }
POST/api/v1/retrievers/retrieve
ModelsExpand Collapse
CompositeRetrievalMode = "routing" | "full"

Enum for the mode of composite retrieval.

Accepts one of the following:
"routing"
"full"
CompositeRetrievalResult { image_nodes, nodes, page_figure_nodes }
Deprecatedimage_nodes?: Array<PageScreenshotNodeWithScore { node, score, class_name } >

The image nodes retrieved by the pipeline for the given query. Deprecated - will soon be replaced with 'page_screenshot_nodes'.

node: Node { file_id, image_size, page_index, metadata }
file_id: string

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

formatuuid
image_size: number

The size of the image in bytes

minimum0
page_index: number

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

minimum0
metadata?: Record<string, unknown> | null

Metadata for the screenshot

score: number

The score of the screenshot node

class_name?: string
nodes?: Array<Node>

The retrieved nodes from the composite retrieval.

node: Node { id, end_char_idx, pipeline_id, 5 more }
id: string

The ID of the retrieved node.

formatuuid
end_char_idx: number | null

The end character index of the retrieved node in the document

pipeline_id: string

The ID of the pipeline this node was retrieved from.

formatuuid
retriever_id: string

The ID of the retriever this node was retrieved from.

formatuuid
retriever_pipeline_name: string

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

start_char_idx: number | null

The start character index of the retrieved node in the document

text: string

The text of the retrieved node.

metadata?: Record<string, unknown>

Metadata associated with the retrieved node.

class_name?: string
score?: number | null
page_figure_nodes?: Array<PageFigureNodeWithScore { node, score, class_name } >

The page figure nodes retrieved by the pipeline for the given query.

node: Node { confidence, figure_name, figure_size, 4 more }
confidence: number

The confidence of the figure

maximum1
minimum0
figure_name: string

The name of the figure

figure_size: number

The size of the figure in bytes

minimum0
file_id: string

The ID of the file that the figure was taken from

formatuuid
page_index: number

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

minimum0
is_likely_noise?: boolean

Whether the figure is likely to be noise

metadata?: Record<string, unknown> | null

Metadata for the figure

score: number

The score of the figure node

class_name?: string
ReRankConfig { top_n, type }
top_n?: number

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

minimum1
type?: "system_default" | "llm" | "cohere" | 3 more

The type of reranker to use.

Accepts one of the following:
"system_default"
"llm"
"cohere"
"bedrock"
"score"
"disabled"
Retriever { id, name, project_id, 3 more }

An entity that retrieves context nodes from several sub RetrieverTools.

id: string

Unique identifier

formatuuid
name: string

A name for the retriever tool. Will default to the pipeline name if not provided.

maxLength3000
minLength1
project_id: string

The ID of the project this retriever resides in.

formatuuid
created_at?: string | null

Creation datetime

formatdate-time
pipelines?: Array<RetrieverPipeline { description, name, pipeline_id, preset_retrieval_parameters } >

The pipelines this retriever uses.

description: string | null

A description of the retriever tool.

maxLength15000
name: string | null

A name for the retriever tool. Will default to the pipeline name if not provided.

maxLength3000
minLength1
pipeline_id: string

The ID of the pipeline this tool uses.

formatuuid
preset_retrieval_parameters?: PresetRetrievalParams { alpha, class_name, dense_similarity_cutoff, 11 more }

Parameters for retrieval configuration.

alpha?: number | null

Alpha value for hybrid retrieval to determine the weights between dense and sparse retrieval. 0 is sparse retrieval and 1 is dense retrieval.

maximum1
minimum0
class_name?: string
dense_similarity_cutoff?: number | null

Minimum similarity score wrt query for retrieval

maximum1
minimum0
dense_similarity_top_k?: number | null

Number of nodes for dense retrieval.

maximum100
minimum1
enable_reranking?: boolean | null

Enable reranking for retrieval

files_top_k?: number | null

Number of files to retrieve (only for retrieval mode files_via_metadata and files_via_content).

maximum5
minimum1
rerank_top_n?: number | null

Number of reranked nodes for returning.

maximum100
minimum1
retrieval_mode?: RetrievalMode

The retrieval mode for the query.

Accepts one of the following:
"chunks"
"files_via_metadata"
"files_via_content"
"auto_routed"
Deprecatedretrieve_image_nodes?: boolean

Whether to retrieve image nodes.

retrieve_page_figure_nodes?: boolean

Whether to retrieve page figure nodes.

retrieve_page_screenshot_nodes?: boolean

Whether to retrieve page screenshot nodes.

search_filters?: MetadataFilters { filters, condition } | null

Metadata filters for vector stores.

filters: Array<MetadataFilter { key, value, operator } | MetadataFilters { filters, condition } >
Accepts one of the following:
MetadataFilter { key, value, operator }

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: string
value: number | string | Array<string> | 2 more | null
Accepts one of the following:
number
string
Array<string>
Array<number>
Array<number>
operator?: "==" | ">" | "<" | 11 more

Vector store filter operator.

Accepts one of the following:
"=="
">"
"<"
"!="
">="
"<="
"in"
"nin"
"any"
"all"
"text_match"
"text_match_insensitive"
"contains"
"is_empty"
MetadataFilters { filters, condition }

Metadata filters for vector stores.

filters: Array<MetadataFilter { key, value, operator } | MetadataFilters { filters, condition } >
Accepts one of the following:
MetadataFilter { key, value, operator }

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: string
value: number | string | Array<string> | 2 more | null
Accepts one of the following:
number
string
Array<string>
Array<number>
Array<number>
operator?: "==" | ">" | "<" | 11 more

Vector store filter operator.

Accepts one of the following:
"=="
">"
"<"
"!="
">="
"<="
"in"
"nin"
"any"
"all"
"text_match"
"text_match_insensitive"
"contains"
"is_empty"
MetadataFilters { filters, condition }
condition?: "and" | "or" | "not" | null

Vector store filter conditions to combine different filters.

Accepts one of the following:
"and"
"or"
"not"
condition?: "and" | "or" | "not" | null

Vector store filter conditions to combine different filters.

Accepts one of the following:
"and"
"or"
"not"
search_filters_inference_schema?: Record<string, Record<string, unknown> | Array<unknown> | string | 2 more | null> | null

JSON Schema that will be used to infer search_filters. Omit or leave as null to skip inference.

Accepts one of the following:
Record<string, unknown>
Array<unknown>
string
number
boolean
sparse_similarity_top_k?: number | null

Number of nodes for sparse retrieval.

maximum100
minimum1
updated_at?: string | null

Update datetime

formatdate-time
RetrieverCreate { name, pipelines }
name: string

A name for the retriever tool. Will default to the pipeline name if not provided.

maxLength3000
minLength1
pipelines?: Array<RetrieverPipeline { description, name, pipeline_id, preset_retrieval_parameters } >

The pipelines this retriever uses.

description: string | null

A description of the retriever tool.

maxLength15000
name: string | null

A name for the retriever tool. Will default to the pipeline name if not provided.

maxLength3000
minLength1
pipeline_id: string

The ID of the pipeline this tool uses.

formatuuid
preset_retrieval_parameters?: PresetRetrievalParams { alpha, class_name, dense_similarity_cutoff, 11 more }

Parameters for retrieval configuration.

alpha?: number | null

Alpha value for hybrid retrieval to determine the weights between dense and sparse retrieval. 0 is sparse retrieval and 1 is dense retrieval.

maximum1
minimum0
class_name?: string
dense_similarity_cutoff?: number | null

Minimum similarity score wrt query for retrieval

maximum1
minimum0
dense_similarity_top_k?: number | null

Number of nodes for dense retrieval.

maximum100
minimum1
enable_reranking?: boolean | null

Enable reranking for retrieval

files_top_k?: number | null

Number of files to retrieve (only for retrieval mode files_via_metadata and files_via_content).

maximum5
minimum1
rerank_top_n?: number | null

Number of reranked nodes for returning.

maximum100
minimum1
retrieval_mode?: RetrievalMode

The retrieval mode for the query.

Accepts one of the following:
"chunks"
"files_via_metadata"
"files_via_content"
"auto_routed"
Deprecatedretrieve_image_nodes?: boolean

Whether to retrieve image nodes.

retrieve_page_figure_nodes?: boolean

Whether to retrieve page figure nodes.

retrieve_page_screenshot_nodes?: boolean

Whether to retrieve page screenshot nodes.

search_filters?: MetadataFilters { filters, condition } | null

Metadata filters for vector stores.

filters: Array<MetadataFilter { key, value, operator } | MetadataFilters { filters, condition } >
Accepts one of the following:
MetadataFilter { key, value, operator }

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: string
value: number | string | Array<string> | 2 more | null
Accepts one of the following:
number
string
Array<string>
Array<number>
Array<number>
operator?: "==" | ">" | "<" | 11 more

Vector store filter operator.

Accepts one of the following:
"=="
">"
"<"
"!="
">="
"<="
"in"
"nin"
"any"
"all"
"text_match"
"text_match_insensitive"
"contains"
"is_empty"
MetadataFilters { filters, condition }

Metadata filters for vector stores.

filters: Array<MetadataFilter { key, value, operator } | MetadataFilters { filters, condition } >
Accepts one of the following:
MetadataFilter { key, value, operator }

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: string
value: number | string | Array<string> | 2 more | null
Accepts one of the following:
number
string
Array<string>
Array<number>
Array<number>
operator?: "==" | ">" | "<" | 11 more

Vector store filter operator.

Accepts one of the following:
"=="
">"
"<"
"!="
">="
"<="
"in"
"nin"
"any"
"all"
"text_match"
"text_match_insensitive"
"contains"
"is_empty"
MetadataFilters { filters, condition }
condition?: "and" | "or" | "not" | null

Vector store filter conditions to combine different filters.

Accepts one of the following:
"and"
"or"
"not"
condition?: "and" | "or" | "not" | null

Vector store filter conditions to combine different filters.

Accepts one of the following:
"and"
"or"
"not"
search_filters_inference_schema?: Record<string, Record<string, unknown> | Array<unknown> | string | 2 more | null> | null

JSON Schema that will be used to infer search_filters. Omit or leave as null to skip inference.

Accepts one of the following:
Record<string, unknown>
Array<unknown>
string
number
boolean
sparse_similarity_top_k?: number | null

Number of nodes for sparse retrieval.

maximum100
minimum1
RetrieverPipeline { description, name, pipeline_id, preset_retrieval_parameters }
description: string | null

A description of the retriever tool.

maxLength15000
name: string | null

A name for the retriever tool. Will default to the pipeline name if not provided.

maxLength3000
minLength1
pipeline_id: string

The ID of the pipeline this tool uses.

formatuuid
preset_retrieval_parameters?: PresetRetrievalParams { alpha, class_name, dense_similarity_cutoff, 11 more }

Parameters for retrieval configuration.

alpha?: number | null

Alpha value for hybrid retrieval to determine the weights between dense and sparse retrieval. 0 is sparse retrieval and 1 is dense retrieval.

maximum1
minimum0
class_name?: string
dense_similarity_cutoff?: number | null

Minimum similarity score wrt query for retrieval

maximum1
minimum0
dense_similarity_top_k?: number | null

Number of nodes for dense retrieval.

maximum100
minimum1
enable_reranking?: boolean | null

Enable reranking for retrieval

files_top_k?: number | null

Number of files to retrieve (only for retrieval mode files_via_metadata and files_via_content).

maximum5
minimum1
rerank_top_n?: number | null

Number of reranked nodes for returning.

maximum100
minimum1
retrieval_mode?: RetrievalMode

The retrieval mode for the query.

Accepts one of the following:
"chunks"
"files_via_metadata"
"files_via_content"
"auto_routed"
Deprecatedretrieve_image_nodes?: boolean

Whether to retrieve image nodes.

retrieve_page_figure_nodes?: boolean

Whether to retrieve page figure nodes.

retrieve_page_screenshot_nodes?: boolean

Whether to retrieve page screenshot nodes.

search_filters?: MetadataFilters { filters, condition } | null

Metadata filters for vector stores.

filters: Array<MetadataFilter { key, value, operator } | MetadataFilters { filters, condition } >
Accepts one of the following:
MetadataFilter { key, value, operator }

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: string
value: number | string | Array<string> | 2 more | null
Accepts one of the following:
number
string
Array<string>
Array<number>
Array<number>
operator?: "==" | ">" | "<" | 11 more

Vector store filter operator.

Accepts one of the following:
"=="
">"
"<"
"!="
">="
"<="
"in"
"nin"
"any"
"all"
"text_match"
"text_match_insensitive"
"contains"
"is_empty"
MetadataFilters { filters, condition }

Metadata filters for vector stores.

filters: Array<MetadataFilter { key, value, operator } | MetadataFilters { filters, condition } >
Accepts one of the following:
MetadataFilter { key, value, operator }

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: string
value: number | string | Array<string> | 2 more | null
Accepts one of the following:
number
string
Array<string>
Array<number>
Array<number>
operator?: "==" | ">" | "<" | 11 more

Vector store filter operator.

Accepts one of the following:
"=="
">"
"<"
"!="
">="
"<="
"in"
"nin"
"any"
"all"
"text_match"
"text_match_insensitive"
"contains"
"is_empty"
MetadataFilters { filters, condition }
condition?: "and" | "or" | "not" | null

Vector store filter conditions to combine different filters.

Accepts one of the following:
"and"
"or"
"not"
condition?: "and" | "or" | "not" | null

Vector store filter conditions to combine different filters.

Accepts one of the following:
"and"
"or"
"not"
search_filters_inference_schema?: Record<string, Record<string, unknown> | Array<unknown> | string | 2 more | null> | null

JSON Schema that will be used to infer search_filters. Omit or leave as null to skip inference.

Accepts one of the following:
Record<string, unknown>
Array<unknown>
string
number
boolean
sparse_similarity_top_k?: number | null

Number of nodes for sparse retrieval.

maximum100
minimum1

RetrieversRetriever

Retrieve
client.retrievers.retriever.search(stringretrieverID, RetrieverSearchParams { query, organization_id, project_id, 3 more } params, RequestOptionsoptions?): CompositeRetrievalResult { image_nodes, nodes, page_figure_nodes }
POST/api/v1/retrievers/{retriever_id}/retrieve