Introduction to Argilla

Jan 20, 2021 | Data Science

Argilla
Argilla

Work on data together, make your model outputs better!

CI Codecov CI app twitter linkedin Discord

Argilla is a collaboration tool for AI engineers and domain experts who need to build high-quality datasets for their projects. If you just want to get started, deploy Argilla on Hugging Face Spaces. Curious, and want to know more? Read our documentation. Or, play with the Argilla UI by signing in with your Hugging Face account.

Why use Argilla?

Argilla can be used for collecting human feedback for a wide variety of AI projects like traditional NLP (text classification, NER, etc.), LLMs (RAG, preference tuning, etc.), or multimodal models (text to image, etc.). Argilla’s programmatic approach lets you build workflows for continuous evaluation and model improvement. The goal of Argilla is to ensure your data work pays off by quickly iterating on the right data and models.

Improve your AI output quality through data quality

Compute is expensive and output quality is important. We help you focus on data, which tackles the root cause of both of these problems at once. Argilla helps you to achieve and keep high-quality standards for your data. This means you can improve the quality of your AI output.

Take control of your data and models

Most AI tools are black boxes. Argilla is different. We believe that you should be the owner of both your data and your models. That’s why we provide you with all the tools your team needs to manage your data and models in a way that suits you best.

Improve efficiency by quickly iterating on the right data and models

Gathering data is a time-consuming process. Argilla helps by providing a tool that allows you to interact with your data in a more engaging way. This means you can quickly and easily label your data with filters, AI feedback suggestions and semantic search. So you can focus on training your models and monitoring their performance.

Getting Started

Installation

First things first! You can install the SDK with pip as follows:

pip install argilla

After that, you will need to deploy Argilla Server. The easiest way to do this is through our free Hugging Face Spaces deployment integration.

To use the client, you need to import the Argilla class and instantiate it with the API URL and API key:

import argilla as rg

client = rg.Argilla(api_url="https://[your-owner-name]-[your_space_name].hf.space", api_key="owner.apikey")

Create your first dataset

We can now create a dataset with a simple text classification task. First, you need to define the dataset settings:

settings = rg.Settings(
    guidelines="Classify the reviews as positive or negative.",
    fields=[
        rg.TextField(
            name="review",
            title="Text from the review",
            use_markdown=False,
        ),
    ],
    questions=[
        rg.LabelQuestion(
            name="my_label",
            title="In which category does this article fit?",
            labels=["positive", "negative"],
        )
    ],
)

Next, create the dataset:

dataset = rg.Dataset(
    name="my_first_dataset",
    settings=settings,
    client=client,
)
dataset.create()

Now, we can add records to the dataset:

pip install datasets

from datasets import load_dataset

data = load_dataset("imdb", split="train[:100]").to_list()
dataset.records.log(records=data, mapping={"text": "review"})

You have successfully created your first dataset with Argilla. You can now access it in the Argilla UI and start annotating the records. Need more info, check out our docs.

Troubleshooting

– If you encounter issues while installing or deploying Argilla, ensure your Python and pip versions are up to date. – Check your API URL and API key if you get authentication errors. – If the Argilla server does not reflect changes after dataset modification, restart the server instance.

For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox