ProjectsAgentsModelFactory.OptimizationCandidate Method

Definition

Aggregated evaluation result for a single candidate agent configuration across all tasks.

public static Azure.AI.Projects.Agents.OptimizationCandidate OptimizationCandidate(string candidateId = default, string name = default, Azure.AI.Projects.Agents.OptimizationAgentDefinition config = default, System.Collections.Generic.IDictionary<string,BinaryData> mutations = default, double avgScore = 0, double avgTokens = 0, double passRate = 0, System.Collections.Generic.IEnumerable<Azure.AI.Projects.Agents.OptimizationTaskResult> taskScores = default, bool isParetoOptimal = false, string evalId = default, string evalRunId = default, Azure.AI.Projects.Agents.PromotionInfo promotion = default);
static member OptimizationCandidate : string * string * Azure.AI.Projects.Agents.OptimizationAgentDefinition * System.Collections.Generic.IDictionary<string, BinaryData> * double * double * double * seq<Azure.AI.Projects.Agents.OptimizationTaskResult> * bool * string * string * Azure.AI.Projects.Agents.PromotionInfo -> Azure.AI.Projects.Agents.OptimizationCandidate
Public Shared Function OptimizationCandidate (Optional candidateId As String = Nothing, Optional name As String = Nothing, Optional config As OptimizationAgentDefinition = Nothing, Optional mutations As IDictionary(Of String, BinaryData) = Nothing, Optional avgScore As Double = 0, Optional avgTokens As Double = 0, Optional passRate As Double = 0, Optional taskScores As IEnumerable(Of OptimizationTaskResult) = Nothing, Optional isParetoOptimal As Boolean = false, Optional evalId As String = Nothing, Optional evalRunId As String = Nothing, Optional promotion As PromotionInfo = Nothing) As OptimizationCandidate

Parameters

candidateId
String

Server-assigned candidate identifier. Use with GET /candidates/{id} sub-endpoints.

name
String

Display name of the candidate (e.g., 'baseline', 'instruction-v2').

config
OptimizationAgentDefinition

The agent configuration that produced this candidate.

mutations
IDictionary<String,BinaryData>

What was mutated from the baseline (e.g., {system_prompt: 'new prompt'}).

avgScore
Double

Average composite score across all tasks.

avgTokens
Double

Average token usage across all tasks.

passRate
Double

Fraction of tasks that met the pass threshold.

taskScores
IEnumerable<OptimizationTaskResult>

Individual task-level scores.

isParetoOptimal
Boolean

Whether this candidate is on the Pareto frontier (score vs cost).

evalId
String

Foundry evaluation identifier used to score this candidate.

evalRunId
String

Foundry evaluation run identifier for this candidate's scoring run.

promotion
PromotionInfo

Promotion metadata. Null if the candidate has not been promoted.

Returns

A new OptimizationCandidate instance for mocking.

Applies to