Update Evaluation Rule
PUThttps://api.confident-ai.com/v1/evaluation-rules/{evaluationRuleId}
Updates an evaluation rule. Only the fields you send are changed; omitting a field leaves it untouched, and sending null clears it.
Constraints are re-checked against the rule's resulting state, not just the fields you sent — switching a rule to THREAD still requires a multi-turn metric collection. Requires the Starter plan or above.
curl -X PUT "https://api.confident-ai.com/v1/evaluation-rules/{evaluationRuleId}" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"enabled": false
}'{
"success": true,
"data": {
"evaluationRule": {
"id": "EVALUATION-RULE-ID",
"name": "Score production answers",
"enabled": false,
"sampleRate": 0.2,
"dataModel": "TRACE",
"metricCollection": {
"id": "METRIC-COLLECTION-ID",
"name": "Answer Quality",
"multiTurn": false
}
}
},
"link": "https://app.confident-ai.com/project/<PROJECT-ID>/workflows"
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
evaluationRuleIdstringRequiredThe unique identifier of the evaluation rule.
Request body
descriptionstringA note about what the rule checks.
enabledbooleanWhether the rule runs. Defaults to true on create.
sampleRatenumberThe fraction of matching items to evaluate. Defaults to 1 (all of them).
spanTypeenumOnly evaluate spans of this type. Allowed only when
dataModelisSPAN, and cleared automatically if the rule moves offSPAN.Show 5 enum valuesHide 5 enum values
SPANAGENTTOOLRETRIEVERLLM
filtersobjectA set of filter groups combined by a top-level operator.
Show 2 propertiesHide 2 properties
operatorenumRequiredHow filters or groups are combined.
Show 2 enum valuesHide 2 enum values
ANDOR
groupslist of objectsRequiredThe filter groups.
Show 2 propertiesHide 2 properties
operatorenumRequiredHow filters or groups are combined.
Show 2 enum valuesHide 2 enum values
ANDOR
filterslist of objectsRequiredThe filter rows in this group.
Show 4 propertiesHide 4 properties
categorystringRequiredThe property a filter row matches on (e.g. "Name", "User Id", "Model", "Metadata"). The set of valid values depends on the line's dataModel.
conditionenumRequiredThe comparison a filter row applies. Valid conditions depend on the category.
Show 18 enum valuesHide 18 enum values
IsIs notIs equal toDoes not equalIs less thanIs equal or less thanIs greater thanIs equal or greater thanHasHas notContainsContains onlyDoes not containHas increased by more thanHas increased by less thanHas decreased by more thanHas decreased by less thanHas changed from
valuestring | number | list of stringsRequiredThe value to match against.
Show 3 variantsHide 3 variants
string
- OR
number
- OR
list of strings
keystringThe property key. Auto-populated from category when omitted; required for Metadata, Metric, and Classifier filters.
threadTimelimitintegerFor
THREADrules, the seconds of inactivity to wait before evaluating a thread, so an in-progress conversation is not scored halfway. Defaults to 300.overwriteEvalsbooleanRe-evaluate items that already have results for this metric collection instead of skipping them. Defaults to false.
namestringA new name for the rule, unique within the project.
dataModelenumWhat kind of item to evaluate.
Show 3 enum valuesHide 3 enum values
TRACESPANTHREAD
metricCollectionstringThe name of a different metric collection to run.
Response
successbooleanIndicates if the request was successful.
dataobjectShow 1 propertyHide 1 property
evaluationRuleobjectShow 11 propertiesHide 11 properties
idstringThe unique identifier of the evaluation rule.
namestringThe name of the evaluation rule.
dataModelenumWhat kind of item the rule evaluates.
Show 3 enum valuesHide 3 enum values
TRACESPANTHREAD
metricCollectionobjectThe metric collection the rule runs, with any transformers attached to it.
Show 5 propertiesHide 5 properties
idstringThe unique identifier of the metric collection.
namestringThe name of the metric collection.
multiTurnbooleanWhether the collection holds multi-turn metrics.
inputTransformerobjectThe transformer applied to inputs before evaluation.
Show 2 propertiesHide 2 properties
idstringnamestring
outputTransformerobjectThe transformer applied to outputs before evaluation.
Show 2 propertiesHide 2 properties
idstringnamestring
descriptionstringA note about what the rule checks.
enabledbooleanWhether the rule runs. Defaults to true on create.
sampleRatenumberThe fraction of matching items to evaluate. Defaults to 1 (all of them).
spanTypeenumOnly evaluate spans of this type. Allowed only when
dataModelisSPAN, and cleared automatically if the rule moves offSPAN.Show 5 enum valuesHide 5 enum values
SPANAGENTTOOLRETRIEVERLLM
filtersobjectA set of filter groups combined by a top-level operator.
Show 2 propertiesHide 2 properties
operatorenumHow filters or groups are combined.
Show 2 enum valuesHide 2 enum values
ANDOR
groupslist of objectsThe filter groups.
Show 2 propertiesHide 2 properties
operatorenumHow filters or groups are combined.
Show 2 enum valuesHide 2 enum values
ANDOR
filterslist of objectsThe filter rows in this group.
Show 4 propertiesHide 4 properties
categorystringThe property a filter row matches on (e.g. "Name", "User Id", "Model", "Metadata"). The set of valid values depends on the line's dataModel.
conditionenumThe comparison a filter row applies. Valid conditions depend on the category.
Show 18 enum valuesHide 18 enum values
IsIs notIs equal toDoes not equalIs less thanIs equal or less thanIs greater thanIs equal or greater thanHasHas notContainsContains onlyDoes not containHas increased by more thanHas increased by less thanHas decreased by more thanHas decreased by less thanHas changed from
valuestring | number | list of stringsThe value to match against.
keystringThe property key. Auto-populated from category when omitted; required for Metadata, Metric, and Classifier filters.
threadTimelimitintegerFor
THREADrules, the seconds of inactivity to wait before evaluating a thread, so an in-progress conversation is not scored halfway. Defaults to 300.overwriteEvalsbooleanRe-evaluate items that already have results for this metric collection instead of skipping them. Defaults to false.
linkstringA link to the workflows page.