DocumentJoiner Parameters

Learn how to customize DocumentJoiner in your pipelines.

YAML Init Parameters

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

ParameterTypePossible valuesDescription
join_modeStringconcatenate
merge, reciprocal_rank_fusion
Default: concatenate
Specifies the join mode to use. Possible options are:

- concatenate: Combines document lists from multiple components, discarding duplicates. Documents keep their scores from the last component in the pipeline that assigns scores. This mode does not affect document scores.
- merge: Merges the scores of duplicate documents from multiple components. You can assign a weight to the scores to influence how they are merged and set a top_k limit to specify how many documents you want DocumentJoiner to return.
- reciprocal_rank_fusion: Combines documents into a single list based on their rankings from multiple components. It then calculates a new score based on the ranks in the input lists. If the same document appears in multiple lists, it gets a higher score.
- distribution_based_rank_fusion: Merges documents and assigns scores based on the distribution of scores in each retriever. It's a ranking methodology that enhances the typical reciprocal rank fusion method. It statistically normalizes the scores of retrieved items based on the distribution of scores across different query results, adjusting for mean and variance, which improves relevance and accuracy by considering the variability and scale of scores​
Required.
weightsList of floatsDefault: NoneWeight for each list of documents received, must have the same length as the number of inputs. Ignored if join_mode is concatenate.
Optional.
top_kIntegerDefault: NoneThe maximum number of documents to return.
Optional.
sort_by_scoreBooleanTrue, False
Default: True
If True, sorts the documents by the score in descending order. If a document has no score, it is handled as if its score is -infinity.
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.