> For the complete documentation index, see [llms.txt](https://docs.imerit.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.imerit.net/sdk/sdk-documentation/project-level-sdk-functions/update_benchmark_settings.md).

# update\_benchmark\_settings

`imerit_ango.sdk.SDK.`

## update\_benchmark\_settings(project\_id, benchmark\_enabled, benchmark\_ratio, benchmark\_cutoff)

Enables or disables benchmarking and updates benchmark allocation settings for a project.

{% hint style="info" %}
The API key must belong to a project manager for the project.
{% endhint %}

### Parameters

* **project\_id:** string
  * The unique identifier for the project. You can find the project ID in [the user interface](/sdk/sdk-documentation.md#project-ids) or retrieve it using the [`list_projects`](/sdk/sdk-documentation/project-level-sdk-functions/list_projects.md) function.
* **benchmark\_enabled:** bool
  * Enables or disables benchmarking for the project.
* **benchmark\_ratio:** int, *Optional, default None*
  * The percentage probability, from 0 to 100, that the next task allocated to a user will be a benchmark task.
  * If omitted, the project's existing benchmark ratio is unchanged.
* **benchmark\_cutoff:** bool, *Optional, default None*
  * When `True`, Ango Hub stops allocating benchmark tasks to users once the regular task queue is complete.
  * If omitted, the project's existing cutoff setting is unchanged.

{% hint style="warning" %}
Disabling benchmarking after benchmark tests have taken place deletes the project's existing benchmarking information. To pause benchmark allocation without disabling the feature, set `benchmark_ratio` to `0`.
{% endhint %}

Returns:

* **output:** dict
  * A dictionary containing the result of the operation.
  * Includes a `status` field indicating whether the request was successful and a `data` field containing the updated project.

<details open>

<summary><strong>How to verify in Ango Hub?</strong></summary>

After successfully executing the `update_benchmark_settings` function, navigate to **Projects → \[Your Project] → Settings → General**.

* Confirm that **Enable Benchmark** matches `benchmark_enabled`.
* Confirm that the benchmark probability and **Stop Benchmark Tasks When the Queue Ends** settings match the values you provided.

{% hint style="info" %}
Changes made via the SDK are reflected in Ango Hub in near real-time. If updates are not immediately visible, please refresh the page.
{% endhint %}

</details>

### Example

Enable benchmarking with a 10% allocation probability, and stop allocating benchmark tasks when the regular queue is complete:

{% tabs %}
{% tab title="python" %}

```python
import os
from dotenv import load_dotenv
from imerit_ango.sdk import SDK

load_dotenv('variables.env')
api_key = os.getenv('API_KEY')
project_id = os.getenv('PROJECT_ID')

ango_sdk = SDK(api_key)

response = ango_sdk.update_benchmark_settings(
    project_id=project_id,
    benchmark_enabled=True,
    benchmark_ratio=10,
    benchmark_cutoff=True
)
```

{% endtab %}

{% tab title="curl" %}

```bash
curl -X POST "https://imeritapi.ango.ai/v2/project/$PROJECT_ID" \
  -H "Content-Type: application/json" \
  -H "apikey: $ANGO_API_KEY" \
  -d '{
    "benchmarkEnabled": true,
    "benchmarkRatio": 10,
    "benchmarkCutoff": true
  }'
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
**See also**

[set\_tasks\_as\_benchmark](/sdk/sdk-documentation/project-level-sdk-functions/set_tasks_as_benchmark.md), [Benchmarks](/core-concepts/benchmarks.md)
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.imerit.net/sdk/sdk-documentation/project-level-sdk-functions/update_benchmark_settings.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
