Skip to content

Esquemas de Anotação

Defina esquemas de anotação em YAML — radio, checkbox, span, likert, slider, text e mais de 25 outros tipos. Configure rótulos, perguntas, campos obrigatórios e opções de exibição.

Os esquemas de anotação definem as tarefas de rotulagem para os seus anotadores. O Potato oferece suporte a mais de 30 tipos de anotação que podem ser combinados para criar tarefas de anotação complexas.

Estrutura Básica

Cada esquema é definido no array annotation_schemes:

yaml
annotation_schemes:
  - annotation_type: radio
    name: sentiment
    description: "What is the sentiment?"
    labels:
      - Positive
      - Negative
      - Neutral

Campos Obrigatórios

CampoDescrição
annotation_typeTipo de anotação (radio, multiselect, likert, span, text, number, slider, multirate, select, pairwise, best_worst, soft_label, confidence_annotation, constant_sum, range_slider, semantic_differential, hierarchical_multiselect, card_sort, rubric_eval, extractive_qa, error_span, triage, coreference, span_link, entity_linking e mais)
nameIdentificador interno (sem espaços, usado na saída)
descriptionInstruções mostradas aos anotadores

Tipos de Anotação Suportados

1. Radio (Escolha Única)

Selecione exatamente uma opção de uma lista:

yaml
- annotation_type: radio
  name: sentiment
  description: "What is the sentiment of this text?"
  labels:
    - Positive
    - Negative
    - Neutral
 
  # Optional features
  keyboard_shortcuts:
    Positive: "1"
    Negative: "2"
    Neutral: "3"
 
  # Or use sequential binding (1, 2, 3... automatically)
  sequential_key_binding: true
 
  # Horizontal layout instead of vertical
  horizontal: true

2. Escala Likert

Escalas de avaliação com extremos rotulados:

yaml
- annotation_type: likert
  name: agreement
  description: "How much do you agree with this statement?"
  size: 5  # Number of scale points
  min_label: "Strongly Disagree"
  max_label: "Strongly Agree"
 
  # Optional mid-point label
  mid_label: "Neutral"
 
  # Show numeric values
  show_numbers: true

3. Multiselect (Escolha Múltipla)

Selecione várias opções de uma lista:

yaml
- annotation_type: multiselect
  name: topics
  description: "Select all relevant topics"
  labels:
    - Politics
    - Technology
    - Sports
    - Entertainment
    - Science
 
  # Selection constraints
  min_selections: 1
  max_selections: 3
 
  # Allow free text response
  free_response: true
  free_response_label: "Other (specify)"

4. Anotação de Span

Destaque e rotule segmentos de texto:

yaml
- annotation_type: span
  name: entities
  description: "Highlight named entities in the text"
  labels:
    - PERSON
    - ORGANIZATION
    - LOCATION
    - DATE
 
  # Visual customization
  label_colors:
    PERSON: "#3b82f6"
    ORGANIZATION: "#10b981"
    LOCATION: "#f59e0b"
    DATE: "#8b5cf6"
 
  # Allow overlapping spans
  allow_overlapping: false
 
  # Keyboard shortcuts for labels
  sequential_key_binding: true

5. Slider

Intervalo numérico contínuo:

yaml
- annotation_type: slider
  name: confidence
  description: "How confident are you in your answer?"
  min: 0
  max: 100
  step: 1
  default: 50
 
  # Endpoint labels
  min_label: "Not confident"
  max_label: "Very confident"
 
  # Show current value
  show_value: true

6. Entrada de Texto

Respostas de texto livre:

yaml
- annotation_type: text
  name: explanation
  description: "Explain your reasoning"
 
  # Multi-line input
  textarea: true
 
  # Character limits
  min_length: 10
  max_length: 500
 
  # Placeholder text
  placeholder: "Enter your explanation here..."
 
  # Disable paste (for transcription tasks)
  disable_paste: true

7. Entrada Numérica

Entrada numérica com restrições:

yaml
- annotation_type: number
  name: count
  description: "How many entities are mentioned?"
  min: 0
  max: 100
  step: 1
  default: 0

8. Multirate (Avaliação em Matriz)

Avalie vários itens na mesma escala:

yaml
- annotation_type: multirate
  name: quality_aspects
  description: "Rate each aspect of the response"
  items:
    - Accuracy
    - Clarity
    - Completeness
    - Relevance
  size: 5  # Scale points
  min_label: "Poor"
  max_label: "Excellent"
 
  # Randomize item order
  randomize: true
 
  # Layout options
  compact: false

