Pull Metric
GEThttps://api.confident-ai.com/v1/metric/{name}
Retrieves a single metric by name from your Confident AI project.
curl -X GET "https://api.confident-ai.com/v1/metric/{name}" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"{
"success": true,
"data": {
"id": "METRIC-ID-1",
"name": "Correctness",
"criteria": "Determine if the `actual output` is correct based on the `expected output`.",
"evaluationSteps": null,
"rubric": null,
"multiTurn": false,
"requiredParameters": [
"actualOutput",
"expectedOutput"
]
},
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
namestringRequiredThe name of the metric you wish to retrieve.
Response
successbooleanThis is true if the metric was successfully retrieved.
dataobjectThe metric retrieved.
Show 7 propertiesHide 7 properties
idstringThis is the unique id of the metric.
namestringThis is the name of the metric, it's unique to all metrics.
criteriastringThis is the criteria this metric uses to evaluate test cases.
evaluationStepslist of stringsAn alternative to criteria — a list of steps used to evaluate test cases.
requiredParameterslist of enums | list of enumsThe parameters required by this metric for evaluation.
Show 2 variantsHide 2 variants
singleTurnRequiredParameterslist of enumsShow 9 enum valuesHide 9 enum values
inputactualOutputexpectedOutputcontextexpectedToolstoolsCalledretrievalContextmetadatatags
- OR
multiTurnRequiredParameterslist of enumsShow 8 enum valuesHide 8 enum values
contentrolescenarioexpectedOutcometoolsCalledretrievalContextmetadatatags
multiTurnbooleanThis is true if the metric is used to evaluate multi-turn test cases.
rubriclist of objectsA 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 numbersAn array consisting of the ranges of scores to generate.
expectedOutcomestringThe expected outcome for your evaluation.
deprecatedbooleanThis is true if this metric endpoint is deprecated.