Skip to main content

RAGConfig

Defined in the models module.
Configuration for RAG pipeline. Attributes: top_k: Number of chunks to retrieve min_score: Minimum relevance score threshold max_context_tokens: Maximum tokens for context include_citations: Whether to include citations in result retrieval_strategy: Strategy for retrieval (basic, fusion, hybrid) rerank: Whether to rerank results rerank_top_k: Number of results after reranking template: Prompt template with {context} and {question} placeholders system_prompt: Optional system prompt for LLM stream: Whether to stream responses

Properties

top_k
int
No description available.
min_score
float
No description available.
max_context_tokens
int
No description available.
include_citations
bool
No description available.
retrieval_strategy
RetrievalStrategy
No description available.
rerank
bool
No description available.
rerank_top_k
int
No description available.
model
Optional
No description available.
template
str
No description available.
system_prompt
Optional
No description available.
stream
bool
No description available.
  • from_dict: Create from dictionary.
  • to_dict: Convert to dictionary.