Interface ContentAggregator

All Known Implementing Classes:
DefaultContentAggregator, ReRankingContentAggregator

public interface ContentAggregator
Aggregates all 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 (see ReRankingContentAggregator)
 - Reciprocal Rank Fusion (see ReciprocalRankFuser, utilized in both DefaultContentAggregator and ReRankingContentAggregator)
See Also:
  • Method Details

    • aggregate

      List<Content> aggregate(Map<Query,Collection<List<Content>>> queryToContents)
      Aggregates all Contents retrieved by all ContentRetrievers using all Querys. The Contents, both on input and output, are sorted by relevance, with the most relevant Contents appearing at the beginning of List<Content>.
      queryToContents - A map from a Query to all List<Content> retrieved with that Query. Given that each Query can be routed to multiple ContentRetrievers, the value of this map is a Collection<List<Content>> rather than a simple List<Content>.
      A list of aggregated Contents.