Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions specification/ai/Azure.AI.Projects/evaluations/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,64 @@ using TypeSpec.Versioning;

namespace Azure.AI.Projects;


@doc("Labeled results per row.")
@added(Versions.v2025_05_15_preview)
@removed(Versions.v1)
model LabeledRows {
@doc("The label associated with the evaluation.")
label: string;

@doc("Detailed reasoning or explanation for the evaluation.")
reasoning: string;

@doc("The version identifier for the evaluation model.")
version: string;
}

@doc("Summary across rows for evaluation.")
@added(Versions.v2025_05_15_preview)
@removed(Versions.v1)
model MetricSummary extends Results {
type: "metricSummary";

@doc("Aggregated summary per evaluator across all rows.")
data: Record<{
score?: string;
gpt_score?: string;
threshold: string;
defect_rate?: string;
passing_rate?: string;
binary_aggregate: string;
}>;
}

@doc("Stored result details and storage location. Currently only blob storage support for evaluation result/result uploading.")
@added(Versions.v2025_05_15_preview)
@removed(Versions.v1)
model Storage extends Results {
type: "storage";

@doc("AssetId reference for the stored evaluationResult.")
evaluationResultAssetId: string;

@doc("The connection ID to the storage account where the evaluation results are stored.")
storageConnectionId: string;

@doc("Data table name for the data.")
dataTableName: string;
}

#suppress "@azure-tools/typespec-azure-core/no-string-discriminator"
@doc("Abstract result class.")
@discriminator("type")
@added(Versions.v2025_05_15_preview)
@removed(Versions.v1)
model Results {
@doc("Type of the evaluation result")
type: string;
}

@doc("Evaluator Configuration")
@added(Versions.v2025_05_15_preview)
@removed(Versions.v1)
Expand Down Expand Up @@ -120,6 +178,9 @@ model Evaluation {

@doc("Evaluators to be used for the evaluation.")
evaluators: Record<EvaluatorConfiguration>;

@doc("Output Results.")
outputs: Array<Results>;
}

@doc("The redaction configuration will allow the user to control what is redacted.")
Expand Down
37 changes: 37 additions & 0 deletions specification/ai/Azure.AI.Projects/evaluations/routes.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,43 @@ interface Evaluations {
@doc("List evaluation runs")
list is EvaluationsOperations.ResourceList<Evaluation>;

@doc("List evaluation run row results for a specific evaluatorId")
@route("evaluations/{evaluatorId}/results ")
@added(Versions.v2025_05_15_preview)
@removed(Versions.v1)
@get
#suppress "@azure-tools/typespec-azure-core/use-standard-operations"
listRowResultsByEvaluatorId(
@doc("""
The index of the first item to return. Used for pagination.
""")
@query startIndex?: int32,

@doc("""
The number of items to return in the result set. Used for pagination.
""")
@query pageSize?: int32,
@doc("""
Specifies the unique identifier of the evaluator resource.
""")
@path evaluatorId: string,

@doc("""
The number of items to skip before starting to collect the result set. Used for pagination.
""")
@query skip?: int32,

@doc("""
The maximum number of items to return in the result set. Used for pagination.
""")
@query top?: int32,

@doc("""
The API version to use for the request.
""")
@query apiVersion: string
): Azure.Core.Page<LabeledRows>;

#suppress "@azure-tools/typespec-azure-core/use-standard-operations"
@doc("Creates an evaluation run.")
@route("runs:run")
Expand Down
Loading
Loading