Launch Week 02 wrapped — explore all five launches

Evaluate Span

POSThttps://api.confident-ai.com/v2/evaluate/spans/{spanUuid}

Queues an evaluation of a span against the metrics in metricCollection. The evaluation runs in the background, and its results are stored on the span, so fetch the span to read them once it has finished.

POST/v2/evaluate/spans/{spanUuid}
curl -X POST "https://api.confident-ai.com/v2/evaluate/spans/{spanUuid}" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "metricCollection": "Collection Name",
  "overwriteMetrics": false
}'
200
{
  "success": true,
  "data": {
    "id": "<SPAN-UUID>"
  },
  "deprecated": false
}

Headers

  • CONFIDENT_API_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • spanUuidstringRequired

    The unique identifier of the span.

Request body

  • metricCollectionstringRequired

    The name of the single-turn metric collection you wish to use for evaluation.

  • overwriteMetricsboolean

    Set this to true to re-run every metric in the collection and replace the results already stored, and omit this field to keep those results and only run the metrics that have none yet.

Response

Evaluate Span succeeded.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    The span whose evaluation was queued.

    Show 1 propertyHide 1 property
    • idstring

      This is the uuid of the span the evaluation was queued for.

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI