RAGConfigurationBuilder<T>
Helpers & Utilities · AiDotNet.RetrievalAugmentedGeneration.Configuration
Builder for constructing RAG configuration.
Constructors
| Constructor | Summary |
|---|---|
RAGConfigurationBuilder() |
Initializes a new instance of the RAGConfigurationBuilder class. |
Methods
| Method | Summary |
|---|---|
RAGConfiguration<T> Build() |
Builds the RAG configuration. |
RAGConfigurationBuilder<T> WithChunking(string strategy, int chunkSize, int chunkOverlap) |
Configures the chunking strategy. |
RAGConfigurationBuilder<T> WithContextCompression(string strategy, double compressionRatio, int maxLength) |
Configures context compression. |
RAGConfigurationBuilder<T> WithDocumentStore(string type, Dictionary<string, object> parameters) |
Configures the document store. |
RAGConfigurationBuilder<T> WithEmbedding(string modelType, string modelPath, string apiKey, int embeddingDimension) |
Configures the embedding model. |
RAGConfigurationBuilder<T> WithQueryExpansion(string strategy, int numExpansions) |
Configures query expansion. |
RAGConfigurationBuilder<T> WithReranking(string strategy, int topK) |
Configures the reranking strategy. |
RAGConfigurationBuilder<T> WithRetrieval(string strategy, int topK) |
Configures the retrieval strategy. |