Package dev.langchain4j.rag
Interface RetrievalAugmentor
- All Known Implementing Classes:
DefaultRetrievalAugmentor
public interface RetrievalAugmentor
Augments the provided
This serves as an entry point into the RAG flow in LangChain4j.
You are free to use the default implementation (
UserMessage
with retrieved content.
This serves as an entry point into the RAG flow in LangChain4j.
You are free to use the default implementation (
DefaultRetrievalAugmentor
) or to implement a custom one.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionaugment
(UserMessage userMessage, Metadata metadata) Augments the providedUserMessage
with retrieved content.
-
Method Details
-
augment
Augments the providedUserMessage
with retrieved content.- Parameters:
userMessage
- TheUserMessage
to be augmented.metadata
- TheMetadata
that may be useful or necessary for retrieval and augmentation.- Returns:
- The augmented
UserMessage
.
-