CohereRanker Parameters

Learn what parameters you can set for CohereRanker.

YAML Init Parameters

These are the parameters you can pass to this component in the pipeline YAML configuration:

ParameterTypePossible valuesDescription
modelStringDefault: rerank-english-v2.0Cohere model name. Check the list of supported models in the Cohere documentation.
Required.
top_kIntegerDefault: 10The maximum number of documents to return. Required.
api_keySecretDefault: {"type": "env_var", "env_vars": ["COHERE_API_KEY", "CO_API_KEY"], "strict": False}Cohere API key.
Required.
api_base_urlStringDefault: https://api.cohere.comThe base URL of the Cohere API. Required.
max_chunks_per_docIntegerDefault: NoneIf your document exceeds 512 tokens, this determines the maximum number of chunks a document can be split into. If None, the default of 10 is used. Check Cohere docs for more information.
Optional.
meta_fields_to_embedList of stringsDefault: NoneList of metadata fields to concatenate with the document content for reranking.
Optional.
meta_data_separatorStringDefault: \nSeparator used to concatenate the meta fields to the document content. Required.

REST API Runtime Parameters

There are no runtime parameters you can pass to this component when making a request to the Search REST API endpoint.