Learn how to customize TransformersSimiliartyRanker.
YAML Init Parameters
These are the parameters you can pass to this component in the pipeline YAML configuration:
Parameter | Type | Possible values | Description |
---|---|---|---|
| Union of string and path | Default: | The name or path of a pre-trained cross-encoder model from Hugging Face. |
| ComponentDevice | Default: | The device on which the model is loaded. If |
| Secret | Default: | The API token used to download private models from Hugging Face. |
| Int | Default: | The maximum number of Documents to return per query. Required. |
| 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 reranking models, such as bge. |
| 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, such as bge. |
| List of strings | Default: | List of metadata fields that should be embedded along with the document content. |
| String | Default: | Separator used to concatenate the meta fields to the document content. |
| Bool |
| Whether the raw logit predictions should be scaled using a Sigmoid activation function. Set this to |
| Float | Default: | The factor used for calibrating probabilities calculated by |
| Float | Default: | If provided, only returns documents with a score above this threshold. |
| Dictionary of string and any | Default: | Additional keyword arguments passed to |
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.