Class RagAutoConfiguration

java.lang.Object
ai.yda.framework.rag.autoconfigure.RagAutoConfiguration

@AutoConfiguration public class RagAutoConfiguration extends Object
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:
  • DefaultRag
  • Retriever
  • Augmenter
  • Generator
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor for RagAutoConfiguration.
  • Method Summary

    Modifier and Type
    Method
    Description
    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 a DefaultRag bean, which is configured with the provided lists of Retriever and Augmenter, along with the Generator used to generate Responses.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • 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 a DefaultRag bean, which is configured with the provided lists of Retriever and Augmenter, along with the Generator used to generate Responses.
      Parameters:
      retrievers - the list of Retriever beans used for retrieving Context based on the Request.
      augmenters - the list of Augmenter beans used for enhancing the retrieved Context.
      generator - the Generator bean used for generating Responses based on the augmented Context.
      Returns:
      a configured DefaultRag instance.