Interface DocumentRanker
A component for ordering and ranking documents based on their relevance to a query to
bring the most relevant documents to the top of the list, addressing challenges such as
"lost-in-the-middle".
Unlike DocumentSelector
, this component does not remove entire documents from
the list, but rather changes the order/score of the documents in the list. Unlike
DocumentCompressor
, this component does not alter the content of the documents.
-
Method Summary
Methods inherited from interface java.util.function.BiFunction
andThen
-
Method Details
-
rank
Ranks documents based on their relevance to the given query.- Parameters:
query
- the query to rank documents fordocuments
- the list of documents to rank- Returns:
- a list of ordered documents based on a ranking algorithm
-
apply
-