## Create Retriever `Retriever retrievers().create(RetrieverCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())` **post** `/api/v1/retrievers` Create a new Retriever. ### Parameters - `RetrieverCreateParams params` - `Optional organizationId` - `Optional projectId` - `RetrieverCreate retrieverCreate` ### Returns - `class Retriever:` An entity that retrieves context nodes from several sub RetrieverTools. - `String id` Unique identifier - `String name` A name for the retriever tool. Will default to the pipeline name if not provided. - `String projectId` The ID of the project this retriever resides in. - `Optional createdAt` Creation datetime - `Optional> pipelines` The pipelines this retriever uses. - `Optional description` A description of the retriever tool. - `Optional name` A name for the retriever tool. Will default to the pipeline name if not provided. - `String pipelineId` The ID of the pipeline this tool uses. - `Optional presetRetrievalParameters` Parameters for retrieval configuration. - `Optional alpha` Alpha value for hybrid retrieval to determine the weights between dense and sparse retrieval. 0 is sparse retrieval and 1 is dense retrieval. - `Optional className` - `Optional denseSimilarityCutoff` Minimum similarity score wrt query for retrieval - `Optional denseSimilarityTopK` Number of nodes for dense retrieval. - `Optional enableReranking` Enable reranking for retrieval - `Optional filesTopK` Number of files to retrieve (only for retrieval mode files_via_metadata and files_via_content). - `Optional rerankTopN` Number of reranked nodes for returning. - `Optional retrievalMode` The retrieval mode for the query. - `CHUNKS("chunks")` - `FILES_VIA_METADATA("files_via_metadata")` - `FILES_VIA_CONTENT("files_via_content")` - `AUTO_ROUTED("auto_routed")` - `Optional retrieveImageNodes` Whether to retrieve image nodes. - `Optional retrievePageFigureNodes` Whether to retrieve page figure nodes. - `Optional retrievePageScreenshotNodes` Whether to retrieve page screenshot nodes. - `Optional searchFilters` Metadata filters for vector stores. - `List filters` - `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` - `double` - `String` - `List` - `List` - `List` - `Optional operator` Vector store filter operator. - `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")` - `class MetadataFilters:` Metadata filters for vector stores. - `Optional condition` Vector store filter conditions to combine different filters. - `AND("and")` - `OR("or")` - `NOT("not")` - `Optional searchFiltersInferenceSchema` JSON Schema that will be used to infer search_filters. Omit or leave as null to skip inference. - `class UnionMember0:` - `List` - `String` - `double` - `boolean` - `Optional sparseSimilarityTopK` Number of nodes for sparse retrieval. - `Optional updatedAt` Update datetime ### Example ```java package com.llamacloud_prod.api.example; import com.llamacloud_prod.api.client.LlamaCloudClient; import com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient; import com.llamacloud_prod.api.models.retrievers.Retriever; import com.llamacloud_prod.api.models.retrievers.RetrieverCreate; import com.llamacloud_prod.api.models.retrievers.RetrieverCreateParams; public final class Main { private Main() {} public static void main(String[] args) { LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv(); RetrieverCreate params = RetrieverCreate.builder() .name("x") .build(); Retriever retriever = client.retrievers().create(params); } } ``` #### Response ```json { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "name": "x", "project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "pipelines": [ { "description": "description", "name": "x", "pipeline_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "preset_retrieval_parameters": { "alpha": 0, "class_name": "class_name", "dense_similarity_cutoff": 0, "dense_similarity_top_k": 1, "enable_reranking": true, "files_top_k": 1, "rerank_top_n": 1, "retrieval_mode": "chunks", "retrieve_image_nodes": true, "retrieve_page_figure_nodes": true, "retrieve_page_screenshot_nodes": true, "search_filters": { "filters": [ { "key": "key", "value": 0, "operator": "==" } ], "condition": "and" }, "search_filters_inference_schema": { "foo": { "foo": "bar" } }, "sparse_similarity_top_k": 1 } } ], "updated_at": "2019-12-27T18:11:19.117Z" } ```