mirror of
https://github.com/deepset-ai/haystack.git
synced 2026-01-11 06:36:27 +00:00
* fix all eof * fix test * fix test * fix test * typo * fix sample * fix sample * add logs * fix page_dynamic_result.txt
1.8 KiB
1.8 KiB
Module docs2answers
Docs2Answers
class Docs2Answers(BaseComponent)
This Node is used to convert retrieved documents into predicted answers format. It is useful for situations where you are calling a Retriever only pipeline via REST API. This ensures that your output is in a compatible format.
Module join_docs
JoinDocuments
class JoinDocuments(BaseComponent)
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.
- merge: merge scores of documents from multiple nodes. Optionally, each input score can be given a different
weight& atop_klimit 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.
__init__
def __init__(join_mode: str = "concatenate", weights: Optional[List[float]] = None, top_k_join: Optional[int] = None)
Arguments:
join_mode:concatenateto combine documents from multiple retrieversmergeto aggregate scores of individual documents,reciprocal_rank_fusionto apply rank based scoring.weights: A node-wise list(length of list must be equal to the number of input nodes) of weights for adjusting document scores when using themergejoin_mode. By default, equal weight is given to each retriever score. This param is not compatible with theconcatenatejoin_mode.top_k_join: Limit documents to top_k based on the resulting scores of the join.