mirror of
				https://github.com/deepset-ai/haystack.git
				synced 2025-11-04 03:39:31 +00:00 
			
		
		
		
	Documenting output score of JoinDocuments when using concatenation (#2561)
* add documentation regarding the score of JoinDocuments when using concatenation * Update Documentation & Code Style Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									a2a99f79b1
								
							
						
					
					
						commit
						686e9d24ef
					
				@ -30,6 +30,7 @@ A node to join documents outputted by multiple retriever nodes.
 | 
			
		||||
 | 
			
		||||
The node allows multiple join modes:
 | 
			
		||||
* concatenate: combine the documents from multiple nodes. Any duplicate documents are discarded.
 | 
			
		||||
               The score is only determined by the last node that outputs the document.
 | 
			
		||||
* merge: merge scores of documents from multiple nodes. Optionally, each input score can be given a different
 | 
			
		||||
         `weight` & a `top_k` limit can be set. This mode can also be used for "reranking" retrieved documents.
 | 
			
		||||
* reciprocal_rank_fusion: combines the documents based on their rank in multiple nodes.
 | 
			
		||||
 | 
			
		||||
@ -289,7 +289,7 @@ More info on this metric can be found in our [paper](https://arxiv.org/abs/2108.
 | 
			
		||||
 | 
			
		||||
```python
 | 
			
		||||
advanced_eval_result = pipeline.eval(
 | 
			
		||||
    labels=eval_labels, params={"Retriever": {"top_k": 1}}, sas_model_name_or_path="cross-encoder/stsb-roberta-large"
 | 
			
		||||
    labels=eval_labels, params={"Retriever": {"top_k": 5}}, sas_model_name_or_path="cross-encoder/stsb-roberta-large"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
metrics = advanced_eval_result.calculate_metrics()
 | 
			
		||||
 | 
			
		||||
@ -12,6 +12,7 @@ class JoinDocuments(BaseComponent):
 | 
			
		||||
 | 
			
		||||
    The node allows multiple join modes:
 | 
			
		||||
    * concatenate: combine the documents from multiple nodes. Any duplicate documents are discarded.
 | 
			
		||||
                   The score is only determined by the last node that outputs the document.
 | 
			
		||||
    * merge: merge scores of documents from multiple nodes. Optionally, each input score can be given a different
 | 
			
		||||
             `weight` & a `top_k` limit can be set. This mode can also be used for "reranking" retrieved documents.
 | 
			
		||||
    * reciprocal_rank_fusion: combines the documents based on their rank in multiple nodes.
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user