Skip to main content
Quality targets allow you to define thresholds for quality metrics and automatically monitor your annotation projects. Configure alerts to notify your team when quality targets are breached.

List quality targets

Retrieve all quality targets for a project.
const targets = await avala.qualityTargets.list('project-uid', {
  limit: 50,
  cursor: 'next-cursor'
});

Parameters

projectUid
string
required
The unique identifier of the project
options.limit
number
Maximum number of targets to return per page
options.cursor
string
Cursor for pagination

Returns

Returns a cursor-paginated list of quality target objects.
items
QualityTarget[]
Array of quality target objects
nextCursor
string | null
Cursor for the next page of results
previousCursor
string | null
Cursor for the previous page of results
hasMore
boolean
Whether more results are available

Create a quality target

Create a new quality target for a project.
const target = await avala.qualityTargets.create('project-uid', {
  name: 'Minimum Accuracy',
  metric: 'accuracy',
  operator: 'gte',
  threshold: 0.95,
  severity: 'high',
  isActive: true,
  notifyWebhook: true,
  notifyEmails: ['[email protected]']
});

Parameters

projectUid
string
required
The unique identifier of the project
options.name
string
required
Name of the quality target
options.metric
string
required
Metric to monitor (e.g., ‘accuracy’, ‘precision’, ‘recall’, ‘f1_score’)
options.operator
string
required
Comparison operator (‘gte’ for greater than or equal, ‘lte’ for less than or equal, ‘gt’ for greater than, ‘lt’ for less than, ‘eq’ for equal)
options.threshold
number
required
Threshold value for the metric
options.severity
string
Severity level when breached (e.g., ‘low’, ‘medium’, ‘high’, ‘critical’)
options.isActive
boolean
Whether the target is active
options.notifyWebhook
boolean
Whether to send webhook notifications when breached
options.notifyEmails
string[]
Email addresses to notify when breached

Returns

Returns the created quality target object.
uid
string
Unique identifier for the target
name
string
Name of the target
metric
string
Metric being monitored
operator
string
Comparison operator
threshold
number
Threshold value
severity
string | null
Severity level
isActive
boolean
Whether the target is active
notifyWebhook
boolean
Whether webhook notifications are enabled
notifyEmails
string[]
Email notification recipients
lastEvaluatedAt
string | null
ISO 8601 timestamp of last evaluation
lastValue
number | null
Last measured value
isBreached
boolean
Whether the target is currently breached
breachCount
number
Number of times the target has been breached
lastBreachedAt
string | null
ISO 8601 timestamp of last breach
createdAt
string | null
ISO 8601 timestamp of creation
updatedAt
string | null
ISO 8601 timestamp of last update

Get a quality target

Retrieve a specific quality target.
const target = await avala.qualityTargets.get('project-uid', 'target-uid');

Parameters

projectUid
string
required
The unique identifier of the project
uid
string
required
The unique identifier of the quality target

Returns

Returns the quality target object.

Update a quality target

Update an existing quality target.
const target = await avala.qualityTargets.update('project-uid', 'target-uid', {
  threshold: 0.98,
  isActive: false,
  severity: 'critical'
});

Parameters

projectUid
string
required
The unique identifier of the project
uid
string
required
The unique identifier of the target to update
options.name
string
New name for the target
options.metric
string
New metric to monitor
options.operator
string
New comparison operator
options.threshold
number
New threshold value
options.severity
string
New severity level
options.isActive
boolean
Whether the target should be active
options.notifyWebhook
boolean
Whether to enable webhook notifications
options.notifyEmails
string[]
New email notification recipients

Returns

Returns the updated quality target object.

Delete a quality target

Delete a quality target.
await avala.qualityTargets.delete('project-uid', 'target-uid');

Parameters

projectUid
string
required
The unique identifier of the project
uid
string
required
The unique identifier of the target to delete

Returns

Returns void on success.

Evaluate quality targets

Evaluate all quality targets for a project and get current results.
const evaluations = await avala.qualityTargets.evaluate('project-uid');

Parameters

projectUid
string
required
The unique identifier of the project

Returns

Returns an array of quality target evaluation results.
[].uid
string
Quality target UID
[].name
string
Target name
[].metric
string
Metric name
[].threshold
number
Threshold value
[].operator
string
Comparison operator
[].currentValue
number
Current measured value
[].isBreached
boolean
Whether the target is breached
[].severity
string | null
Severity level

Build docs developers (and LLMs) love