> ## Documentation Index
> Fetch the complete documentation index at: https://r2r-patch-fix-ingestion.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Learn how to configure your R2R deployment

## Introduction

R2R offers a flexible configuration system that allows you to customize your Retrieval-Augmented Generation (RAG) applications. This guide introduces the key concepts and methods for configuring R2R.

## Configuration Levels

R2R supports two main levels of configuration:

1. **Server Configuration**: Define default server-side settings.
2. **Runtime Configuration**: Dynamically override settings when making API calls.

## Server Configuration

The default settings for a `light` R2R installation are specified in the [`r2r.toml`](https://github.com/SciPhi-AI/R2R/blob/main/r2r.toml) file.

When doing a `full` installation the R2R CLI uses the [`full.toml`](https://github.com/SciPhi-AI/R2R/blob/main/py/core/configs/full.toml) to override some of the default light default settings with those of the added providers.

To create your own custom configuration:

1. Create a new file named `my_r2r.toml` in your project directory.
2. Add only the settings you wish to customize. For example:

```toml my_r2r.toml
[embedding]
provider = "litellm"
base_model = "text-embedding-3-small"
base_dimension = 1536

[completion]
    [completion.generation_config]
    model = "anthropic/claude-3-opus-20240229"
```

3. Launch R2R with the CLI using your custom configuration:

```bash
r2r serve --config-path=my_r2r.toml
```

R2R will use your specified settings, falling back to defaults for any unspecified options.

## Runtime Configuration

When calling endpoints, you can override server configurations on-the-fly. This allows for dynamic control over search settings, model selection, prompt customization, and more.

For example, using the Python SDK:

```python
client = R2RClient("http://localhost:7272")

response = client.rag(
    "Who was Aristotle?",
    rag_generation_config={
        "model": "anthropic/claude-3-haiku-20240307",
        "temperature": 0.7
    },
    vector_search_settings={
        "search_limit": 100,
        "use_hybrid_search": True
    }
)
```

## Next Steps

For more detailed information on configuring specific components of R2R, please refer to the following pages:

* [Postgres Configuration](/documentation/configuration/postgres)
* [LLM Configuration](/documentation/configuration/llm)
* [RAG Configuration](/documentation/configuration/rag)
* [Ingestion Configuration](/documentation/configuration/ingestion/overview)
* [Knowledge Graph Configuration](/documentation/configuration/knowledge-graph/overview)
* [Retrieval Configuration](/documentation/configuration/retrieval/overview)
