Skip to content

Solo Mode

One annotator plus an LLM, labeling a dataset that would normally need a team.

Using a HuggingFace model? See Using HuggingFace Models in Potato for wiring solo_mode.labeling_models[] to an HF-hosted model.

Overview

A human annotator and an LLM work the same queue. The LLM proposes, the human corrects, and each correction feeds back into the prompt. As the two converge, the human hands over more of the queue until the LLM finishes the rest on its own.

Key Features

  • Prompt Synthesis: Automatically generate annotation guidelines from task descriptions
  • Edge Case Testing: Generate and label difficult examples to refine prompts
  • Parallel Annotation: Human and LLM annotate simultaneously
  • Disagreement Resolution: Resolve conflicts between human and LLM labels
  • Uncertainty-Based Selection: Prioritize instances where LLM is uncertain
  • Progressive Autonomy: Transition to autonomous LLM labeling as agreement improves
  • Final Validation: Validate a sample of LLM-only labels
  • Edge Case Rule Discovery: Co-DETECT-inspired automatic rule extraction from low-confidence predictions
  • Labeling Functions: ALCHEmist-style pattern extraction for zero-cost labeling via majority voting
  • Confidence Routing: Cascaded model escalation from cheap to expensive models
  • Refinement Loop: Automated confusion analysis → guideline suggestion → prompt revision cycles
  • Confusion Analysis: Enriched confusion patterns with root cause analysis
  • Prompt Optimizer: DSPy-style automatic prompt improvement from labeled examples

Configuration

Enable Solo Mode in your project's config.yaml:

solo_mode:
  enabled: true

  # Models for labeling (tried in order)
  labeling_models:
    - endpoint_type: "anthropic"
      model: "claude-haiku-4-5-20251001"
      api_key: "${ANTHROPIC_API_KEY}"
    - endpoint_type: "openai"
      model: "gpt-4o-mini"
      api_key: "${OPENAI_API_KEY}"

  # Models for prompt revision
  revision_models:
    - endpoint_type: "anthropic"
      model: "claude-haiku-4-5-20251001"

  # Uncertainty estimation strategy
  uncertainty:
    strategy: "direct_confidence"  # Options: direct_confidence, direct_uncertainty, token_entropy, sampling_diversity
    sampling_diversity:            # Read only for sampling_diversity, and only under this block
      num_samples: 5
      temperature: 1.0

  # Thresholds
  thresholds:
    end_human_annotation_agreement: 0.90    # Required agreement rate to stop human annotation
    minimum_validation_sample: 50           # Minimum compared items before ending (an item re-labelled under a new prompt still counts once)
    confidence_low: 0.5                     # Low confidence threshold
    confidence_high: 0.8                    # High confidence threshold
    periodic_review_interval: 100           # Review LLM labels every N instances

  # Instance selection weights (normalized to sum to 1.0, with a warning, if they do not)
  instance_selection:
    low_confidence_weight: 0.4    # Prioritize uncertain instances
    diversity_weight: 0.3         # Prioritize diverse instances
    random_weight: 0.2            # Random sample for calibration
    disagreement_weight: 0.1      # Prioritize prior disagreements

  # Batch sizes
  batches:
    llm_labeling_batch: 50        # Instances to label per batch
    max_parallel_labels: 200       # Max LLM labels ahead of human

  # Prompt optimization (optional)
  prompt_optimization:
    enabled: true
    find_smallest_model: true
    target_accuracy: 0.85

Workflow Phases

Solo Mode progresses through twelve phases, plus a terminal completed state. The phase machine is SoloPhase in potato/solo_mode/phase_controller.py; not every path visits every phase.

1. Setup

  • Enter task description. The setup page has no data upload: items come from the config's data_files.
  • Generate initial prompt: a revision model (revision_models) writes it from the description and the schemes. Without one, or if it gives nothing back, the description itself becomes the first prompt, and the prompt history says so.

2. Prompt Review

  • Review and edit the generated prompt
  • Add clarifying examples
  • Refine edge case handling

3. Edge Case Synthesis

  • LLM generates difficult examples
  • Examples test boundary conditions
  • Helps identify prompt weaknesses

4. Edge Case Labeling

  • Label the synthesized edge cases
  • Labels used to improve prompt
  • Validates prompt clarity

5. Prompt Validation

  • LLM relabels edge cases with improved prompt
  • Verify prompt improvements work
  • Iterate if necessary

6. Parallel Annotation

  • Human and LLM annotate simultaneously
  • LLM labels instances in background
  • Human labels prioritized instances

7. Disagreement Resolution

  • Review instances where human and LLM disagree
  • Decide on correct label
  • Improve understanding of edge cases

8. Active Annotation

  • The main annotation phase
  • The human labels prioritized instances while the LLM labels in the background
  • Returns here from periodic review, rule review, and a failed final validation

9. Periodic Review

  • Periodically review low-confidence LLM labels
  • Approve or correct predictions
  • Maintain quality during autonomous phase

10. Rule Review

  • Review the edge case rules discovered from low-confidence labels
  • Approve or reject each clustered rule category
  • Send the prompt back for revision if the rules point at a larger problem

