Overview
The Labellerr SDK uses Pydantic schemas to define annotation questions. Use the
AnnotationQuestion schema to create type-safe questions for object-based annotations (bounding boxes, polygons, etc.) and classification workflows (dropdowns, radio buttons, etc.).Required Question Structure
Using AnnotationQuestion Schema
Every question must be defined using the
AnnotationQuestion schema with the following fields:| Field | Type | Required | Description |
|---|---|---|---|
question_number | int | Yes | Sequential number for the question (1, 2, 3, …) |
question_id | str | Yes | Unique identifier (UUID) - generate with str(uuid.uuid4()) |
question | str | Yes | The user-facing label or prompt |
question_type | QuestionType | Yes | Enum value (e.g., QuestionType.polygon, QuestionType.dropdown) |
required | bool | Yes | Set to True if the annotator must answer |
color | str | Conditional | Required for object types (bounding_box, polygon, polyline, dot) |
options | List[Option] | Conditional | Required for classification types (dropdown, radio, select, boolean) |
Object-based questions (bounding_box, polygon, polyline, dot) require a
color parameter (hex code).Classification questions (dropdown, radio, select, boolean) require options as a list of Option objects.Input questions don’t require either color or options.Question Types Reference
Available Question Types
Available Question Types
Object-Based Annotations:
QuestionType.bounding_box- Rectangle annotationsQuestionType.polygon- Multi-point polygon shapesQuestionType.polyline- Connected line segmentsQuestionType.dot- Single point markers
QuestionType.dropdown- Single selection dropdownQuestionType.radio- Radio button selectionQuestionType.select- Multi-select optionsQuestionType.boolean- Yes/No toggleQuestionType.input- Free text input
QuestionType.stt- Speech-to-textQuestionType.imc- Image classification
Examples
Multiple Questions Template
Create a template with multiple question types including object detection and classification:
Single Question Template
Create a simple template with a single annotation question:
Classification Only Template
Create a template with only classification questions (no object detection):
Best Practices
Unique Question IDs
Always generate unique question IDs using
str(uuid.uuid4()) to avoid conflicts. Reuse IDs only when intentionally updating an existing question.Sequential Numbering
Ensure
question_number values are sequential (1, 2, 3, …) to maintain proper ordering in the annotation interface.Color Selection
Use distinct hex colors for different object types to make them easily distinguishable in the annotation interface.
Clear Labels
Write concise, descriptive question text that clearly communicates what annotators should label.
Related Documentation
Create Projects
Learn how to create projects using annotation templates

