Launch Week 02 wrapped — explore all five launches

List Metrics

GEThttps://api.confident-ai.com/v1/metrics

Retrieves all the metrics from your Confident AI project.

GET/v1/metrics
curl -X GET "https://api.confident-ai.com/v1/metrics" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"
200
{
  "success": true,
  "data": {
    "metrics": [
      {
        "id": "METRIC-ID-1",
        "name": "Correctness",
        "criteria": "Determine if the `actual output` is correct based on the `input`.",
        "evaluationSteps": null,
        "rubric": null,
        "multiTurn": false,
        "requiredParameters": [
          "input",
          "actualOutput"
        ]
      },
      {
        "id": "METRIC-ID-2",
        "name": "Relevancy",
        "criteria": "Determine if the assistant answers are relevant to what the user is asking.",
        "evaluationSteps": null,
        "rubric": null,
        "multiTurn": true,
        "requiredParameters": [
          "role",
          "content"
        ]
      }
    ]
  },
  "deprecated": false
}

Headers

  • CONFIDENT_API_KEYstringRequired

    The API key of your Confident AI project.

Response

  • successboolean

    This is true if the metrics were successfully retrieved.

  • dataobject

    This maps to all the metrics retrieved.

    Show 1 propertyHide 1 property
    • metricslist of objects

      Show 7 propertiesHide 7 properties
      • idstring

        This is the unique id of the metric.

      • namestring

        This is the name of the metric, it's unique to all metrics.

      • criteriastring

        This is the criteria this metric uses to evaluate test cases.

      • evaluationStepslist of strings

        An alternative to criteria — a list of steps used to evaluate test cases.

      • requiredParameterslist of enums | list of enums

        The parameters required by this metric for evaluation.

        Show 2 variantsHide 2 variants
        • singleTurnRequiredParameterslist of enums

          Show 9 enum valuesHide 9 enum values
          • input
          • actualOutput
          • expectedOutput
          • context
          • expectedTools
          • toolsCalled
          • retrievalContext
          • metadata
          • tags
        • OR
        • multiTurnRequiredParameterslist of enums

          Show 8 enum valuesHide 8 enum values
          • content
          • role
          • scenario
          • expectedOutcome
          • toolsCalled
          • retrievalContext
          • metadata
          • tags
      • multiTurnboolean

        This is true if the metric is used to evaluate multi-turn test cases.

      • rubriclist of objects

        A list of score ranges (0–10 inclusive). Must be in order and non-overlapping. Click here to learn more

        Show 2 propertiesHide 2 properties
        • scoreRangelist of numbers

          An array consisting of the ranges of scores to generate.

        • expectedOutcomestring

          The expected outcome for your evaluation.

  • deprecatedboolean

    This is true if this metrics endpoint is deprecated.

Built byConfident AI