Interface DocumentSelector

All Superinterfaces:
BiFunction<Query,List<Document>,List<Document>>

@Deprecated public interface DocumentSelector extends BiFunction<Query,List<Document>,List<Document>>
Deprecated.
in favour of DocumentPostProcessor.
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

    Modifier and Type
    Method
    Description
    default List<Document>
    apply(Query query, List<Document> documents)
    Deprecated.
     
    select(Query query, List<Document> documents)
    Deprecated.
    Removes irrelevant or redundant documents from a list of retrieved documents.

    Methods inherited from interface java.util.function.BiFunction

    andThen