Interface DocumentSelector
A component for removing irrelevant or redundant documents from a list of retrieved
documents, addressing challenges such as "lost-in-the-middle" and context length
restrictions from the model.
Unlike DocumentRanker, this component does not change the order/score of the
documents in the list, but rather removes irrelevant or redundant documents. Unlike
DocumentCompressor, this component does not alter the content of the documents,
but rather removes entire documents.
-
Method Summary
Methods inherited from interface java.util.function.BiFunction
andThen
-
Method Details
-
select
Removes irrelevant or redundant documents from a list of retrieved documents.- Parameters:
query- the query to select documents fordocuments- the list of documents to select from- Returns:
- a list of selected documents
-
apply
-