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

# Qodo Context Engine

<Badge color="outline-provider" size="sm" shape="pill" icon="github">GitHub</Badge>
<Badge color="outline-provider" size="sm" shape="pill" icon="gitlab">GitLab</Badge>
<Badge color="outline-provider" size="sm" shape="pill" icon="database">Bitbucket Data Center</Badge>

<Warning>
  **Git Integration (formerly Qodo Merge)** – AI code review agents for pull requests. This documentation describes the Qodo v1 experience. For the Qodo v2 documentation, click [here.](/code-review)
</Warning>

<Note>
  This feature is available for [Enterprise users](https://www.qodo.ai/pricing/) only.
</Note>

## What is Qodo Context Engine?

Qodo Context Engine is the code intelligence engine behind the Qodo platform. It connects to all your repos, analyzes architecture and patterns, and powers AI agents that help you search, understand, and solve technical problems.

Think of it as an AI-powered Principal Engineer, that understands your entire system and helps you move faster with confidence.

### Why should I use it?

When used with Qodo Git interface, Qodo Context Engine brings deep, architecture-level understanding directly into your review workflow.

You ask the questions, and Qodo Context Engine finds the answers from across your entire codebase.

### How does it work?

Qodo Context Engine uses Retrieval-Augmented Generation (RAG) and agentic reasoning to understand your codebase:

* **Indexing** – Builds a deep internal map of your code

* **Retrieval** – Pulls relevant code, docs, and patterns

* **Reasoning** – AI agents analyze dependencies and logic

* **Generation** – Produces grounded, accurate responses

## Using Qodo Context Engine

In order to enable the RAG feature, add the following lines to your [configuration file](/v1/configuration/configuration-file):

```bash theme={null}
[rag_arguments]
enable_rag=true
```

<Tabs>
  <Tab title="/ask">
    The [`/ask`](/v1/tools/tools-list/ask) tool can access broader repository context through the RAG feature when answering questions that go beyond the PR scope alone.

    The **References** section displays the additional repository content consulted to formulate the answer.

    <Frame>
      <img src="https://mintcdn.com/qodo/0Lwij7lmM5KGq-6-/images/v1/image-4.png?fit=max&auto=format&n=0Lwij7lmM5KGq-6-&q=85&s=1895c5b4951f3d0a7c379cb272852872" alt="" width="1380" height="898" data-path="images/v1/image-4.png" />
    </Frame>
  </Tab>

  <Tab title="/compliance">
    The [`/compliance`](/v1/tools/tools-list/compliance) tool offers the *Codebase Code Duplication Compliance* section which contains feedback based on the RAG references. This section highlights possible code duplication issues in the PR, providing developers with insights into potential code quality concerns.

    <Frame>
      <img src="https://mintcdn.com/qodo/0Lwij7lmM5KGq-6-/images/v1/image-7.png?fit=max&auto=format&n=0Lwij7lmM5KGq-6-&q=85&s=cdd1b5de93a9b89a609f12a8856aa0c1" alt="" width="1380" height="898" data-path="images/v1/image-7.png" />
    </Frame>
  </Tab>

  <Tab title="/implement">
    The [`/implement`](/v1/tools/tools-list/implement) tool utilizes the RAG feature to provide comprehensive context of the repository codebase, allowing it to generate more refined code output.

    The **References** section contains links to the content used to support the code generation.

    <Frame>
      <img src="https://mintcdn.com/qodo/0Lwij7lmM5KGq-6-/images/v1/image-9.png?fit=max&auto=format&n=0Lwij7lmM5KGq-6-&q=85&s=4f364a07fafee0dac13e05f50fdc3690" alt="" width="1300" height="1702" data-path="images/v1/image-9.png" />
    </Frame>
  </Tab>

  <Tab title="/review">
    The [`/review`](/v1/tools/tools-list/review) tool offers the **Focus area**  \*\*which contains feedback based on the RAG output.

    The complete list of references found relevant to the PR will be shown in the **References** section, helping developers understand the broader context by exploring the provided references.

    <Frame>
      <img src="https://mintcdn.com/qodo/uIkZ6kAWHm6WXqrW/images/v1/image-2.png?fit=max&auto=format&n=uIkZ6kAWHm6WXqrW&q=85&s=6eb6135c1a5407934dd55db2229ea1e3" alt="" width="1380" height="898" data-path="images/v1/image-2.png" />
    </Frame>
  </Tab>
</Tabs>

## Configuration options

| Possible configurations | Default value                                | What does it do                                                                                                                                                                                               |
| ----------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `enable_rag`            | `false`                                      | If set to true, repository enrichment using RAG will be enabled.                                                                                                                                              |
| `rag_repo_list`         | The repository from which the PR was opened. | A list of repositories that will be used by the semantic search for RAG.<br /><br /> Use `['all']` to consider the entire codebase, or a select list of repositories. For example: `['my-org/my-repo', ...]`. |
