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

# Web Search

> How CodeRabbit uses web search to gather additional context during code reviews and chat responses.

CodeRabbit can perform web queries during reviews and chat to fetch the latest
documentation and external content, improving the accuracy and relevance of its
output. Web search is enabled by default for all users.

## How it works

When reviewing a pull request or responding in chat, CodeRabbit may perform web
queries to include publicly available information — such as current
documentation — that may not have been included in the underlying AI model's
training data.

You can see when web search was used by checking the **Review details** section
in the walkthrough summary comment (requires
[`review_details: true`](/reference/configuration#reviews) in your
configuration).

## Configuration

Control web search with the `knowledge_base.web_search` setting in your
`.coderabbit.yaml` file.

```yaml theme={null}
knowledge_base:
  web_search:
    enabled: true  # default
```

| Field                               | Type    | Default | Description                                  |
| ----------------------------------- | ------- | ------- | -------------------------------------------- |
| `knowledge_base.web_search.enabled` | boolean | `true`  | Use web search to gather additional context. |

## Disabling web search

You may want to disable web search in situations such as:

* **Air-gapped or restricted environments** — where outbound network access
  from the review process is not permitted.
* **Policy requirements** — where your organization restricts use of external
  data sources during code review.

To disable, set `enabled` to `false`:

```yaml theme={null}
knowledge_base:
  web_search:
    enabled: false
```

<Info>
  If you want CodeRabbit to have access to the latest documentation or other up-to-date information, but don't want to grant full web search access, consider connecting [MCP Servers](/knowledge-base/mcp-context) instead.
</Info>

## What's next

<CardGroup cols={1}>
  <Card title="Knowledge Base" icon="brain" href="/knowledge-base" horizontal>
    Overview of all knowledge base features
  </Card>

  <Card title="MCP Context" icon="plug" href="/knowledge-base/mcp-context" horizontal>
    Add external tool integrations as context sources
  </Card>

  <Card title="Configuration Reference" icon="book" href="/reference/configuration#knowledge-base" horizontal>
    Full reference for knowledge base settings
  </Card>
</CardGroup>
