█

AI/TLDR

मुझे पिलाएं कॉफ़ी
मुझे एक कॉफ़ी पिलाएँ

Adala

HumanSignal का एक ओपन सोर्स Python फ्रेमवर्क, जो ऑटोनॉमस डेटा-लेबलिंग एजेंट बनाता है। ये एजेंट ग्राउंड-ट्रुथ डेटासेट से अपने निर्देश सीखते हैं और फिर LLM की मदद से नया डेटा लेबल करते हैं

Labeling & Annotationओपन सोर्स
भाषा
Python
लाइसेंस
Apache-2.0
$pip install adala
संक्षेप में

Adala क्या है?

Adala HumanSignal का एक ओपन सोर्स Python फ्रेमवर्क, जो ऑटोनॉमस डेटा-लेबलिंग एजेंट बनाता है। ये एजेंट ग्राउंड-ट्रुथ डेटासेट से अपने निर्देश सीखते हैं और फिर LLM की मदद से नया डेटा लेबल करते हैं. यह Data & Labeling टूल्स की Labeling & Annotation श्रेणी में आता है; ओपन सोर्स है, Python में लिखा गया है और Apache-2.0 लाइसेंस के तहत है।

सारांश

Adala — Autonomous DAta (Labeling) Agent का छोटा रूप — HumanSignal का एक ओपन सोर्स Python फ्रेमवर्क है, जो डेटा को प्रोसेस और लेबल करने वाले एजेंट बनाने के लिए है। HumanSignal वही टीम है जो Label Studio बनाती है। किसी LLM से अपनी पंक्तियाँ सही वर्गीकृत करवाने के लिए प्रॉम्प्ट को हाथ से बार-बार ट्यून करने के बजाय, आप एक Adala एजेंट को एक छोटा ग्राउंड-ट्रुथ डेटासेट और एक शुरुआती निर्देश देते हैं। एजेंट उसी निर्देश को खुद सुधारता है: वह अनुमान लगाता है, उन अनुमानों की ग्राउंड-ट्रुथ से तुलना करता है, गलतियों का विश्लेषण करता है और दोबारा कोशिश से पहले निर्देश को परिष्कृत करता है।

Diagram titled Training Agent Skill: an environment table of texts with ground-truth labels feeds an Adala agent whose classification skill loops through instructions, predictions, validation against ground truth, error analysis and instruction refinement, backed by a runtime and a long-term memory.
How an Adala agent learns a skill: predictions are checked against the environment's ground truth, errors are analysed, and the instructions are refined for the next pass.Adala README ↗

फ्रेमवर्क कुछ नामित हिस्सों से बना है। एक Environment डेटा और फीडबैक देता है। सबसे सरल स्थिति में यह pandas DataFrame में लिखे लेबल्ड उदाहरणों को लपेटने वाला `StaticEnvironment` होता है। Skills टास्क का वर्णन करते हैं: `ClassificationSkill`, summarization, question answering, translation, text generation और ontology creation तैयार-मेड skills हैं, और हर एक के साथ एक निर्देश तथा इनपुट व आउटपुट टेम्पलेट होते हैं। Runtimes वे LLM हैं जो कोई skill चलाते हैं; README इसे "LLM का पर्यायवाची" कहता है। Agent इन सबको जोड़ता है, और सीखने के दौरान अलग teacher runtimes इस्तेमाल होते हैं, ताकि एक मज़बूत मॉडल उन प्रॉम्प्ट्स को बेहतर बना सके जिन्हें फिर एक सस्ता मॉडल चलाता है।

व्यवहार में लूप दो कॉल का होता है। `agent.learn(learning_iterations=3, accuracy_threshold=0.95)` सेल्फ-इम्प्रूवमेंट साइकल तब तक चलाता है जब तक accuracy का लक्ष्य या iteration की सीमा न पहुँच जाए, और `agent.run(test_df)` सीखी गई skill को बिना लेबल वाली पंक्तियों पर लगाता है और predictions का DataFrame लौटाता है। Multi-step प्रोसेसिंग के लिए skills को skill sets में chain भी किया जा सकता है। README यह भी दिखाता है कि OpenAI runtime को OpenRouter जैसे किसी भी OpenAI-compatible endpoint से बदलकर Claude, Gemini या दूसरे मॉडल कैसे चलाए जाएँ।

