Skip to content
Guides4 min read

अपने आप कीवर्ड उभारना

Potato में AI-आधारित कीवर्ड हाइलाइटिंग कॉन्फ़िगर कीजिए ताकि एनोटेटर का ध्यान ज़रूरी शब्दों पर जाए। इसमें OpenAI, Claude, और अपनी कीवर्ड सूची का कॉन्फ़िगरेशन शामिल है।

Potato Team

AI-आधारित कीवर्ड हाइलाइटिंग एनोटेटर की नज़र उन शब्दों, इकाइयों या पैटर्न की तरफ़ खींचती है जो किसी टेक्स्ट में मायने रखते हैं। यह गाइड Potato के भीतर मौजूद AI समर्थन से गुज़रती है और बताती है कि उसे कैसे सेट करें ताकि प्रासंगिक कीवर्ड अपने आप उभर आएँ।

कीवर्ड हाइलाइटिंग क्यों

यह एनोटेटर को टेक्स्ट के उस हिस्से तक ले जाती है जो असल में मायने रखता है, जिससे वे मुख्य जानकारी जल्दी ढूँढ़ लेते हैं और किसी ज़रूरी शब्द को सरसरी नज़र में छोड़ देने की गुंजाइश घटती है। हाइलाइटिंग किसी LLM से आती है, इसलिए वह शब्दों की एक जमी हुई सूची पर टिके रहने के बजाय हर आइटम के संदर्भ के मुताबिक ढल सकती है।

Potato की option और कीवर्ड हाइलाइटिंग भीतर से कैसे काम करती है, इसके लिए स्रोत दस्तावेज़ देखें।

बुनियादी AI-आधारित हाइलाइटिंग

ज़रूरी कीवर्ड ढूँढ़ने और उभारने के लिए Potato अपने AI समर्थन तंत्र पर टिकता है। यह रहा एक न्यूनतम config:

yaml
annotation_task_name: "Keyword Highlighted Annotation"
 
data_files:
  - path: "data/reviews.json"
    format: json
 
item_properties:
  id_key: id
  text_key: text
 
annotation_schemes:
  - annotation_type: radio
    name: sentiment
    description: "What is the overall sentiment?"
    labels:
      - Positive
      - Negative
      - Neutral
 
ai_support:
  enabled: true
  endpoint_type: openai
 
  ai_config:
 
  features:

AI कीवर्ड हाइलाइटिंग चालू होने पर एनोटेशन टेक्स्ट में प्रासंगिक शब्द अपने आप उभर आते हैं:

एनोटेशन इंटरफ़ेस में AI-आधारित कीवर्ड हाइलाइटिंगएनोटेटर का ध्यान ले जाने के लिए ज़रूरी कीवर्ड और इकाइयाँ अपने आप उभार दी जाती हैं

अलग-अलग AI प्रदाता इस्तेमाल करना

OpenAI

yaml
ai_support:
  enabled: true
  endpoint_type: openai
 
  ai_config:
    model: gpt-4o
    api_key: ${OPENAI_API_KEY}
    temperature: 0.3
    max_tokens: 500
 
  features:
    keyword_highlighting:
      enabled: true
 

Anthropic Claude

yaml
ai_support:
  enabled: true
  endpoint_type: anthropic
 
  ai_config:
    model: claude-3-sonnet-20240229
    api_key: ${ANTHROPIC_API_KEY}
    temperature: 0.3
    max_tokens: 500
 
  features:
    keyword_highlighting:
      enabled: true
      # Highlights are rendered as box overlays on the text

स्थानीय Ollama (कोई API ख़र्च नहीं)

yaml
ai_support:
  enabled: true
  endpoint_type: ollama
 
  ai_config:
    model: llama2
    base_url: http://localhost:11434
 
  features:
    keyword_highlighting:
      enabled: true
      # Highlights are rendered as box overlays on the text

सुविधाओं को जोड़ना

AI की ये सुविधाएँ एक-दूसरे पर चढ़ती हैं, और अकेले के मुक़ाबले साथ में ज़्यादा काम की रहती हैं:

yaml
ai_support:
  enabled: true
  endpoint_type: openai
 
  ai_config:
    model: gpt-4
    api_key: ${OPENAI_API_KEY}
    temperature: 0.3
    max_tokens: 500
 
  features:
    # Highlight important keywords
    keyword_highlighting:
      enabled: true
      # Highlights are rendered as box overlays on the text
 
    # Show contextual hints
    hints:
      enabled: true
 
    # Suggest labels for consideration
    label_suggestions:
      enabled: true
      show_confidence: true

पूरा कॉन्फ़िगरेशन उदाहरण

AI हाइलाइटिंग के साथ इकाई-सचेत एनोटेशन के लिए यह रहा पूरा config:

yaml
annotation_task_name: "Entity-Aware Annotation"
 
data_files:
  - path: "data/documents.json"
    format: json
 
item_properties:
  id_key: id
  text_key: text
 
annotation_schemes:
  - annotation_type: span
    name: entities
    labels:
      - name: PERSON
        color: "#FECACA"
      - name: ORG
        color: "#BBF7D0"
      - name: LOCATION
        color: "#BFDBFE"
 
ai_support:
  enabled: true
  endpoint_type: openai
 
  ai_config:
 
  features:
 
  cache_config:
 
output_annotation_dir: "output/"
export_annotation_format: json
allow_all_users: true

रफ़्तार के लिए caching

API कॉल घटाने और जवाब तेज़ करने के लिए caching चालू कीजिए:

yaml
ai_support:
  enabled: true
  endpoint_type: openai
 
  ai_config:
    model: gpt-4
    api_key: ${OPENAI_API_KEY}
 
  features:
    keyword_highlighting:
      enabled: true
 
  cache_config:
    disk_cache:
      enabled: true
      path: "ai_cache/cache.json"
 
    # Pre-generate highlights on startup and prefetch upcoming
    prefetch:
      warm_up_page_count: 100
      on_next: 5
      on_prev: 2

कुछ सुझाव

हाइलाइट के रंग ऐसे चुनिए जो आपकी एनोटेशन स्कीम से भिड़ने के बजाय उसके साथ बैठें। caching चालू रखिए ताकि एक ही सामग्री के लिए दो बार पैसा न देना पड़े। एनोटेशन का पैमाना बड़ा है तो Ollama स्थानीय रूप से चलता है और API का बिल पूरी तरह बचा लेता है। और याद रखिए कि सुविधाएँ एक-दूसरे पर चढ़ती हैं: कीवर्ड हाइलाइटिंग की जोड़ी hints और label suggestions के साथ सहज बैठती है।


पूरा दस्तावेज़ AI सपोर्ट पर है।