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

# Suggestions Threshold

> Configure the threshold level for AI-generated PR suggestions

You can customize the number of AI-generated suggestions for your pull requests by adjusting the threshold setting.

## Setting the Threshold

Navigate to **Settings -> AI Code Review -> PR Suggestions threshold** to configure how many suggestions you receive.

You can access this setting directly at: [https://app.codeant.ai/settings/prconfsettings](https://app.codeant.ai/settings/prconfsettings)

<img src="https://mintcdn.com/codeantai/ItbpV2tThaLUBEMa/images/pull_request/customize/thresholds/suggestions_threshold.png?fit=max&auto=format&n=ItbpV2tThaLUBEMa&q=85&s=84cc08cb76e8c567f71476958bc50620" alt="PR Suggestions Threshold Setting" width="1378" height="572" data-path="images/pull_request/customize/thresholds/suggestions_threshold.png" />

## How Threshold Affects Suggestions

* **Lower threshold**: More suggestions, including minor improvements and style recommendations
* **Higher threshold**: Fewer suggestions, focusing only on critical issues

## Suppressed Suggestions at Higher Thresholds

When you set a higher threshold, the following types of suggestions will be suppressed:

* Minor style and formatting improvements
* Non-critical code optimizations
* Subjective refactoring recommendations
* Documentation suggestions for obvious code
* Variable naming improvements for clear names
* Minor performance enhancements with negligible impact

Only high-priority suggestions like security vulnerabilities, logical errors, and significant bugs will be shown at higher threshold levels.

## Example Code Suggestions

### High Priority (Shown at Higher Thresholds)

**Security vulnerability - SQL injection risk:**

```python theme={null}
# Problematic code
def get_user(user_id):
    query = f"SELECT * FROM users WHERE id = {user_id}"
    return execute_query(query)

# Suggested fix
def get_user(user_id):
    query = "SELECT * FROM users WHERE id = %s"
    return execute_query(query, (user_id,))
```

### Low Priority (Suppressed at Higher Thresholds)

**Minor style improvement:**

```python theme={null}
# Current code
def calculate_total(items):
    total = 0
    for item in items:
        total += item.price
    return total

# Suggested improvement
def calculate_total(items):
    return sum(item.price for item in items)
```
