> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# RAG Config • AI Agent SDK

> RAGConfig: Configuration for RAG pipeline.

# RAGConfig

> Defined in the [**models**](../modules/models) module.

<Badge color="blue">AI Agent</Badge>

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

<ResponseField name="top_k" type="int">
  No description available.
</ResponseField>

<ResponseField name="min_score" type="float">
  No description available.
</ResponseField>

<ResponseField name="max_context_tokens" type="int">
  No description available.
</ResponseField>

<ResponseField name="include_citations" type="bool">
  No description available.
</ResponseField>

<ResponseField name="retrieval_strategy" type="RetrievalStrategy">
  No description available.
</ResponseField>

<ResponseField name="rerank" type="bool">
  No description available.
</ResponseField>

<ResponseField name="rerank_top_k" type="int">
  No description available.
</ResponseField>

<ResponseField name="model" type="Optional">
  No description available.
</ResponseField>

<ResponseField name="template" type="str">
  No description available.
</ResponseField>

<ResponseField name="system_prompt" type="Optional">
  No description available.
</ResponseField>

<ResponseField name="stream" type="bool">
  No description available.
</ResponseField>

<Accordion title="Internal & Generic Methods">
  * **from\_dict**: Create from dictionary.
  * **to\_dict**: Convert to dictionary.
</Accordion>

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/rag/models.py#L188">
  `praisonaiagents/rag/models.py` at line 188
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="RAG Concept" icon="magnifying-glass" href="/docs/concepts/rag" />

  <Card title="RAG Overview" icon="database" href="/docs/rag/overview" />

  <Card title="Chunking Strategies" icon="scissors" href="/docs/rag/strategies/overview" />

  <Card title="Configuration Overview" icon="gear" href="/docs/configuration/index" />

  <Card title="Agent Config" icon="robot" href="/docs/configuration/agent-config" />
</CardGroup>
