Retrievers
List Retrievers
Get Retriever
Update Retriever
Direct Retrieve
ModelsExpand Collapse
Literal["routing", "full"]
Enum for the mode of composite retrieval.
class CompositeRetrievalResult: …
The image nodes retrieved by the pipeline for the given query. Deprecated - will soon be replaced with 'page_screenshot_nodes'.
node: Node
file_id: str
The ID of the file that the page screenshot was taken from
image_size: int
The size of the image in bytes
page_index: int
The index of the page for which the screenshot is taken (0-indexed)
metadata: Optional[Dict[str, object]]
Metadata for the screenshot
score: float
The score of the screenshot node
nodes: Optional[List[Node]]
The retrieved nodes from the composite retrieval.
node: NodeNode
id: str
The ID of the retrieved node.
end_char_idx: Optional[int]
The end character index of the retrieved node in the document
pipeline_id: str
The ID of the pipeline this node was retrieved from.
retriever_id: str
The ID of the retriever this node was retrieved from.
retriever_pipeline_name: str
The name of the retrieval pipeline this node was retrieved from.
start_char_idx: Optional[int]
The start character index of the retrieved node in the document
text: str
The text of the retrieved node.
metadata: Optional[Dict[str, object]]
Metadata associated with the retrieved node.
The page figure nodes retrieved by the pipeline for the given query.
node: Node
confidence: float
The confidence of the figure
figure_name: str
The name of the figure
figure_size: int
The size of the figure in bytes
file_id: str
The ID of the file that the figure was taken from
page_index: int
The index of the page for which the figure is taken (0-indexed)
is_likely_noise: Optional[bool]
Whether the figure is likely to be noise
metadata: Optional[Dict[str, object]]
Metadata for the figure
score: float
The score of the figure node
class ReRankConfig: …
top_n: Optional[int]
The number of nodes to retrieve after reranking over retrieved nodes from all retrieval tools.
type: Optional[Literal["system_default", "llm", "cohere", 3 more]]
The type of reranker to use.
class Retriever: …
An entity that retrieves context nodes from several sub RetrieverTools.
id: str
Unique identifier
name: str
A name for the retriever tool. Will default to the pipeline name if not provided.
project_id: str
The ID of the project this retriever resides in.
created_at: Optional[datetime]
Creation datetime
The pipelines this retriever uses.
description: Optional[str]
A description of the retriever tool.
name: Optional[str]
A name for the retriever tool. Will default to the pipeline name if not provided.
pipeline_id: str
The ID of the pipeline this tool uses.
preset_retrieval_parameters: Optional[PresetRetrievalParams]
Parameters for retrieval configuration.
alpha: Optional[float]
Alpha value for hybrid retrieval to determine the weights between dense and sparse retrieval. 0 is sparse retrieval and 1 is dense retrieval.
dense_similarity_cutoff: Optional[float]
Minimum similarity score wrt query for retrieval
dense_similarity_top_k: Optional[int]
Number of nodes for dense retrieval.
enable_reranking: Optional[bool]
Enable reranking for retrieval
files_top_k: Optional[int]
Number of files to retrieve (only for retrieval mode files_via_metadata and files_via_content).
rerank_top_n: Optional[int]
Number of reranked nodes for returning.
retrieval_mode: Optional[RetrievalMode]
The retrieval mode for the query.
Deprecatedretrieve_image_nodes: Optional[bool]
Whether to retrieve image nodes.
retrieve_page_figure_nodes: Optional[bool]
Whether to retrieve page figure nodes.
retrieve_page_screenshot_nodes: Optional[bool]
Whether to retrieve page screenshot nodes.
search_filters: Optional[MetadataFilters]
Metadata filters for vector stores.
filters: List[Filter]
class FilterMetadataFilter: …
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: Union[float, str, List[str], 3 more]
operator: Optional[Literal["==", ">", "<", 11 more]]
Vector store filter operator.
class MetadataFilters: …
Metadata filters for vector stores.
filters: List[Filter]
class FilterMetadataFilter: …
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: Union[float, str, List[str], 3 more]
operator: Optional[Literal["==", ">", "<", 11 more]]
Vector store filter operator.
condition: Optional[Literal["and", "or", "not"]]
Vector store filter conditions to combine different filters.
condition: Optional[Literal["and", "or", "not"]]
Vector store filter conditions to combine different filters.
search_filters_inference_schema: Optional[Dict[str, Union[Dict[str, object], List[object], str, 3 more]]]
JSON Schema that will be used to infer search_filters. Omit or leave as null to skip inference.
sparse_similarity_top_k: Optional[int]
Number of nodes for sparse retrieval.
updated_at: Optional[datetime]
Update datetime
class RetrieverCreate: …
name: str
A name for the retriever tool. Will default to the pipeline name if not provided.
The pipelines this retriever uses.
description: Optional[str]
A description of the retriever tool.
name: Optional[str]
A name for the retriever tool. Will default to the pipeline name if not provided.
pipeline_id: str
The ID of the pipeline this tool uses.
preset_retrieval_parameters: Optional[PresetRetrievalParams]
Parameters for retrieval configuration.
alpha: Optional[float]
Alpha value for hybrid retrieval to determine the weights between dense and sparse retrieval. 0 is sparse retrieval and 1 is dense retrieval.
dense_similarity_cutoff: Optional[float]
Minimum similarity score wrt query for retrieval
dense_similarity_top_k: Optional[int]
Number of nodes for dense retrieval.
enable_reranking: Optional[bool]
Enable reranking for retrieval
files_top_k: Optional[int]
Number of files to retrieve (only for retrieval mode files_via_metadata and files_via_content).
rerank_top_n: Optional[int]
Number of reranked nodes for returning.
retrieval_mode: Optional[RetrievalMode]
The retrieval mode for the query.
Deprecatedretrieve_image_nodes: Optional[bool]
Whether to retrieve image nodes.
retrieve_page_figure_nodes: Optional[bool]
Whether to retrieve page figure nodes.
retrieve_page_screenshot_nodes: Optional[bool]
Whether to retrieve page screenshot nodes.
search_filters: Optional[MetadataFilters]
Metadata filters for vector stores.
filters: List[Filter]
class FilterMetadataFilter: …
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: Union[float, str, List[str], 3 more]
operator: Optional[Literal["==", ">", "<", 11 more]]
Vector store filter operator.
class MetadataFilters: …
Metadata filters for vector stores.
filters: List[Filter]
class FilterMetadataFilter: …
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: Union[float, str, List[str], 3 more]
operator: Optional[Literal["==", ">", "<", 11 more]]
Vector store filter operator.
condition: Optional[Literal["and", "or", "not"]]
Vector store filter conditions to combine different filters.
condition: Optional[Literal["and", "or", "not"]]
Vector store filter conditions to combine different filters.
search_filters_inference_schema: Optional[Dict[str, Union[Dict[str, object], List[object], str, 3 more]]]
JSON Schema that will be used to infer search_filters. Omit or leave as null to skip inference.
sparse_similarity_top_k: Optional[int]
Number of nodes for sparse retrieval.
class RetrieverPipeline: …
description: Optional[str]
A description of the retriever tool.
name: Optional[str]
A name for the retriever tool. Will default to the pipeline name if not provided.
pipeline_id: str
The ID of the pipeline this tool uses.
preset_retrieval_parameters: Optional[PresetRetrievalParams]
Parameters for retrieval configuration.
alpha: Optional[float]
Alpha value for hybrid retrieval to determine the weights between dense and sparse retrieval. 0 is sparse retrieval and 1 is dense retrieval.
dense_similarity_cutoff: Optional[float]
Minimum similarity score wrt query for retrieval
dense_similarity_top_k: Optional[int]
Number of nodes for dense retrieval.
enable_reranking: Optional[bool]
Enable reranking for retrieval
files_top_k: Optional[int]
Number of files to retrieve (only for retrieval mode files_via_metadata and files_via_content).
rerank_top_n: Optional[int]
Number of reranked nodes for returning.
retrieval_mode: Optional[RetrievalMode]
The retrieval mode for the query.
Deprecatedretrieve_image_nodes: Optional[bool]
Whether to retrieve image nodes.
retrieve_page_figure_nodes: Optional[bool]
Whether to retrieve page figure nodes.
retrieve_page_screenshot_nodes: Optional[bool]
Whether to retrieve page screenshot nodes.
search_filters: Optional[MetadataFilters]
Metadata filters for vector stores.
filters: List[Filter]
class FilterMetadataFilter: …
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: Union[float, str, List[str], 3 more]
operator: Optional[Literal["==", ">", "<", 11 more]]
Vector store filter operator.
class MetadataFilters: …
Metadata filters for vector stores.
filters: List[Filter]
class FilterMetadataFilter: …
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: Union[float, str, List[str], 3 more]
operator: Optional[Literal["==", ">", "<", 11 more]]
Vector store filter operator.
condition: Optional[Literal["and", "or", "not"]]
Vector store filter conditions to combine different filters.
condition: Optional[Literal["and", "or", "not"]]
Vector store filter conditions to combine different filters.
search_filters_inference_schema: Optional[Dict[str, Union[Dict[str, object], List[object], str, 3 more]]]
JSON Schema that will be used to infer search_filters. Omit or leave as null to skip inference.
sparse_similarity_top_k: Optional[int]
Number of nodes for sparse retrieval.