Class RagAutoConfiguration
java.lang.Object
ai.yda.framework.rag.autoconfigure.RagAutoConfiguration
Autoconfiguration class for setting up a
DefaultRag bean. This class provides the automatic configuration for
a DefaultRag instance, which is a key component in the Retrieval-Augmented Generation (RAG) framework. The
DefaultRag is configured with a list of Retrievers that fetch relevant Context, Augmenters that enhance
the Context, and a Generator that produces the final Response based on the augmented Context.- Since:
- 0.1.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionai.yda.framework.rag.core.DefaultRagdefaultRag(List<ai.yda.framework.rag.core.retriever.Retriever<ai.yda.framework.rag.core.model.RagRequest, ai.yda.framework.rag.core.model.RagContext>> retrievers, List<ai.yda.framework.rag.core.augmenter.Augmenter<ai.yda.framework.rag.core.model.RagRequest, ai.yda.framework.rag.core.model.RagContext>> augmenters, ai.yda.framework.rag.core.generator.Generator<ai.yda.framework.rag.core.model.RagRequest, ai.yda.framework.rag.core.model.RagResponse> generator) Defines aDefaultRagbean, which is configured with the provided lists ofRetrieverandAugmenter, along with theGeneratorused to generate Responses.
-
Constructor Details
-
RagAutoConfiguration
public RagAutoConfiguration()Default constructor forRagAutoConfiguration.
-
-
Method Details
-
defaultRag
@Bean public ai.yda.framework.rag.core.DefaultRag defaultRag(List<ai.yda.framework.rag.core.retriever.Retriever<ai.yda.framework.rag.core.model.RagRequest, ai.yda.framework.rag.core.model.RagContext>> retrievers, List<ai.yda.framework.rag.core.augmenter.Augmenter<ai.yda.framework.rag.core.model.RagRequest, ai.yda.framework.rag.core.model.RagContext>> augmenters, ai.yda.framework.rag.core.generator.Generator<ai.yda.framework.rag.core.model.RagRequest, ai.yda.framework.rag.core.model.RagResponse> generator) Defines aDefaultRagbean, which is configured with the provided lists ofRetrieverandAugmenter, along with theGeneratorused to generate Responses.- Parameters:
retrievers- the list ofRetrieverbeans used for retrieving Context based on the Request.augmenters- the list ofAugmenterbeans used for enhancing the retrieved Context.generator- theGeneratorbean used for generating Responses based on the augmented Context.- Returns:
- a configured
DefaultRaginstance.
-