Task types
Supported type values and how to shape label_spec and interpret consensus results.
| Type | label_spec | Use case |
|---|---|---|
image_classification | question + options[] | Categorize images at data_url |
text_classification | question + options[] | Categorize text fetched from data_url |
sentiment | question + options (e.g. positive / negative / neutral) | Sentiment |
moderation | question + options (e.g. safe / unsafe + sub-categories) | Content safety |
image_classification
{
"type": "image_classification",
"data_url": "https://cdn.example.com/photo.jpg",
"label_spec": {
"question": "Which product line?",
"options": ["electronics", "apparel", "food"]
}
}
Consensus result (illustrative):
{
"consensus_label": "electronics",
"confidence": 0.6666666666666666,
"worker_count": 3,
"agreement_count": 2
}
text_classification
{
"label_spec": {
"question": "Ticket priority?",
"options": ["P0", "P1", "P2", "P3"]
}
}
sentiment
{
"label_spec": {
"question": "Sentiment?",
"options": ["positive", "negative", "neutral"]
}
}
moderation
{
"label_spec": {
"question": "Is this content safe for the brand?",
"options": ["safe", "unsafe", "review"]
}
}
tip
Always provide at least two options. The consensus engine compares worker answers as strings; keep option labels stable across tasks for best agreement metrics.