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 providedUserMessagewith retrieved content.
-
Method Details
-
augment
Augments the providedUserMessagewith retrieved content.- Parameters:
userMessage- TheUserMessageto be augmented.metadata- TheMetadatathat may be useful or necessary for retrieval and augmentation.- Returns:
- The augmented
UserMessage.
-