Update Metrics
PUThttps://api.confident-ai.com/v1/metrics/{id}
Updates a custom metric on your Confident AI project.
curl -X PUT "https://api.confident-ai.com/v1/metrics/{id}" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"criteria": "Determine if the `actual output` is correct based on the `input`.",
"evaluationParams": [
"actualOutput",
"expectedOutput"
]
}'{
"success": true,
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
idstringRequiredThe id of the metric you wish to update.
Request body
namestringThe name of the metric you're updating.
criteriastringThe new criteria for this particular metric, that you want to update to.
evaluationStepsstringThe new evaluation steps that you want to update for this metric.
evaluationParamslist of enums | list of enumsIt is an array of the params that will be used to evaluate your test cases.
Show 2 variantsHide 2 variants
llmTestCaseParamslist of enumsShow 7 enum valuesHide 7 enum values
inputactualOutputexpectedOutputcontexttoolsCalledexpectedToolsretrievalContext
- OR
conversationalTestCaseParamslist of enumsShow 6 enum valuesHide 6 enum values
turnsscenarioexpectedOutcomeuserDescriptioncontextchatbotRole
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 numbersRequiredAn array consisting of the ranges of scores to generate.
expectedOutcomestringRequiredThe expected outcome for your evaluation.
Response
successbooleanThis is true if the metric was updated successfully.
deprecatedbooleanThis is true if this metrics endpoint is deprecated.