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 { data: annotationConfigs, pagination } = await listAnnotationConfigs({
space: "my-space", // space name or ID (optional)
name: "accuracy", // substring filter on annotation config name (optional)
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";
// By ID
const annotationConfig = await getAnnotationConfig({
annotationConfig: "your_annotation_config_id",
});
// By name (requires space)
const annotationConfig = await getAnnotationConfig({
annotationConfig: "Accuracy",
space: "my-space",
});
Delete Annotation Config
import { deleteAnnotationConfig } from "@arizeai/ax-client";
// By ID
await deleteAnnotationConfig({
annotationConfig: "your_annotation_config_id",
});
// By name (requires space)
await deleteAnnotationConfig({
annotationConfig: "Accuracy",
space: "my-space",
});