Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.verial.ai/llms.txt

Use this file to discover all available pages before exploring further.

Tasks are individual test cases within a Benchmark. Each task references a set of Criteria that the verification engine runs after the rollout to score the task.

Endpoints

MethodEndpointDescription
GET/tasks?benchmark_id={benchmark_id}List tasks for a benchmark
POST/tasksCreate a task
GET/tasks/{id}Get task details (includes criteria array)
PATCH/tasks/{id}Update a task
DELETE/tasks/{id}Delete a task
GET/tasks/{id}/entitiesList DatasetEntities bound to the task
POST/tasks/{id}/entitiesBind a DatasetEntity to the task
DELETE/tasks/{id}/entities/{entityId}Unbind a DatasetEntity

Task Object

FieldTypeDescription
idstringUnique identifier
benchmark_idstringParent Benchmark
namestringTask name
timeoutnumber | nullTask-level timeout override in seconds
tagsstring[]Tags for filtering
task_itemobject | nullStructured task payload (for example instruction, trigger, expected inputs)
scenarioobject | nullOptional pre-rollout scenario steps run by the scenario runner
created_atdatetimeCreation timestamp
The GET /tasks/{id} response also returns a criteria array. Each entry has id, task_id, label, assertion, weight, and created_at. See Criteria for the assertion shape.

SDK Example

// Create a task
const task = await verial.tasks.create({
  benchmarkId: "bench_abc123",
  name: "Submit Prior Auth for MRI",
  taskItem: {
    instruction: "Submit a prior authorization for an MRI of the lumbar spine",
  },
  tags: ["prior-auth", "imaging"],
});

// Attach criteria (see Criteria resource)
await verial.criteria.create({
  taskId: task.id,
  label: "Prior auth submitted",
  weight: 1.0,
  assertion: {
    assert: "portal-state-match",
    correlate_by: { resource: "prior_auth_requests", key: "request_id" },
    assertions: [{ path: "status", expected: "submitted" }],
  },
});

// List tasks for a benchmark
const tasks = await verial.tasks.list({ benchmarkId: "bench_abc123" });

// Get a specific task with its criteria
const details = await verial.tasks.get({ id: task.id });