Skip to content
Framework Docs

Retrievers

Create Retriever
Retriever retrievers().create(RetrieverCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/api/v1/retrievers
Upsert Retriever
Retriever retrievers().upsert(RetrieverUpsertParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
PUT/api/v1/retrievers
List Retrievers
List<Retriever> retrievers().list(RetrieverListParamsparams = RetrieverListParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/api/v1/retrievers
Get Retriever
Retriever retrievers().get(RetrieverGetParamsparams = RetrieverGetParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
GET/api/v1/retrievers/{retriever_id}
Update Retriever
Retriever retrievers().update(RetrieverUpdateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
PUT/api/v1/retrievers/{retriever_id}
Delete Retriever
retrievers().delete(RetrieverDeleteParamsparams = RetrieverDeleteParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
DELETE/api/v1/retrievers/{retriever_id}
Direct Retrieve
CompositeRetrievalResult retrievers().search(RetrieverSearchParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/api/v1/retrievers/retrieve
ModelsExpand Collapse
enum CompositeRetrievalMode:

Enum for the mode of composite retrieval.

ROUTING("routing")
FULL("full")
class CompositeRetrievalResult:
DeprecatedOptional<List<PageScreenshotNodeWithScore>> imageNodes

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

Node node
String fileId

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

formatuuid
long imageSize

The size of the image in bytes

minimum0
long pageIndex

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

minimum0
Optional<Metadata> metadata

Metadata for the screenshot

double score

The score of the screenshot node

Optional<String> className
Optional<List<Node>> nodes

The retrieved nodes from the composite retrieval.

InnerNode node
String id

The ID of the retrieved node.

formatuuid
Optional<Long> endCharIdx

The end character index of the retrieved node in the document

String pipelineId

The ID of the pipeline this node was retrieved from.

formatuuid
String retrieverId

The ID of the retriever this node was retrieved from.

formatuuid
String retrieverPipelineName

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

Optional<Long> startCharIdx

The start character index of the retrieved node in the document

String text

The text of the retrieved node.

Optional<Metadata> metadata

Metadata associated with the retrieved node.

Optional<String> className
Optional<Double> score
Optional<List<PageFigureNodeWithScore>> pageFigureNodes

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

Node node
double confidence

The confidence of the figure

maximum1
minimum0
String figureName

The name of the figure

long figureSize

The size of the figure in bytes

minimum0
String fileId

The ID of the file that the figure was taken from

formatuuid
long pageIndex

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

minimum0
Optional<Boolean> isLikelyNoise

Whether the figure is likely to be noise

Optional<Metadata> metadata

Metadata for the figure

double score

The score of the figure node

Optional<String> className
class ReRankConfig:
Optional<Long> topN

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

minimum1
Optional<Type> type

The type of reranker to use.

One of the following:
SYSTEM_DEFAULT("system_default")
LLM("llm")
COHERE("cohere")
BEDROCK("bedrock")
SCORE("score")
DISABLED("disabled")
class Retriever:

An entity that retrieves context nodes from several sub RetrieverTools.

String id

Unique identifier

formatuuid
String name

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

maxLength3000
minLength1
String projectId

The ID of the project this retriever resides in.

formatuuid
Optional<LocalDateTime> createdAt

Creation datetime

formatdate-time
Optional<List<RetrieverPipeline>> pipelines

The pipelines this retriever uses.

Optional<String> description

A description of the retriever tool.

maxLength15000
Optional<String> name

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

maxLength3000
minLength1
String pipelineId

The ID of the pipeline this tool uses.

formatuuid
Optional<PresetRetrievalParams> presetRetrievalParameters

Parameters for retrieval configuration.

Optional<Double> alpha

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
Optional<String> className
Optional<Double> denseSimilarityCutoff

Minimum similarity score wrt query for retrieval

maximum1
minimum0
Optional<Long> denseSimilarityTopK

Number of nodes for dense retrieval.

maximum100
minimum1
Optional<Boolean> enableReranking

Enable reranking for retrieval

Optional<Long> filesTopK

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

maximum5
minimum1
Optional<Long> rerankTopN

Number of reranked nodes for returning.

maximum100
minimum1
Optional<RetrievalMode> retrievalMode

The retrieval mode for the query.

One of the following:
CHUNKS("chunks")
FILES_VIA_METADATA("files_via_metadata")
FILES_VIA_CONTENT("files_via_content")
AUTO_ROUTED("auto_routed")
DeprecatedOptional<Boolean> retrieveImageNodes

Whether to retrieve image nodes.

Optional<Boolean> retrievePageFigureNodes

Whether to retrieve page figure nodes.

Optional<Boolean> retrievePageScreenshotNodes

Whether to retrieve page screenshot nodes.

Optional<MetadataFilters> searchFilters

Metadata filters for vector stores.

List<Filter> filters
One of the following:
class MetadataFilter:

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

String key
Optional<Value> value
One of the following:
double
String
List<String>
List<double>
List<long>
Optional<Operator> operator

Vector store filter operator.

One of the following:
EQUALS("==")
GREATER(">")
LESS("<")
NOT_EQUALS("!=")
GREATER_OR_EQUALS(">=")
LESS_OR_EQUALS("<=")
IN("in")
NIN("nin")
ANY("any")
ALL("all")
TEXT_MATCH("text_match")
TEXT_MATCH_INSENSITIVE("text_match_insensitive")
CONTAINS("contains")
IS_EMPTY("is_empty")
MetadataFilters
Optional<Condition> condition

Vector store filter conditions to combine different filters.

One of the following:
AND("and")
OR("or")
NOT("not")
Optional<SearchFiltersInferenceSchema> searchFiltersInferenceSchema

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

One of the following:
class UnionMember0:
List<JsonValue>
String
double
boolean
Optional<Long> sparseSimilarityTopK

Number of nodes for sparse retrieval.

maximum100
minimum1
Optional<LocalDateTime> updatedAt

Update datetime

formatdate-time
class RetrieverCreate:
String name

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

maxLength3000
minLength1
Optional<List<RetrieverPipeline>> pipelines

The pipelines this retriever uses.

Optional<String> description

A description of the retriever tool.

maxLength15000
Optional<String> name

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

maxLength3000
minLength1
String pipelineId

The ID of the pipeline this tool uses.

formatuuid
Optional<PresetRetrievalParams> presetRetrievalParameters

Parameters for retrieval configuration.

Optional<Double> alpha

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
Optional<String> className
Optional<Double> denseSimilarityCutoff

Minimum similarity score wrt query for retrieval

maximum1
minimum0
Optional<Long> denseSimilarityTopK

Number of nodes for dense retrieval.

maximum100
minimum1
Optional<Boolean> enableReranking

Enable reranking for retrieval

Optional<Long> filesTopK

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

maximum5
minimum1
Optional<Long> rerankTopN

Number of reranked nodes for returning.

maximum100
minimum1
Optional<RetrievalMode> retrievalMode

The retrieval mode for the query.

One of the following:
CHUNKS("chunks")
FILES_VIA_METADATA("files_via_metadata")
FILES_VIA_CONTENT("files_via_content")
AUTO_ROUTED("auto_routed")
DeprecatedOptional<Boolean> retrieveImageNodes

Whether to retrieve image nodes.

Optional<Boolean> retrievePageFigureNodes

Whether to retrieve page figure nodes.

Optional<Boolean> retrievePageScreenshotNodes

Whether to retrieve page screenshot nodes.

Optional<MetadataFilters> searchFilters

Metadata filters for vector stores.

List<Filter> filters
One of the following:
class MetadataFilter:

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

String key
Optional<Value> value
One of the following:
double
String
List<String>
List<double>
List<long>
Optional<Operator> operator

Vector store filter operator.

One of the following:
EQUALS("==")
GREATER(">")
LESS("<")
NOT_EQUALS("!=")
GREATER_OR_EQUALS(">=")
LESS_OR_EQUALS("<=")
IN("in")
NIN("nin")
ANY("any")
ALL("all")
TEXT_MATCH("text_match")
TEXT_MATCH_INSENSITIVE("text_match_insensitive")
CONTAINS("contains")
IS_EMPTY("is_empty")
MetadataFilters
Optional<Condition> condition

Vector store filter conditions to combine different filters.

One of the following:
AND("and")
OR("or")
NOT("not")
Optional<SearchFiltersInferenceSchema> searchFiltersInferenceSchema

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

One of the following:
class UnionMember0:
List<JsonValue>
String
double
boolean
Optional<Long> sparseSimilarityTopK

Number of nodes for sparse retrieval.

maximum100
minimum1
class RetrieverPipeline:
Optional<String> description

A description of the retriever tool.

maxLength15000
Optional<String> name

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

maxLength3000
minLength1
String pipelineId

The ID of the pipeline this tool uses.

formatuuid
Optional<PresetRetrievalParams> presetRetrievalParameters

Parameters for retrieval configuration.

Optional<Double> alpha

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
Optional<String> className
Optional<Double> denseSimilarityCutoff

Minimum similarity score wrt query for retrieval

maximum1
minimum0
Optional<Long> denseSimilarityTopK

Number of nodes for dense retrieval.

maximum100
minimum1
Optional<Boolean> enableReranking

Enable reranking for retrieval

Optional<Long> filesTopK

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

maximum5
minimum1
Optional<Long> rerankTopN

Number of reranked nodes for returning.

maximum100
minimum1
Optional<RetrievalMode> retrievalMode

The retrieval mode for the query.

One of the following:
CHUNKS("chunks")
FILES_VIA_METADATA("files_via_metadata")
FILES_VIA_CONTENT("files_via_content")
AUTO_ROUTED("auto_routed")
DeprecatedOptional<Boolean> retrieveImageNodes

Whether to retrieve image nodes.

Optional<Boolean> retrievePageFigureNodes

Whether to retrieve page figure nodes.

Optional<Boolean> retrievePageScreenshotNodes

Whether to retrieve page screenshot nodes.

Optional<MetadataFilters> searchFilters

Metadata filters for vector stores.

List<Filter> filters
One of the following:
class MetadataFilter:

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

String key
Optional<Value> value
One of the following:
double
String
List<String>
List<double>
List<long>
Optional<Operator> operator

Vector store filter operator.

One of the following:
EQUALS("==")
GREATER(">")
LESS("<")
NOT_EQUALS("!=")
GREATER_OR_EQUALS(">=")
LESS_OR_EQUALS("<=")
IN("in")
NIN("nin")
ANY("any")
ALL("all")
TEXT_MATCH("text_match")
TEXT_MATCH_INSENSITIVE("text_match_insensitive")
CONTAINS("contains")
IS_EMPTY("is_empty")
MetadataFilters
Optional<Condition> condition

Vector store filter conditions to combine different filters.

One of the following:
AND("and")
OR("or")
NOT("not")
Optional<SearchFiltersInferenceSchema> searchFiltersInferenceSchema

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

One of the following:
class UnionMember0:
List<JsonValue>
String
double
boolean
Optional<Long> sparseSimilarityTopK

Number of nodes for sparse retrieval.

maximum100
minimum1

RetrieversRetriever

Retrieve
CompositeRetrievalResult retrievers().retriever().search(RetrieverSearchParamsparams, RequestOptionsrequestOptions = RequestOptions.none())
POST/api/v1/retrievers/{retriever_id}/retrieve