Interface DocumentCompressor

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

public interface DocumentCompressor extends BiFunction<Query,List<Document>,List<Document>>
A component for compressing the content of each document to reduce noise and redundancy in the retrieved information, addressing challenges such as "lost-in-the-middle" and context length restrictions from the model.

Unlike DocumentSelector, this component does not remove entire documents from the list, but rather alters the content of the documents. Unlike DocumentRanker, this component does not change the order/score of the documents in the list.