Skip to main content
The annotation_configs functions are currently in BETA. The API may change without notice. A one-time warning is emitted on first use.
Create custom labels that can be added to represent this human feedback. Annotation configs allow teams and subject matter experts to label data and curate high-quality datasets.

List Annotation Configs

import { listAnnotationConfigs } from "@arizeai/ax-client";

const annotationConfigs = await listAnnotationConfigs({
  space: "your_space_id",
  limit: 10,
});

Create Annotation Config

import { createAnnotationConfig } from "@arizeai/ax-client";

const annotationConfig = await createAnnotationConfig({
  name: "Accuracy",
  space: "your_space_id",
  type: "categorical",
  values: [
    { label: "accurate", score: 1 },
    { label: "inaccurate", score: 0 },
  ],
  optimizationDirection: "maximize",
});

Get Annotation Config

import { getAnnotationConfig } from "@arizeai/ax-client";

const annotationConfig = await getAnnotationConfig({
  annotationConfig: "your_annotation_config_id",
});

Delete Annotation Config

import { deleteAnnotationConfig } from "@arizeai/ax-client";

await deleteAnnotationConfig({
  annotationConfig: "your_annotation_config_id",
});