Launch Week 02 wrapped — explore all five launches

Evaluate Thread

POSThttps://api.confident-ai.com/v2/evaluate/threads/{threadId}

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

POST/v2/evaluate/threads/{threadId}
curl -X POST "https://api.confident-ai.com/v2/evaluate/threads/{threadId}" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "metricCollection": "Collection Name",
  "chatbotRole": "A helpful geography assistant.",
  "overwriteMetrics": false
}'
200
{
  "success": true,
  "data": {
    "id": "thread-42"
  },
  "deprecated": false
}

Headers

  • CONFIDENT_API_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • threadIdstringRequired

    The id of the thread, as you supplied it when creating its traces.

Request body

  • metricCollectionstringRequired

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

  • chatbotRolestring

    This is the role of the chatbot in the thread, which the multi-turn metrics that judge role adherence evaluate the thread against.

  • 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 Thread succeeded.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    The thread whose evaluation was queued.

    Show 1 propertyHide 1 property
    • idstring

      This is the id of the thread the evaluation was queued for.

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI