Type something to search...



727 55
03 May, 2024

What is Adala ?

Adala is an Autonomous Data (Labeling) Agent framework. Adala offers a robust framework for implementing agents specialized in data processing, with an emphasis on diverse data labeling tasks. These agents are autonomous, meaning they can independently acquire one or more skills through iterative learning. This learning process is influenced by their operating environment, observations, and reflections. Users define the environment by providing a ground truth dataset. Every agent learns and applies its skills in what we refer to as a “runtime”, synonymous with LLM.

Adala Features

  • 🌟 Reliable agents: Agents are built upon a foundation of ground truth data. This ensures consistent and trustworthy results, making Adala a reliable choice for your data processing needs.
  • 🎮 Controllable output: For every skill, you can configure the desired output and set specific constraints with varying degrees of flexibility. Whether you want strict adherence to particular guidelines or more adaptive outputs based on the agent’s learning, Adala allows you to tailor results to your exact needs.
  • 🎯 Specialized in data processing: While agents excel in diverse data labeling tasks, they can be customized for a wide range of data processing needs.
  • 🧠 Autonomous learning: Adala agents aren’t just automated; they’re intelligent. They iteratively and independently develop skills based on environment, observations, and reflections.
  • Flexible and extensible runtime: Adala’s runtime environment is adaptable. A single skill can be deployed across multiple runtimes, facilitating dynamic scenarios like the student/teacher architecture. Moreover, the openness of framework invites the community to extend and tailor runtimes, ensuring continuous evolution and adaptability to diverse needs.
  • 🚀 Easily customizable: Quickly customize and develop agents to address challenges specific to your needs, without facing a steep learning curve.

Who is Adala for ?

Adala is a versatile framework designed for individuals and professionals in the field of AI and machine learning. Here’s who can benefit:

  • 🧡 AI engineers: Architect and design AI agent systems with modular, interconnected skills. Build production-level agent systems, abstracting low-level ML to Adala and LLMs.
  • 💻 Machine learning researchers: Experiment with complex problem decomposition and causal reasoning.
  • 📈 Data scientists: Apply agents to preprocess and postprocess your data. Interact with Adala natively through Python notebooks when working with large Dataframes.
  • 🏫 Educators and students: Use Adala as a teaching tool or as a base for advanced projects and research. While the roles highlighted above are central, it’s pivotal to note that Adala is intricately designed to streamline and elevate the AI development journey, catering to all enthusiasts, irrespective of their specific niche in the field.

Install Adala

Terminal window
pip install adala

Adala frequently releases updates. In order to ensure that you are using the most up-to-date version, it is recommended that you install it from GitHub:

Terminal window
pip install git+https://github.com/HumanSignal/Adala.git

📝 Prerequisites

Set OPENAI_API_KEY (see instructions here)

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

🎬 Quickstart

In this example we will use Adala as a standalone library directly inside Python notebook.

import pandas as pd
from adala.agents import Agent
from adala.environments import StaticEnvironment
from adala.skills import ClassificationSkill
from adala.runtimes import OpenAIChatRuntime
from rich import print
# Train dataset
train_df = pd.DataFrame([
["It was the negative first impressions, and then it started working.", "Positive"],
["Not loud enough and doesn't turn on like it should.", "Negative"],
["I don't know what to say.", "Neutral"],
["Manager was rude, but the most important that mic shows very flat frequency response.", "Positive"],
["The phone doesn't seem to accept anything except CBR mp3s.", "Negative"],
["I tried it before, I bought this device for my son.", "Neutral"],
], columns=["text", "sentiment"])
# Test dataset
test_df = pd.DataFrame([
"All three broke within two months of use.",
"The device worked for a long time, can't say anything bad.",
"Just a random line of text."
], columns=["text"])
agent = Agent(
# connect to a dataset
# define a skill
instructions="Label text as positive, negative or neutral.",
labels={'sentiment': ["Positive", "Negative", "Neutral"]},
input_template="Text: {text}",
output_template="Sentiment: {sentiment}"
# define all the different runtimes your skills may use
runtimes = {
# You can specify your OPENAI API KEY here via `OpenAIRuntime(..., api_key='your-api-key')`
'openai': OpenAIChatRuntime(model='gpt-3.5-turbo'),
# NOTE! If you have access to GPT-4, you can uncomment the lines bellow for better results
# default_teacher_runtime='openai-gpt4',
# teacher_runtimes = {
# 'openai-gpt4': OpenAIRuntime(model='gpt-4')
# }
agent.learn(learning_iterations=3, accuracy_threshold=0.95)
print('\n=> Run tests ...')
predictions = agent.run(test_df)
print('\n => Test results:')

👉 Available skills

  • ClassificationSkill – Classify text into a set of predefined labels.
  • ClassificationSkillWithCoT – Classify text into a set of predefined labels, using Chain-of-Thoughts reasoning.
  • SummarizationSkill – Summarize text into a shorter text.
  • QuestionAnsweringSkill – Answer questions based on a given context.
  • TranslationSkill – Translate text from one language to another.
  • TextGenerationSkill – Generate text based on a given prompt.
  • Skill Sets – Process complex tasks through a sequence of skills.