Configuration for RAG pipeline.
Uses immutable copy pattern for fluent configuration. All settings have sensible defaults for quick start.
Attributes
- Example
-
// Minimal configuration val config = RAGConfig() .withEmbeddings(EmbeddingProvider.OpenAI) // Full customization with SQLite val config = RAGConfig() .withEmbeddings(EmbeddingProvider.OpenAI, "text-embedding-3-large") .withChunking(ChunkerFactory.Strategy.Sentence, 800, 150) .withRRF(60) .withSQLite("./rag.db") .withLLM(llmClient) // Using PostgreSQL with pgvector val config = RAGConfig() .withEmbeddings(EmbeddingProvider.OpenAI) .withPgVector("jdbc:postgresql://localhost:5432/mydb", "user", "pass", "embeddings") - Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Set whether to stop on first loading error.
Set whether to stop on first loading error.
Attributes
Use keyword search only (no vector)
Use keyword search only (no vector)
Attributes
Use vector search only (no keyword)
Use vector search only (no keyword)
Attributes
Set batch size for embedding operations.
Set batch size for embedding operations.
Attributes
Configure chunking strategy
Configure chunking strategy
Attributes
Configure chunking strategy with custom config
Configure chunking strategy with custom config
Attributes
Configure chunking with size and overlap
Configure chunking with size and overlap
Attributes
Use Cohere cross-encoder reranking
Use Cohere cross-encoder reranking
Attributes
Add a document loader for build-time ingestion.
Add a document loader for build-time ingestion.
Documents will be ingested when RAG.build() is called.
Attributes
Add documents from a directory path.
Add documents from a directory path.
Attributes
Add multiple document loaders.
Add multiple document loaders.
Attributes
Override embedding dimensions (auto-detected by default)
Override embedding dimensions (auto-detected by default)
Attributes
Configure embedding provider
Configure embedding provider
Attributes
Configure embedding provider and model
Configure embedding provider and model
Attributes
Configure embedding provider, model, and dimensions
Configure embedding provider, model, and dimensions
Attributes
Configure fusion strategy
Configure fusion strategy
Attributes
Configure LLM client for answer generation
Configure LLM client for answer generation
Attributes
Use LLM-based reranking
Use LLM-based reranking
Attributes
Configure document loading behavior.
Configure document loading behavior.
Attributes
Set parallelism for document processing.
Set parallelism for document processing.
Attributes
Use PostgreSQL with pgvector extension for vector storage.
Use PostgreSQL with pgvector extension for vector storage.
Connects to localhost:5432/postgres with user "postgres" by default. Uses "vectors" as the default table name.
Attributes
Use PostgreSQL with pgvector extension for vector storage.
Use PostgreSQL with pgvector extension for vector storage.
Connects to localhost:5432/postgres with user "postgres" by default.
Value parameters
- tableName
-
Table name for vectors
Attributes
Use PostgreSQL with pgvector extension for vector storage.
Use PostgreSQL with pgvector extension for vector storage.
Value parameters
- connectionString
-
JDBC connection string (e.g., "jdbc:postgresql://host:port/database")
- password
-
Database password
- tableName
-
Table name for vectors
- user
-
Database user
Attributes
Use RRF fusion with custom k parameter
Use RRF fusion with custom k parameter
Attributes
Configure number of candidates to rerank
Configure number of candidates to rerank
Attributes
Configure reranking strategy
Configure reranking strategy
Attributes
Use SQLite for persistent storage
Use SQLite for persistent storage
Attributes
Configure system prompt for answer generation
Configure system prompt for answer generation
Attributes
Configure number of results to return
Configure number of results to return
Attributes
Enable tracing for cost tracking and observability
Enable tracing for cost tracking and observability
Attributes
Use weighted score fusion
Use weighted score fusion
Attributes
Inherited methods
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product