> For the complete documentation index, see [llms.txt](https://docs.akamas.io/akamas-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.akamas.io/akamas-docs/reference/construct-templates/study-template/optimizer-options.md).

# Optimizer Options

The *Optimizer Options* is a set of parameters used to fine-tune the study optimization strategy during the *optimize* step.

Optimizer options have the following structure:

| Field            | Type    | Value restrictions | Required | Default value | Description                                                                                                                                      |
| ---------------- | ------- | ------------------ | -------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `safetyFactor`   | decimal | between 0 and 1    | yes      |               | Parameter that impacts the distance from goal constraints for new configurations                                                                 |
| `trialsWithBeta` | integer |                    | yes      |               | Number of trials that will be executed with beta-warping optimization. If the threshold is reached, the following experiment disables the usage. |

### Safety Factor

The `safetyFactor` field specifies how much the optimizer should stay on the safe side in evaluating a candidate configuration with respect to the goal constraints. A higher safety factor corresponds to a safer configuration, that is a configuration that is less likely to violate goal constraints.

Acceptable values are all the real values ranging between 0 and 1, with (`safetyFactor` - 0.5) representing the allowed margin for staying within the defined constraint:

* 0 means "no safety", as with this value the optimizer ignores goal constraint violations;
* 0.5 means "safe, but no margin", and with this value the optimizer only tries configurations that do not violate the goal constraints, by remaining as close as possible to them;
* 1 means "super safe", and this value the optimizer only tries configurations that are very far from the goal constraints.

The default value is 0.5.

### Beta-warping

The `optimizerOptions` field can be used to specify whether **beta-warping** **optimization** (a more sophisticated optimization that requires a longer time) should be used and for how many experiments:

```yaml
trialsWithBeta: 20
```

## Example

The following fragment refers to an optimization study that runs 100 experiments using the SOBOL optimizer and forces 50% of the experiments to use the beta-warping option, enabling a more sophisticated but longer optimization:

```yaml
name: "my_optimize"  # name of the step
type: "optimize"     # type of the step (optimize)
optimizer: "SOBOL"
numberOfExperiments: 100  # number of experiments to execute
numberOfTrials: 2         # number of trials for each experiment
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.akamas.io/akamas-docs/reference/construct-templates/study-template/optimizer-options.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
