Interface DocumentCompressor
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.
-
Method Summary
Methods inherited from interface java.util.function.BiFunction
andThen
-
Method Details
-
compress
Compresses the content of each document.- Parameters:
query- the query to compress documents fordocuments- the list of documents whose content should be compressed- Returns:
- a list of documents with compressed content
-
apply
-