यह क्या करता है

  • खुद को सुधारने वाली skills: `agent.learn()` ग्राउंड-ट्रुथ सेट पर अनुमान लगाता है, उसके विरुद्ध सत्यापन करता है, गलतियों का विश्लेषण करता है और तय संख्या के iterations में, या accuracy threshold पूरी होने तक, skill के निर्देशों को सुधारता है
  • classification के लिए तैयार-मेड skills (chain-of-thought के साथ या बिना), summarization, question answering, translation, text generation और ontology creation। इनमें से हर एक निर्देश और इनपुट व आउटपुट टेम्पलेट से परिभाषित होती है
  • नियंत्रित आउटपुट: लेबल, टेम्पलेट और constraints हर skill के लिए कॉन्फ़िगर किए जाते हैं, ताकि नतीजे आपकी परिभाषित श्रेणियों के भीतर रहें
  • Pluggable runtimes: `OpenAIChatRuntime` पहले से मौजूद है, `base_url` के ज़रिए कोई भी OpenAI-compatible endpoint, और सीखने के चरण के लिए अलग teacher runtimes
  • Skill sets, जो एक skill का आउटपुट अगली skill को देते हैं, उन टास्क के लिए जिनमें कई प्रोसेसिंग चरण चाहिए
  • notebooks और scripts में सीधे pandas DataFrames के साथ काम करता है, और हर skill के लिए Colab-ready उदाहरण notebooks मिलते हैं

शुरू करें

Adala एक Python library के रूप में चलता है, आमतौर पर किसी notebook के अंदर। README का quickstart छह लेबल्ड उदाहरणों से एक sentiment classifier ट्रेन करता है और फिर तीन नए वाक्यों को लेबल करता है। यह डिफ़ॉल्ट रूप से OpenAI इस्तेमाल करता है; आखिरी चरण में दूसरे मॉडलों के लिए OpenRouter वाला वैरिएंट दिखाया गया है।

पैकेज इंस्टॉल करें

README नियमित अपडेट पाने के लिए GitHub से इंस्टॉल करने की सलाह देता है; Poetry-आधारित डेवलपर इंस्टॉल का तरीका भी दस्तावेज़ में दिया गया है।

bashbash
pip install adala
# or, for the development version
pip install git+https://github.com/HumanSignal/Adala.git

अपनी API key सेट करें

bashbash
export OPENAI_API_KEY='your-openai-api-key'

एक environment, एक skill और runtimes के साथ agent परिभाषित करें

Environment एक लेबल्ड DataFrame को लपेटता है (README के उदाहरण में कॉलम `text` और `sentiment` हैं); skill लेबल और टेम्पलेट घोषित करती है।

pythonpython
from adala.agents import Agent
from adala.environments import StaticEnvironment
from adala.skills import ClassificationSkill
from adala.runtimes import OpenAIChatRuntime

agent = Agent(
    environment=StaticEnvironment(df=train_df),
    skills=ClassificationSkill(
        name='sentiment',
        instructions="Label text as positive, negative or neutral.",
        labels=["Positive", "Negative", "Neutral"],
        input_template="Text: {text}",
        output_template="Sentiment: {sentiment}"
    ),
    runtimes={'openai': OpenAIChatRuntime(model='gpt-4o')},
    teacher_runtimes={'default': OpenAIChatRuntime(model='gpt-4o')},
    default_runtime='openai',
)

सीखें, फिर नए डेटा को लेबल करें

`learn` skill को ग्राउंड-ट्रुथ के मुकाबले सुधारता है; `run` उसे बिना लेबल वाली पंक्तियों पर लगाता है और predictions लौटाता है।

