Interface ContentAggregator
- All Known Implementing Classes:
DefaultContentAggregator,ReRankingContentAggregator
public interface ContentAggregator
Aggregates all
The goal is to ensure that only the most relevant and non-redundant
Some effective approaches include:
Contents retrieved from all ContentRetrievers using all Querys.
The goal is to ensure that only the most relevant and non-redundant
Contents are presented to the LLM.
Some effective approaches include:
- Re-ranking (seeReRankingContentAggregator) - Reciprocal Rank Fusion (seeReciprocalRankFuser, utilized in bothDefaultContentAggregatorandReRankingContentAggregator)
- See Also:
-
Method Summary
-
Method Details
-
aggregate
Aggregates allContents retrieved by allContentRetrievers using allQuerys. TheContents, both on input and output, are sorted by relevance, with the most relevantContents appearing at the beginning ofList<Content>.- Parameters:
queryToContents- A map from aQueryto allList<Content>retrieved with thatQuery. Given that eachQuerycan be routed to multipleContentRetrievers, the value of this map is aCollection<List<Content>>rather than a simpleList<Content>.- Returns:
- A list of aggregated
Contents.
-