PUT
/
metrics

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
metric_id
string
required

Unique identifier of the metric

child_metrics
object[]

Child metrics added under composite events

code_snippet
string

Updated code block for the metric

criteria
string

Criteria for human or composite metrics

description
string

Short description of what the metric does

enabled_in_prod
boolean

Whether to compute on all production events automatically

event_name
string

Name of event that the metric is set to be computed on

event_type
enum<string>

Type of event that the metric is set to be computed on

Available options:
model,
tool,
chain,
session
name
string

Updated name of the metric

needs_ground_truth
boolean

Whether a ground truth (on metadata) is required to compute it

pass_when
boolean

Threshold for boolean metrics to decide passing or failing in tests

prompt
string

Updated Evaluator prompt for the metric

return_type
enum<string>

The data type of the metric value - "boolean", "float", "string"

Available options:
boolean,
float,
string
threshold
object

Threshold for numeric metrics to decide passing or failing in tests

type
enum<string>

Type of the metric - "custom", "model", "human" or "composite"

Available options:
custom,
model,
human,
composite