pythonpython
agent.learn(learning_iterations=3, accuracy_threshold=0.95)
predictions = agent.run(test_df)
print(predictions)
Diagram titled Executing Agent's Skill: an input DataFrame of texts flows through an Adala agent with classification, summarization and data generation skills, connected to an environment and to runtime and memory infrastructure, producing an output table of classification results with per-label scores.
Once a skill is learned, the agent runs it over new rows and returns structured output — here a label plus per-class scores for every text.Adala README ↗

OpenAI-compatible endpoint के ज़रिए दूसरा मॉडल इस्तेमाल करें

`OPENROUTER_API_KEY` सेट करें और runtime को OpenRouter की ओर इंगित करें, ताकि Claude, Gemini या दूसरे मॉडल इस्तेमाल हो सकें; `teacher_runtimes` के अंतर्गत उसी तरह का runtime इस्तेमाल करें।

pythonpython
import os

runtimes = {
    'openrouter': OpenAIChatRuntime(
        base_url="https://openrouter.ai/api/v1",
        model="anthropic/claude-3.5-haiku",
        api_key=os.getenv("OPENROUTER_API_KEY"),
        provider="Custom"
    ),
}

कमांड और कोड प्रोजेक्ट के अपने दस्तावेज़ों से लिए गए हैं — हमेशा जांचें आधिकारिक repo ताज़ा जानकारी के लिए।

कब इस्तेमाल करें

  • तब इसका इस्तेमाल करें जब आपके पास कुछ सौ लेबल्ड पंक्तियाँ हों और आप प्रॉम्प्ट को खुद हाथ से ट्यून किए बिना बाकी पंक्तियों को LLM से लेबल करवाना चाहते हों
  • तब इसका इस्तेमाल करें जब classification या summarization प्रॉम्प्ट को आँख से परखने के बजाय ग्राउंड-ट्रुथ के मुकाबले मापना हो
  • तब इसका इस्तेमाल करें जब आप एक मज़बूत teacher मॉडल से उन निर्देशों को बेहतर बनवाना चाहते हों, जिन्हें फिर एक सस्ता मॉडल एक बड़े DataFrame पर चलाता है
  • तब इसका इस्तेमाल करें जब कोई डेटा-प्रोसेसिंग टास्क कई चरणों में फैला हो, जिन्हें skills की chain के रूप में लिखा जा सकता है

How Adala compares

Adala alongside other open-source labeling & annotation tools AI/TLDR tracks, ranked by GitHub stars.

टूलस्टारयह क्या करता है
Label Studio★ 28.8kImages, text, audio, video और time series के लिए ओपन सोर्स डेटा लेबलिंग टूल
CVAT★ 17.2kइमेज, वीडियो और 3D कंप्यूटर विज़न डेटासेट के लिए सेल्फ-होस्टेड एनोटेशन प्लेटफ़ॉर्म
Labelme★ 16.4kPython में डेस्कटॉप इमेज एनोटेशन, AI-असिस्टेड पॉलीगन और मास्क के साथ
FiftyOne★ 11.4kVision model के पीछे के डेटासेट को विज़ुअलाइज़, लेबल और डीबग करें
X-AnyLabeling★ 11.1kAI की मदद से इमेज, वीडियो, टेक्स्ट, पॉइंट क्लाउड और मल्टीमॉडल डेटा के एनोटेशन के लिए क्रॉस-प्लेटफ़ॉर्म डेस्कटॉप ऐप
doccano★ 10.8kलेबल किए गए NLP डेटासेट बनाने के लिए ओपन सोर्स टेक्स्ट एनोटेशन टूल
Snorkel AI★ 6kProgrammatic data development and expert data platform (Snorkel Flow) for labeling, synthetic data, and evaluation/RLHF datasets for frontier and enterprise AI models.
Adala★ 1.7kHumanSignal का एक ओपन सोर्स Python फ्रेमवर्क, जो ऑटोनॉमस डेटा-लेबलिंग एजेंट बनाता है। ये एजेंट ग्राउंड-ट्रुथ डेटासेट से अपने निर्देश सीखते हैं और फिर LLM की मदद से नया डेटा लेबल करते हैं