ProjectsAgentsModelFactory.AgentOptimizationOptions Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Tuning knobs and run-mode for an optimization job.
public static Azure.AI.Projects.Agents.AgentOptimizationOptions AgentOptimizationOptions(int? maxCandidates = default, System.Collections.Generic.IDictionary<string,BinaryData> optimizationConfig = default, string evalModel = default, string optimizationModel = default, Azure.AI.Projects.Agents.AgentsEvaluationLevel? evaluationLevel = default, int? maxStalls = default);
static member AgentOptimizationOptions : Nullable<int> * System.Collections.Generic.IDictionary<string, BinaryData> * string * string * Nullable<Azure.AI.Projects.Agents.AgentsEvaluationLevel> * Nullable<int> -> Azure.AI.Projects.Agents.AgentOptimizationOptions
Public Shared Function AgentOptimizationOptions (Optional maxCandidates As Nullable(Of Integer) = Nothing, Optional optimizationConfig As IDictionary(Of String, BinaryData) = Nothing, Optional evalModel As String = Nothing, Optional optimizationModel As String = Nothing, Optional evaluationLevel As Nullable(Of AgentsEvaluationLevel) = Nothing, Optional maxStalls As Nullable(Of Integer) = Nothing) As AgentOptimizationOptions
Parameters
Maximum number of optimization candidates to generate. Must be >= 1. Default: 5.
- optimizationConfig
- IDictionary<String,BinaryData>
Per-target-attribute configuration overrides. Contains skills, tools, system_prompt for the agent, plus model space for model optimization.
- evalModel
- String
Model deployment used for evaluation. Defaults to server config (typically 'gpt-4o').
- optimizationModel
- String
Model deployment for optimization reasoning (must be gpt-5 family). Falls back to the default eval model when not set.
- evaluationLevel
- Nullable<AgentsEvaluationLevel>
Evaluation granularity. Null/omitted means per-item single-turn. Set to 'conversation' for per-conversation multi-turn simulation scoring.
Maximum number of consecutive reflective minibatch rejections before stopping early. A 'stall' occurs when the optimizer proposes a prompt change, evaluates it on a small subset, and the score does not improve — so no full validation-set evaluation is triggered. The counter resets whenever a minibatch passes and its full-validation score beats the current best. Only a sustained plateau of max_stalls consecutive minibatch failures triggers the stop. The service defaults to 5 if a value is not specified by the caller. Must be >= 1 when set.
Returns
A new AgentOptimizationOptions instance for mocking.