Class EmbeddingStoreContentRetriever

java.lang.Object
dev.langchain4j.rag.content.retriever.EmbeddingStoreContentRetriever
All Implemented Interfaces:
ContentRetriever

public class EmbeddingStoreContentRetriever extends Object implements ContentRetriever
A ContentRetriever that retrieves from an EmbeddingStore.
By default, it retrieves the 3 most similar Contents to the provided Query, without any Filtering.

Configurable parameters (optional):
- displayName: Display name for logging purposes, e.g. when multiple instances are used.
- maxResults: The maximum number of Contents to retrieve.
- dynamicMaxResults: It is a Function that accepts a Query and returns a maxResults value. It can be used to dynamically define maxResults value, depending on factors such as the query, the user (using Metadata#chatMemoryId()} from Query.metadata()), etc.
- minScore: The minimum relevance score for the returned Contents. Contents scoring below #minScore are excluded from the results.
- dynamicMinScore: It is a Function that accepts a Query and returns a minScore value. It can be used to dynamically define minScore value, depending on factors such as the query, the user (using Metadata#chatMemoryId()} from Query.metadata()), etc.
- filter: The Filter that will be applied to a Metadata in the Content.textSegment().
- dynamicFilter: It is a Function that accepts a Query and returns a filter value. It can be used to dynamically define filter value, depending on factors such as the query, the user (using Metadata#chatMemoryId()} from Query.metadata()), etc.