Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
54 changes: 54 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,54 @@ using TypeSpec.Versioning;

namespace Azure.AI.Projects;


@doc("Labeled results across evaluators per data row.")
@added(Versions.v2025_05_15_preview)
@removed(Versions.v1)
model LabeledRows {
// The arbitrary JSON data for evaluator metrics.
...Record<string>;
}

@doc("Summary across rows for evaluation.")
@added(Versions.v2025_05_15_preview)
@removed(Versions.v1)
model 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 BlobStorageResults 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;
}

#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 +168,12 @@ model Evaluation {

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

@doc("Evaluation stored output results.")
outputs?: Array<Results>;

@doc("Evaluation results metric Summary.")
outputSummary?: MetricSummary;
}

@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.")
@route("evaluations/{evaluationId}/results ")
@added(Versions.v2025_05_15_preview)
@removed(Versions.v1)
@get
#suppress "@azure-tools/typespec-azure-core/use-standard-operations"
listRowResults(
@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 = 5,
@doc("""
Specifies the unique identifier of the evaluation resource.
""")
@path evaluationId: 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