Evaluations.CreateAgentEvaluation 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.
Overloads
| CreateAgentEvaluation(AgentEvaluationRequest, CancellationToken) |
Creates an agent evaluation run. |
| CreateAgentEvaluation(BinaryContent, RequestOptions) |
[Protocol Method] Creates an agent evaluation run.
|
CreateAgentEvaluation(AgentEvaluationRequest, CancellationToken)
- Source:
- Evaluations.cs
Creates an agent evaluation run.
public virtual System.ClientModel.ClientResult<Azure.AI.Projects.AgentEvaluation> CreateAgentEvaluation(Azure.AI.Projects.AgentEvaluationRequest evaluation, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateAgentEvaluation : Azure.AI.Projects.AgentEvaluationRequest * System.Threading.CancellationToken -> System.ClientModel.ClientResult<Azure.AI.Projects.AgentEvaluation>
override this.CreateAgentEvaluation : Azure.AI.Projects.AgentEvaluationRequest * System.Threading.CancellationToken -> System.ClientModel.ClientResult<Azure.AI.Projects.AgentEvaluation>
Public Overridable Function CreateAgentEvaluation (evaluation As AgentEvaluationRequest, Optional cancellationToken As CancellationToken = Nothing) As ClientResult(Of AgentEvaluation)
Parameters
- evaluation
- AgentEvaluationRequest
Agent evaluation to be run.
- cancellationToken
- CancellationToken
The cancellation token that can be used to cancel the operation.
Returns
Exceptions
evaluation is null.
Service returned a non-success status code.
Examples
This sample shows how to call CreateAgentEvaluation.
Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview");
AgentEvaluationRequest evaluation = new AgentEvaluationRequest("ecfcffqsrdhpecocrufffiqz", new Dictionary<string, EvaluatorConfiguration>
{
["key2653"] = new EvaluatorConfiguration("gujwtvhptykq")
{
InitParams = { },
DataMapping =
{
["key7400"] = "ijkjfvoswni"
},
}
}, "dvcnrcwar")
{
ThreadId = "cxjjsyhkeezgnaqqyerrdrbbth",
SamplingConfiguration = new AgentEvaluationSamplingConfiguration("tj", 7F, 8F),
RedactionConfiguration = new AgentEvaluationRedactionConfiguration
{
RedactScoreProperties = true,
},
};
Response<AgentEvaluation> response = client.CreateAgentEvaluation(evaluation);
This sample shows how to call CreateAgentEvaluation.
Uri endpoint = new Uri("<endpoint>");
TokenCredential credential = new DefaultAzureCredential();
Evaluations client = new AIProjectClient(endpoint, credential).GetEvaluationsClient(apiVersion: "2025-05-15-preview");
AgentEvaluationRequest evaluation = new AgentEvaluationRequest("ecfcffqsrdhpecocrufffiqz", new Dictionary<string, EvaluatorConfiguration>(), "dvcnrcwar");
Response<AgentEvaluation> response = client.CreateAgentEvaluation(evaluation);
Applies to
CreateAgentEvaluation(BinaryContent, RequestOptions)
- Source:
- Evaluations.cs
[Protocol Method] Creates an agent evaluation run.
- This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
public virtual System.ClientModel.ClientResult CreateAgentEvaluation(System.ClientModel.BinaryContent content, System.ClientModel.Primitives.RequestOptions options = default);
abstract member CreateAgentEvaluation : System.ClientModel.BinaryContent * System.ClientModel.Primitives.RequestOptions -> System.ClientModel.ClientResult
override this.CreateAgentEvaluation : System.ClientModel.BinaryContent * System.ClientModel.Primitives.RequestOptions -> System.ClientModel.ClientResult
Public Overridable Function CreateAgentEvaluation (content As BinaryContent, Optional options As RequestOptions = Nothing) As ClientResult
Parameters
- content
- BinaryContent
The content to send as the body of the request.
- options
- RequestOptions
The request options, which can override default behaviors of the client pipeline on a per-call basis.
Returns
The response returned from the service.
Exceptions
content is null.
Service returned a non-success status code.