Package | Description |
---|---|
dev.langchain4j.rag.content | |
dev.langchain4j.rag.content.aggregator | |
dev.langchain4j.rag.content.injector | |
dev.langchain4j.rag.content.retriever |
Modifier and Type | Method and Description |
---|---|
static Content |
Content.from(String text) |
static Content |
Content.from(TextSegment textSegment) |
Modifier and Type | Field and Description |
---|---|
static Function<Map<Query,Collection<List<Content>>>,Query> |
ReRankingContentAggregator.DEFAULT_QUERY_SELECTOR |
Modifier and Type | Method and Description |
---|---|
List<Content> |
ContentAggregator.aggregate(Map<Query,Collection<List<Content>>> queryToContents)
|
List<Content> |
DefaultContentAggregator.aggregate(Map<Query,Collection<List<Content>>> queryToContents) |
List<Content> |
ReRankingContentAggregator.aggregate(Map<Query,Collection<List<Content>>> queryToContents) |
static List<Content> |
ReciprocalRankFuser.fuse(Collection<List<Content>> listsOfContents)
Fuses multiple
List<Content> into a single List<Content>
using the Reciprocal Rank Fusion (RRF) algorithm with k=60. |
static List<Content> |
ReciprocalRankFuser.fuse(Collection<List<Content>> listsOfContents,
int k)
Fuses multiple
List<Content> into a single List<Content>
using the Reciprocal Rank Fusion (RRF) algorithm. |
protected Map<Query,List<Content>> |
DefaultContentAggregator.fuse(Map<Query,Collection<List<Content>>> queryToContents) |
protected Map<Query,List<Content>> |
ReRankingContentAggregator.fuse(Map<Query,Collection<List<Content>>> queryToContents) |
Modifier and Type | Method and Description |
---|---|
List<Content> |
ContentAggregator.aggregate(Map<Query,Collection<List<Content>>> queryToContents)
|
List<Content> |
DefaultContentAggregator.aggregate(Map<Query,Collection<List<Content>>> queryToContents) |
List<Content> |
ReRankingContentAggregator.aggregate(Map<Query,Collection<List<Content>>> queryToContents) |
static List<Content> |
ReciprocalRankFuser.fuse(Collection<List<Content>> listsOfContents)
Fuses multiple
List<Content> into a single List<Content>
using the Reciprocal Rank Fusion (RRF) algorithm with k=60. |
static List<Content> |
ReciprocalRankFuser.fuse(Collection<List<Content>> listsOfContents,
int k)
Fuses multiple
List<Content> into a single List<Content>
using the Reciprocal Rank Fusion (RRF) algorithm. |
protected Map<Query,List<Content>> |
DefaultContentAggregator.fuse(Map<Query,Collection<List<Content>>> queryToContents) |
protected Map<Query,List<Content>> |
ReRankingContentAggregator.fuse(Map<Query,Collection<List<Content>>> queryToContents) |
protected List<TextSegment> |
ReRankingContentAggregator.reRankAndFilter(List<Content> contents,
Query query) |
Constructor and Description |
---|
ReRankingContentAggregator(ScoringModel scoringModel,
Function<Map<Query,Collection<List<Content>>>,Query> querySelector,
Double minScore) |
Modifier and Type | Method and Description |
---|---|
protected String |
DefaultContentInjector.format(Content content) |
Modifier and Type | Method and Description |
---|---|
protected Prompt |
DefaultContentInjector.createPrompt(UserMessage userMessage,
List<Content> contents) |
protected String |
DefaultContentInjector.format(List<Content> contents) |
UserMessage |
ContentInjector.inject(List<Content> contents,
UserMessage userMessage)
Injects given
Content s into a given UserMessage . |
UserMessage |
DefaultContentInjector.inject(List<Content> contents,
UserMessage userMessage) |
Modifier and Type | Method and Description |
---|---|
List<Content> |
EmbeddingStoreContentRetriever.retrieve(Query query) |
List<Content> |
ContentRetriever.retrieve(Query query)
|
Copyright © 2024. All rights reserved.