AI सपोर्ट
बुद्धिमान annotation सहायता के लिए LLMs को एकीकृत करें।
Potato 2.0 में annotators को बुद्धिमान hints, keyword highlighting, और label suggestions के साथ सहायता करने के लिए Large Language Models (LLMs) के लिए built-in support शामिल है।
समर्थित Providers
Potato कई LLM providers का समर्थन करता है:
Cloud Providers:
- OpenAI (GPT-4, GPT-4 Turbo, GPT-3.5)
- Anthropic (Claude 3, Claude 3.5)
- Google (Gemini 1.5 Pro, Gemini 2.0 Flash)
- Hugging Face
- OpenRouter
Local/Self-Hosted:
- Ollama (models locally चलाएँ)
- vLLM (high-performance self-hosted inference)
कॉन्फ़िगरेशन
बुनियादी सेटअप
अपनी configuration file में ai_support section जोड़ें:
ai_support:
enabled: true
endpoint_type: "openai"
ai_config:
model: "gpt-4o-mini"
api_key: "${OPENAI_API_KEY}"
temperature: 0.7
max_tokens: 800
include:
all: trueProvider-Specific कॉन्फ़िगरेशन
OpenAI
instance_display:
fields:
- {key: body, type: text, label: Ticket}
- {key: screenshot, type: image, label: Screenshot}Anthropic Claude
ai_support:
enabled: true
endpoint_type: "openai"
ai_config:
model: "gpt-4o-mini"
api_key: "${OPENAI_API_KEY}"
include:
all: false
special_include:
"0":
"0": ["hint", "keyword"]
"1":
"1": ["hint"]
"2":
"0": ["hint", "keyword"]
"1": ["hint", "keyword"]Google Gemini
ai_support:
enabled: true
endpoint_type: "openai"
ai_config:
model: "gpt-4o-mini"
api_key: "${OPENAI_API_KEY}"
include:
all: true
cache_config:
disk_cache:
enabled: true
path: "annotation_output/ai_cache.json"
prefetch:
warm_up_page_count: 20
on_next: 10
on_prev: 3Local Ollama
# config.yaml, committed, no secrets
ai_support:
enabled: true
ai_config_file: ai-config.yaml
ai_config:
temperature: 0.7
max_tokens: 800
include:
all: truevLLM (Self-Hosted)
# ai-config.yaml, gitignored
endpoint_type: ollama
model: qwen3:0.6b
base_url: http://localhost:11434Visual AI Endpoints
v2.1.0 में नया
Image और video annotation tasks के लिए, Potato YOLO, Ollama Vision, OpenAI Vision, और Anthropic Vision सहित dedicated vision endpoints का समर्थन करता है। ये object detection, pre-annotation, और visual classification सक्षम करते हैं।
पूर्ण कॉन्फ़िगरेशन विवरण के लिए Visual AI सपोर्ट देखें।
AI Features
Potato का AI support पाँच प्राथमिक क्षमताएँ प्रदान करता है:
1. बुद्धिमान Hints
उत्तर प्रकट किए बिना annotators को contextual guidance प्रदान करें:
ai_support:
enabled: true
endpoint_type: "openai"
ai_config:
model: "gpt-4o-mini"
api_key: "${OPENAI_API_KEY}"
temperature: 0.7
max_tokens: 800
include:
all: true2. Keyword Highlighting
Text में relevant keywords को स्वचालित रूप से highlight करें:
ai_support:
enabled: true
endpoint_type: "anthropic"
ai_config:
model: "claude-sonnet-4-20250514"
api_key: "${ANTHROPIC_API_KEY}"
temperature: 0.7
max_tokens: 800
include:
all: true3. Label Suggestions
Annotator के विचार के लिए labels suggest करें (confidence indicators के साथ दिखाएँ):
ai_support:
enabled: true
endpoint_type: "gemini"
ai_config:
model: "gemini-2.0-flash-exp"
api_key: "${GOOGLE_API_KEY}"
max_tokens: 800
include:
all: true4. Label Rationales
v2.1.0 में नया
प्रत्येक label text पर क्यों लागू हो सकता है, इसके लिए संतुलित स्पष्टीकरण generate करें, annotators को विभिन्न classifications के पीछे के reasoning को समझने में मदद करें:
ai_support:
enabled: true
endpoint_type: "ollama"
ai_config:
model: "llama3.2"
base_url: "http://localhost:11434"
max_tokens: 800
include:
all: trueRationales एक tooltip के रूप में दिखाई देते हैं जो प्रत्येक उपलब्ध label और यह क्यों लागू हो सकता है, इसकी व्याख्या सूचीबद्ध करती है। यह annotators को प्रशिक्षित करते समय या जब annotation निर्णय कठिन हों तब उपयोगी है।
5. Option Highlighting
v2.2.0 में नया
Discrete annotation tasks (radio, multiselect, likert, select) के लिए सबसे अधिक संभावित सही options की AI-assisted highlighting। सिस्टम content का विश्लेषण करता है और top-k संभावित options को highlight करता है जबकि कम-संभावित ones को dim करता है, सभी options पूरी तरह clickable रहते हुए।
ai_support:
enabled: true
endpoint_type: "vllm"
ai_config:
model: "meta-llama/Llama-3.2-3B-Instruct"
base_url: "http://localhost:8000"
max_tokens: 800
include:
all: trueपूर्ण कॉन्फ़िगरेशन विवरण के लिए विकल्पों की हाइलाइटिंग देखें।
पूरक: Diversity Ordering
v2.2.0 में नया
हालांकि यह strictly एक AI feature नहीं है, विविधता क्रम items को cluster करने और उन्हें diverse order में प्रस्तुत करने के लिए sentence-transformer embeddings का उपयोग करता है, annotator fatigue कम करता है और coverage सुधारता है। यह reordered items के लिए AI hints को स्वचालित रूप से prefetch करके AI support के साथ एकीकृत होता है।
Caching और प्रदर्शन
AI responses को प्रदर्शन सुधारने और API costs कम करने के लिए cache किया जा सकता है:
ai_support:
enabled: true
endpoint_type: "open_router"
ai_config:
model: "openai/gpt-4o-mini"
api_key: "${OPENROUTER_API_KEY}"
max_tokens: 800
include:
all: trueCaching Strategies
- Warmup: Server शुरू होने पर instances के प्रारंभिक batch के लिए AI hints pre-generate करता है (
warm_up_page_count) - Prefetch: Annotators आगे (
on_next) या पीछे (on_prev) navigate करते समय upcoming instances के लिए hints generate करता है - Disk Persistence: Caches disk पर सहेजे जाते हैं और server restarts के बाद persist करते हैं
Custom Prompts
Potato में प्रत्येक annotation type के लिए default prompts potato/ai/prompt/ में संग्रहीत हैं। आप इन्हें अपने विशिष्ट task के लिए customize कर सकते हैं:
| Annotation Type | Prompt File |
|---|---|
| Radio buttons | radio_prompt.txt |
| Likert scales | likert_prompt.txt |
| Checkboxes | checkbox_prompt.txt |
| Span annotation | span_prompt.txt |
| Sliders | slider_prompt.txt |
| Dropdowns | dropdown_prompt.txt |
| Number input | number_prompt.txt |
| Text input | text_prompt.txt |
Prompts variable substitution का समर्थन करते हैं:
{text}- दस्तावेज़ text{labels}- scheme के लिए उपलब्ध labels{description}- scheme description
बहु-Schema समर्थन
कई annotation schemes वाले tasks के लिए, आप AI support को चुनिंदा रूप से सक्षम कर सकते हैं:
ai_support:
enabled: true
endpoint_type: "ollama"
visual_endpoint_type: "ollama_vision"
ai_config:
model: "llama3.2"
include:
all: true
visual_ai_config:
model: "qwen2.5-vl:7b"पूर्ण उदाहरण
AI-assisted sentiment analysis के लिए पूर्ण कॉन्फ़िगरेशन:
annotation_task_name: "Sentiment Analysis with AI Support"
task_dir: "."
data_files:
- "data/reviews.json"
item_properties:
id_key: id
text_key: text
annotation_schemes:
- annotation_type: radio
name: sentiment
description: "What is the sentiment of this text?"
labels: ["positive", "negative", "neutral"]
- annotation_type: multiselect
name: topics
description: "What topics are discussed?"
labels: ["product", "service", "price", "quality"]
ai_support:
enabled: true
endpoint_type: "openai"
ai_config:
model: "gpt-4o-mini"
api_key: "${OPENAI_API_KEY}"
temperature: 0.7
max_tokens: 800
include:
all: true
cache_config:
disk_cache:
enabled: true
path: "annotation_output/ai_cache.json"
prefetch:
warm_up_page_count: 20
on_next: 10
on_prev: 3
output_annotation_dir: "output/"
export_annotation_format: jsonl
user_config:
allow_all_users: trueEnvironment Variables
Environment variables का उपयोग करके API keys सुरक्षित रूप से संग्रहीत करें:
export OPENAI_API_KEY="sk-..."
export ANTHROPIC_API_KEY="sk-ant-..."
export GOOGLE_API_KEY="..."अपने config में ${VARIABLE_NAME} syntax के साथ इन्हें reference करें।
लागत संबंधी विचार
- AI calls default रूप से प्रति-instance की जाती हैं
- बार-बार API calls कम करने के लिए caching सक्षम करें
- Hints pre-generate करने के लिए warmup और prefetch का उपयोग करें
- सरल tasks के लिए छोटे/सस्ते models का उपयोग करने पर विचार करें
- Local providers (Ollama, vLLM) में कोई API costs नहीं हैं
सर्वोत्तम प्रथाएँ
- AI को सहायता के रूप में उपयोग करें, प्रतिस्थापन के रूप में नहीं - Annotators को अंतिम निर्णय लेने दें
- Production के लिए caching सक्षम करें - Latency और costs कम करता है
- Prompts को अच्छी तरह test करें - Custom prompts को validate किया जाना चाहिए
- API costs की निगरानी करें - विशेष रूप से cloud providers के साथ usage ट्रैक करें
- Local providers पर विचार करें - High-volume annotation के लिए Ollama या vLLM
- API credentials सुरक्षित रखें - Environment variables का उपयोग करें, keys कभी commit न करें
आगे पढ़ें
- विकल्पों की हाइलाइटिंग - AI-assisted option guidance
- विविधता क्रम - Embedding-based item diversification
- Visual AI सपोर्ट - Image और video annotation के लिए AI
- ICL लेबलिंग - AI-assisted in-context learning
- सक्रिय अधिगम (Active Learning) - ML-based instance prioritization
- उत्पादकता सुविधाएँ - Keyword highlights और suggestions
कार्यान्वयन विवरण और custom prompt templates के लिए, स्रोत दस्तावेज़ देखें।