Opções Comuns

Atalhos de Teclado

Acelere a anotação com atalhos de teclado:

yaml
# Manual shortcuts
keyboard_shortcuts:
  Positive: "1"
  Negative: "2"
  Neutral: "3"
 
# Or automatic sequential binding
sequential_key_binding: true  # Assigns 1, 2, 3...

Tooltips

Forneça dicas ao passar o mouse sobre os rótulos:

yaml
tooltips:
  Positive: "Expresses happiness, approval, or satisfaction"
  Negative: "Expresses sadness, anger, or disappointment"
  Neutral: "No clear emotional content"

Cores dos Rótulos

Cores personalizadas para distinção visual:

yaml
label_colors:
  PERSON: "#3b82f6"
  LOCATION: "#10b981"
  ORGANIZATION: "#f59e0b"

Campos Obrigatórios

Torne um esquema obrigatório antes do envio:

yaml
- annotation_type: radio
  name: sentiment
  required: true
  labels:
    - Positive
    - Negative

Múltiplos Esquemas

Combine vários tipos de anotação por instância:

yaml
annotation_schemes:
  # Primary classification
  - annotation_type: radio
    name: sentiment
    description: "Overall sentiment"
    labels:
      - Positive
      - Negative
      - Neutral
    required: true
    sequential_key_binding: true
 
  # Confidence rating
  - annotation_type: likert
    name: confidence
    description: "How confident are you?"
    size: 5
    min_label: "Guessing"
    max_label: "Certain"
 
  # Topic tags
  - annotation_type: multiselect
    name: topics
    description: "Select all relevant topics"
    labels:
      - Politics
      - Technology
      - Sports
      - Entertainment
    free_response: true
 
  # Notes
  - annotation_type: text
    name: notes
    description: "Any additional observations?"
    textarea: true
    required: false

Recursos Avançados

Comparação Pareada

Compare dois itens:

yaml
- annotation_type: pairwise
  name: preference
  description: "Which response is better?"
  options:
    - label: "Response A"
      value: "A"
    - label: "Response B"
      value: "B"
    - label: "Equal"
      value: "tie"
 
  # Allow tie selection
  allow_tie: true

Best-Worst Scaling

Classifique itens selecionando o melhor e o pior:

yaml
- annotation_type: best_worst
  name: ranking
  description: "Select the best and worst items"
  # Items come from the data file

Seleção única que economiza espaço:

yaml
- annotation_type: select
  name: category
  description: "Select a category"
  labels:
    - Category A
    - Category B
    - Category C
    - Category D
    - Category E
 
  # Default selection
  default: "Category A"

Referência de Formato de Dados

Entrada

Os esquemas de anotação funcionam com o seu formato de dados:

json
{
  "id": "doc_1",
  "text": "This is the text to annotate."
}

Saída

As anotações são salvas com os nomes dos esquemas como chaves:

json
{
  "id": "doc_1",
  "annotations": {
    "sentiment": "Positive",
    "confidence": 4,
    "topics": ["Technology", "Science"],
    "entities": [
      {"start": 0, "end": 4, "label": "ORGANIZATION", "text": "This"}
    ],
    "notes": "Clear positive sentiment about technology."
  }
}

Boas Práticas

1. Rótulos Claros

Use rótulos inequívocos e distintos:

yaml
# Good
labels:
  - Strongly Positive
  - Somewhat Positive
  - Neutral
  - Somewhat Negative
  - Strongly Negative
 
# Avoid
labels:
  - Good
  - OK
  - Fine
  - Acceptable

2. Tooltips Úteis

Adicione tooltips para rótulos com nuances:

yaml
tooltips:
  Sarcasm: "The text says the opposite of what it means"
  Irony: "A mismatch between expectation and reality"

3. Atalhos de Teclado

Ative atalhos para tarefas de alto volume:

yaml
sequential_key_binding: true

4. Ordem Lógica

Ordene os rótulos de forma consistente:

  • Mais comum primeiro
  • Em ordem alfabética
  • Por intensidade (de baixa para alta)

5. Limite as Opções

Opções em excesso tornam a anotação mais lenta:

  • Radio: 2-7 opções
  • Multiselect: 5-15 opções
  • Likert: 5-7 pontos

6. Teste Primeiro

Anote vários exemplos você mesmo antes de implantar para detectar:

  • Rótulos ambíguos
  • Categorias ausentes
  • Instruções pouco claras