Skip to main content

RAGConfig

Defined in the models module.
AI Agent 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

int
No description available.
float
No description available.
int
No description available.
bool
No description available.
RetrievalStrategy
No description available.
bool
No description available.
int
No description available.
Optional[str]
No description available.
str
No description available.
Optional[str]
No description available.
bool
No description available.
  • from_dict: Create from dictionary.
  • to_dict: Convert to dictionary.

Source

View on GitHub

praisonaiagents/rag/models.py at line 188

RAG Concept

RAG Overview

Chunking Strategies

Configuration Overview

Agent Config