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:
Content
s retrieved from all ContentRetriever
s using all Query
s.
The goal is to ensure that only the most relevant and non-redundant
Content
s are presented to the LLM.
Some effective approaches include:
- Re-ranking (seeReRankingContentAggregator
) - Reciprocal Rank Fusion (seeReciprocalRankFuser
, utilized in bothDefaultContentAggregator
andReRankingContentAggregator
)
- See Also:
-
Method Summary
-
Method Details
-
aggregate
Aggregates allContent
s retrieved by allContentRetriever
s using allQuery
s. TheContent
s, both on input and output, are sorted by relevance, with the most relevantContent
s appearing at the beginning ofList<Content>
.- Parameters:
queryToContents
- A map from aQuery
to allList<Content>
retrieved with thatQuery
. Given that eachQuery
can be routed to multipleContentRetriever
s, the value of this map is aCollection<List<Content>>
rather than a simpleList<Content>
.- Returns:
- A list of aggregated
Content
s.
-