Launch Week 02 wrapped — explore all five launches

Update Collection

PUThttps://api.confident-ai.com/v1/metric-collections/{id}

Updates a metric collection's name and metricSettings.

PUT/v1/metric-collections/{id}
curl -X PUT "https://api.confident-ai.com/v1/metric-collections/{id}" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "multiTurn": true,
  "metricSettings": [
    {
      "metric": {
        "name": "string"
      },
      "activated": true,
      "threshold": 0.5,
      "includeReason": true,
      "strictMode": false,
      "sampleRate": 1
    }
  ]
}'
200
{
  "success": true,
  "data": {
    "id": "string"
  },
  "deprecated": true
}

Headers

  • CONFIDENT_API_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • idstringRequired

    The id of the metric collection you want to update.

Request body

  • namestring

    The name of the metric collection, which must be unique within your project.

  • multiTurnboolean

    This is true if your metric collection is multi-turn, which contains only multi-turn metrics. Defaulted to false.

  • metricSettingslist of objects

    This is the list of metric settings for the collection.

    Show 6 propertiesHide 6 properties
    • metricobject

      This is a metric object, which contains the metric name.

      Show 1 propertyHide 1 property
      • namestringRequired

        This is the name of the metric.

    • activatedboolean

      This determines if the metric is activated. Only activated metrics are used for evaluations. Non-activated metrics are skipped.

    • thresholdnumber

      This determines the threshold for the metric which determines if the metric passes or fails depending on if the metric score is equal or greater than the threshold.

    • includeReasonboolean

      This determines if the reason for the metric score should be generated during evaluations.

    • strictModeboolean

      This determines if the metric is in strict mode. Metrics in strict mode output a binary score of 0 or 1, indicating pass or fail, as opposed to a continuous score from 0 to 1.

    • sampleRatenumber

      This determines the probability of the metric being ran for evaluation.

Response

  • successboolean

    This is true if the metric collection was updated successfully.

  • dataobject

    This maps to the id of the metric collection.

    Show 1 propertyHide 1 property
    • idstring

      This is the id of the metric collection.

  • deprecatedboolean

    This is true if this metric collection endpoint is deprecated.

Built byConfident AI