# 6. View the results
optimization_result.display()
```

## Configuration Options

### Optimizer parameters

The optimizer has the following parameters:

<ParamField path="model" type="str" optional={true} default="gpt-4o" />

<ParamField path="model_parameters" type="dict[str, typing.Any] | None" optional={true} />

<ParamField path="population_size" type="int" optional={true} default="30" />

<ParamField path="num_generations" type="int" optional={true} default="15" />

<ParamField path="mutation_rate" type="float" optional={true} default="0.2" />

<ParamField path="crossover_rate" type="float" optional={true} default="0.8" />

<ParamField path="tournament_size" type="int" optional={true} default="4" />

<ParamField path="elitism_size" type="int" optional={true} default="3" />

<ParamField path="adaptive_mutation" type="bool" optional={true} default="True" />

<ParamField path="enable_moo" type="bool" optional={true} default="True" />

<ParamField path="enable_llm_crossover" type="bool" optional={true} default="True" />

<ParamField path="output_style_guidance" type="str | None" optional={true} />

<ParamField path="infer_output_style" type="bool" optional={true} default="False" />

<ParamField path="n_threads" type="int" optional={true} default="12" />

<ParamField path="verbose" type="int" optional={true} default="1" />

<ParamField path="seed" type="int" optional={true} default="42" />

### `optimize_prompt` parameters

The `optimize_prompt` method has the following parameters:

<ParamField path="prompt" type="ChatPrompt">
  The prompt to optimize
</ParamField>

<ParamField path="dataset" type="Dataset">
  The dataset to use for evaluation
</ParamField>

<ParamField path="metric" type="Callable">
  Metric function to optimize with, should have the arguments 

  `dataset_item`

   and 

  `llm_output`
</ParamField>

<ParamField path="experiment_config" type="dict | None" optional={true}>
  Optional experiment configuration
</ParamField>

<ParamField path="n_samples" type="int | float | str | None" optional={true}>
  Number of dataset items to use per evaluation. Use counts (e.g., 

  `50`

  ), fractions (e.g., 

  `0.1`

  ), percentages (e.g., "10%"), or "all"/"full"/None for the full dataset.
</ParamField>

<ParamField path="n_samples_minibatch" type="int | None" optional={true}>
  Optional number of samples for inner-loop minibatches (defaults to n_samples).
</ParamField>

<ParamField path="n_samples_strategy" type="str | None" optional={true}>
  Sampling strategy for subsampling (default: "random_sorted").
</ParamField>

<ParamField path="auto_continue" type="bool" optional={true} default="False">
  Whether to automatically continue optimization
</ParamField>

<ParamField path="agent_class" type="type[opik_optimizer.optimizable_agent.OptimizableAgent] | None" optional={true}>
  Optional agent class to use
</ParamField>

<ParamField path="project_name" type="str" optional={true} default="Optimization">
  Opik project name for logging traces (default: "Optimization")
</ParamField>

<ParamField path="max_trials" type="int" optional={true} default="10" />

<ParamField path="mcp_config" type="opik_optimizer.mcp_utils.mcp_workflow.MCPExecutionConfig | None" optional={true}>
  MCP tool calling configuration (default: None)
</ParamField>

<ParamField path="args" type="Any" />

<ParamField path="kwargs" type="Any" />

## Model Support

There are two models to consider when using the `EvolutionaryOptimizer`:

* `EvolutionaryOptimizer.model`: The model used for the evolution of the population of prompts.
* `ChatPrompt.model`: The model used to evaluate the prompt.

The `model` parameter accepts any LiteLLM-supported model string (e.g., `"gpt-4o"`, `"azure/gpt-4"`,
`"anthropic/claude-3-opus"`, `"gemini/gemini-1.5-pro"`). You can also pass in extra model parameters
using the `model_parameters` parameter:

```python
optimizer = EvolutionaryOptimizer(
    model="anthropic/claude-3-opus-20240229",
    model_parameters={
        "temperature": 0.7,
        "max_tokens": 4096
    }
)
```

## Next Steps

1. Explore specific [Optimizers](/agent_optimization/algorithms/overview) for algorithm details.
2. Refer to the [FAQ](/agent_optimization/faq) for common questions and troubleshooting.
3. Refer to the [API Reference](/agent_optimization/advanced/api_reference) for detailed configuration options.