Learn how to customize SentenceTransformersDiversityRanker.
YAML Init Parameters
These are the parameters you can pass to this component in the pipeline YAML configuration:
Parameter | Type | Possible values | Description |
---|---|---|---|
| String | Default: | Local path or name of the model in Hugging Face. |
| Integer | Default: | The maximum number of documents to return per query. |
| ComponentDevice | Default: | The device on which the model is loaded. If |
| Secret | Default: | The API token used to download private models from Hugging Face. Optional. |
| Literal |
| Similarity metric for comparing embeddings. |
| String | Default: | A string to add to the beginning of the query text before ranking. Can be used to prepend the text with an instruction, as required by some embedding models. |
| String | Default: | A string to add to the end of the query text before ranking. Required. |
| String | Default: | A string to add to the beginning of each document text before ranking. Can be used to prepend the text with an instruction, as required by some embedding models. |
| String | Default: | A string to add to the end of each document text before ranking. |
| List of strings | Default: | List of metadata fields that should be embedded along with the document content. Optional. |
| String | Default: | Separator used to concatenate the meta fields to the Document content. |
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.