ruLog in to Senler

Custom metrics

Create a custom metric and define its measurement method, value type, and data extraction rules.

In agent metric settings, select Create metric. Save it after completing its parameters and add it to the agent set.

Where and how the metric is measured

When creating a custom metric, choose where and how it is measured through one of the options:

  • Event metric is stored on messages and used in regular analytics;
  • Primary discussion category defines the main topic list in the summary. Use a text metric with a fixed value list; an agent can have only one primary category;
  • Additional discussion attribute evaluates the whole topic and adds context without creating another main list. It can contain one value from a fixed list, multiple values from a fixed list, or a yes/no answer.

A useful primary category contains stable conversation areas such as Payment, Delivery, or Returns. An additional attribute answers a narrower question, such as "Urgent?" or "Needs escalation?"

After you choose how the metric is measured, the cabinet shows only compatible value types. Select the required option: a primary category supports only text with a fixed list, while an additional attribute supports a text list, an array of values, or yes/no.

Custom metric fields

  • name;
  • description;
  • value type;
  • example value;
  • AI extraction instruction.

The metric key is created automatically and is only shown when viewing the metric; you do not fill it in manually.

Types of metrics

  • numeric;
  • text;
  • logical — yes or no;
  • array — multiple values;
  • object — a free-form JSON structure.

String restrictions

Allowed values and maximum length are configured in the constraints section.

  • the list can contain from 1 to 50 unique non-empty values;
  • the maximum free-text length can be set from 1 to 10,000 characters;
  • free text is not included in analytics as a numerical indicator.

Limitations for numbers

  • minimum value;
  • maximum value;
  • only integers.

When both boundaries are set, the minimum cannot be greater than the maximum.

Limitations for arrays

  • the allowed element list can contain from 1 to 50 unique non-empty values;
  • the maximum number of elements in the result can be set from 1 to 50.

Restrictions for objects

  • free JSON;
  • such values are usually not included in aggregate analytics as a numerical indicator.

How constraints affect collection

Before saving, the system checks the AI response against the metric's type and constraints. Leading and trailing whitespace is removed from strings, and duplicate array elements are merged. A value is not saved when a string is empty, the type is wrong, the value is outside the allowed list or numeric boundaries, an array contains an invalid element, or the maximum string or array size is exceeded.

If a metric is skipped, check its instruction and example: they must lead to a value with the same type and format specified by the constraints. The system does not automatically replace an invalid value with the nearest allowed one.

Analytics settings

  • in analytics settings, you can choose whether the metric participates in good and problematic result comparisons;
  • when this setting is available for the selected type, specify which direction is considered good. The cabinet shows only compatible options;
  • for a Boolean metric, first enable analytics participation, then explicitly choose whether yes or no represents a good result;
  • a primary discussion category groups topics and does not itself participate in good and problematic metric rankings;
  • additional discussion attributes with comparable levels can participate in rankings and trends together with event metrics. For example, default attributes compare urgency, issue severity, or the absence of objections;
  • built-in metrics are available for viewing, but cannot be edited.

If metric skipping is enabled in agent capabilities, the agent can exclude a specific message from statistics. This does not turn metrics collection off completely and should only be used for test, irrelevant, or noisy messages.

Copying And Sharing A Custom Metric

A custom metric card provides copy to project and share by link actions. These actions are not available for built-in metrics.

The package transfers the metric definition: name, description, type, measurement location, instruction, example, constraints, and analytics settings. Previously collected values and analytics history are not copied. After import, select the new metric for the required agents and publish their settings. See Resource copying for the complete package workflow.

Changing a metric after collecting data

Before a custom metric has results, you can change its settings. After results appear, you can still correct the name, description, example, and AI instruction, but you cannot change the meaning of already collected values:

  • value type;
  • measurement location and discussion role;
  • allowed values, boundaries, and other constraints;
  • good-result direction for analytics.

If you need a different meaning or scale, create a new metric and select it for the agent. This keeps the old history comparable. Built-in metrics cannot be edited regardless of whether results exist.

When a metric is deleted

  • only a custom metric can be opened and removed with Delete;
  • before confirming deletion, note that the metric will be removed from all agents where it is used;
  • historical data may remain in history, but the new setting will no longer collect this metric;
  • if a primary discussion category is deleted, select another one before the next agent publication; otherwise summary topics will be less structured.