> ## 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.

# To RAG Config • AI Agent SDK

> to_rag_config: Convert to RAG pipeline config.

# to\_rag\_config

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**RetrievalConfig**](../classes/RetrievalConfig) class in the [**retrieval\_config**](../modules/retrieval_config) module.

Convert to RAG pipeline config.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def to_rag_config() -> Dict[str, Any]
```

### Returns

<ResponseField name="Returns" type="Dict[str, Any]">
  The result of the operation.
</ResponseField>

## Used By

* [`Agent.rag`](../functions/Agent-rag)

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/rag/retrieval_config.py#L271">
  `praisonaiagents/rag/retrieval_config.py` at line 271
</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>
