Skip to navigation

evaluate_changeset_objective

Starts a background job that scores the objective of a change set on up to 500 conversations. Read the verdicts with get_metric_evaluation and the job_id it returns.

With OAuth, this tool needs the Owner or Admin role. The job stores nothing in the objective’s record, so the objective can be edited and evaluated again. It is part of the improvement loop. The assistant uses it twice:

  • To check the objective. It scores the conversations you confirmed. The objective must give them the bad verdict: fail, or pass on a higher_is_worse objective. If most of them get the good verdict, the objective doesn’t describe the problem.
  • To read the starting pass rate. It scores a sample from a date range, with the filters that narrow it to the problem.

Example prompts

  • “Check that the objective fails the 4 conversations I confirmed.”
  • “What is the objective’s pass rate on billing conversations from the last 14 days?”

Parameters

Pass changeset_id, and exactly one of conversation_ids and sample.

ParameterTypeRequiredDescription
changeset_idstringYesThe change set whose objective to evaluate. If the change set has more than one objective, the job scores the first one.
conversation_idsarray of stringsNoThe conversations to evaluate, up to 500.
sampleobjectNoEvaluates conversations picked at random from a date range. See the fields below.

The sample object has these fields:

FieldTypeRequiredDescription
startstringYesThe first day, YYYY-MM-DD.
endstringYesThe last day, YYYY-MM-DD.
filtersarrayNoFilters in the shape of get_conversations filters, such as a signal, channel, Topic, or Intent.
sizeintegerNoThe most conversations to evaluate, from 1 to 500. Defaults to 100.
time_zonestringNoThe IANA time zone of the days. Defaults to UTC.

A sample picks conversations that match the filters, are in the objective’s Intent scope, and have no verdict yet.

Response

Returns the job at once, with the same fields as get_metric_evaluation and no verdicts yet. Read the verdicts with that tool. A sample also returns matched: the number of conversations that match. A sample that matches no conversation returns status completed and total 0.

If the change set has no objective, or the change set isn’t found, the tool returns an error.

Limits

  • A job evaluates up to 500 conversations.
  • If analytics storage is unavailable, the tool returns an error and starts no job.
  • An AI Agent can evaluate 2,000 conversations in 24 hours, across its metrics and objectives. Every conversation of a job counts when the job starts.
  • The job evaluates the objective as it is when the job starts. A draft objective can be evaluated too.