11. Autonomous Labeling

  • Starts when agreement reaches end_human_annotation_agreement over at least minimum_validation_sample compared items. The check runs after every human label and on every load of the annotate page, so the hand-over happens even if the human still has items queued. From then on the annotate page sends the human to the status page.
  • The LLM labels the remaining instances. max_parallel_labels does not apply in this phase, because there is no human left to stay level with.
  • Human monitors progress
  • A server restart in this phase resumes labelling where it stopped.

12. Final Validation

  • Validate sample of LLM-only labels
  • Confirm quality meets standards
  • Export final dataset
  • Failing validation returns the project to active annotation

Uncertainty Estimation

Solo Mode uses uncertainty estimation to prioritize which instances the human should label. Four strategies are available:

Direct Confidence

Asks the LLM to rate its confidence (0-100). Simple and works with all models.

uncertainty:
  strategy: "direct_confidence"

Direct Uncertainty

Asks the LLM to rate its uncertainty directly. Alternative framing that may work better for some models.

uncertainty:
  strategy: "direct_uncertainty"

Token Entropy

Uses entropy of answer token probabilities. More objective but requires logprobs support (OpenAI, vLLM).

uncertainty:
  strategy: "token_entropy"

Sampling Diversity

Runs the LLM multiple times at high temperature and measures label diversity. Most accurate but expensive.

uncertainty:
  strategy: "sampling_diversity"
  sampling_diversity:
    num_samples: 5
    temperature: 1.0

num_samples and temperature are read only from the nested sampling_diversity block. Flat uncertainty.num_samples or uncertainty.sampling_temperature keys are ignored.

Instance Selection

Instances are selected for human annotation using a weighted mixture:

Pool Weight Description
Low Confidence 40% Instances where LLM is uncertain
Diverse 30% Instances from different embedding clusters
Random 20% Random sample for calibration
Disagreement 10% Instances with prior human-LLM disagreement

Adjust weights in config:

instance_selection:
  low_confidence_weight: 0.4
  diversity_weight: 0.3
  random_weight: 0.2
  disagreement_weight: 0.1

API Endpoints

Solo Mode provides API endpoints for monitoring and control. Every endpoint needs a logged-in session; an anonymous request gets 401. GET /solo/api/export needs admin access instead: the X-API-Key header with admin_api_key, or a role that can view the admin dashboard. It returns every annotation and the full prompt history.

Status

GET /solo/api/status
Returns current phase, annotation stats, agreement metrics.

Prompts

GET /solo/api/prompts
Returns prompt version history.

Predictions

GET /solo/api/predictions
Returns all LLM predictions.

Control

POST /solo/api/advance-phase
POST /solo/api/pause-labeling
POST /solo/api/resume-labeling
POST /solo/api/optimize-prompt

Spend, evaluation and jobs

GET  /solo/api/spend
GET  /solo/api/gold
POST /solo/api/gold/evaluate
POST /solo/api/prompt/try
POST /solo/api/sensitivity
GET  /solo/api/sensitivity/latest
GET  /solo/api/jobs/<id>
The POST routes start a background job and return it with HTTP 202. Poll /solo/api/jobs/<id> for done of total and the result. See Gold Set and Trials and Prompt Sensitivity.

Export

GET /solo/api/export
Exports all annotations and predictions. Admin only.

curl -H "X-API-Key: $ADMIN_KEY" http://localhost:8000/solo/api/export

Best Practices

Writing Good Task Descriptions

  1. Be specific about what you're labeling
  2. Define each label clearly
  3. Explain what makes something ambiguous
  4. Include examples of edge cases

Prompt Refinement

  1. Start with the generated prompt
  2. Add examples for difficult cases
  3. Clarify ambiguous criteria
  4. Keep prompts concise but complete

Monitoring Progress

  1. Check agreement rate regularly
  2. Review confusion patterns
  3. Adjust prompts when accuracy drops
  4. Validate LLM-only labels periodically

Advanced Features

Solo Mode includes several advanced subsystems for automated quality improvement, cost optimization, and deeper analysis. These features work together to progressively refine annotation quality with minimal human effort.

Key advanced capabilities include: - Edge case rule discovery and labeling functions for reducing LLM API costs - Confidence routing for cascading instances through cheap-to-expensive model tiers - Automated refinement loops that analyze confusion patterns and revise prompts - Schema-specific agreement thresholds for Likert, multiselect, text, and span annotations - Blind suggestions, which measure how much seeing the LLM's answer moves yours, and hand over on blind agreement - A spend cap that refuses a labeling run before it would pass ai_budget.cap_usd, and a response cache so a repeated call is not paid for twice - Decision models (Laya, Jev, OpenJev) that label fixed-choice schemes in one pass, as a fast first tier - Gold-set scoring and trials of a prompt before the full run, and a prompt-sensitivity check - A labeling jury, in which several models vote on each item - Curriculum ordering, which starts you on the items the LLM found easiest

For full configuration details, see Solo Mode Advanced Features.

Troubleshooting

Low Agreement Rate

  • Check if labels are clearly defined
  • Review confusion patterns to find systematic errors
  • Add examples for problematic cases
  • Consider splitting ambiguous categories

LLM Not Labeling

  • Verify API credentials are correct
  • Check model availability
  • Review logs for errors
  • Try fallback models

Slow Performance

  • Reduce batch sizes
  • Use faster models for labeling
  • Limit parallel labels

Example Project

See examples/advanced/solo-mode/ for a complete working example.

Developer Documentation

For extending Solo Mode or understanding the implementation, see the Solo Mode Developer Guide.