RAGConfiguration class
Configuration for the RAG pipeline.
Specifies model paths, chunking parameters, and generation settings.
Mirrors iOS RAGConfiguration exactly.
Constructors
- RAGConfiguration({required String embeddingModelPath, required String llmModelPath, int embeddingDimension = 384, int topK = 3, double similarityThreshold = 0.3, int maxContextTokens = 2048, int chunkSize = 512, int chunkOverlap = 50, String? promptTemplate, String? embeddingConfigJSON, String? llmConfigJSON})
-
const
Properties
- chunkOverlap → int
-
Overlap between consecutive chunks in tokens (default: 50).
final
- chunkSize → int
-
Document chunk size in tokens (default: 512).
final
- embeddingConfigJSON → String?
-
Optional JSON configuration for the embedding model.
final
- embeddingDimension → int
-
Embedding vector dimension (default: 384).
final
- embeddingModelPath → String
-
Path to the ONNX embedding model file (required).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- llmConfigJSON → String?
-
Optional JSON configuration for the LLM.
final
- llmModelPath → String
-
Path to the GGUF LLM model file (required).
final
- maxContextTokens → int
-
Maximum context tokens to send to the LLM (default: 2048).
final
- promptTemplate → String?
-
Optional custom prompt template for the LLM.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- similarityThreshold → double
-
Minimum cosine similarity threshold for retrieval (default: 0.3).
final
- topK → int
-
Number of top chunks to retrieve (default: 3).
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited