For the complete documentation index, see llms.txt. This page is also available as Markdown.

Labeling Agent

Labeling agents allow you to assign ML models as labelers in your project and evaluate their performance alongside human labelers. This helps you understand which labeling approach works best for your needs, whether human, machine, or both.

Labeling agents simplify the process of testing and comparing ML models inside Datasaur:

  • You no longer need to create separate accounts or log in as the model to run predictions.

  • Model outputs are now part of the same analytics and comparison tools used for human labelers.

  • It’s easier to measure performance and decide what labeling strategy to use.

Models must be deployed in LLM Labs in the same team workspace as the Data Studio project.

Create a labeling agent

Supported labeling types: Span labeling, row labeling.

1. Prepare the label set

Make sure the label set you will be using matches the one you configure in step 2. Below is a simple example of labels that can later be used in Data Studio:

{
  "name": "Labeling agent Label set",
  "options": [
    { "id": "NhsjWIgaAQH3g6dsvtW6a", "color": "#f93b90", "parentId": null, "label": "PERSON" },
    { "id": "X1bKK7Nxf9SGaBfDpzH7g", "color": "#d4e455", "parentId": null, "label": "DATE" },
    { "id": "NP2RJr7tD5aMfVBnG6TOm", "color": "#85c98e", "parentId": null, "label": "ORG" }
  ]
}

2. Define your instructions

In LLM Labs, create a new sandbox and set up the model to act as a labeling agent. To help the model understand what to label, you’ll need to provide clear system and user instructions.

The output of the model must be in JSON object format, aligned with the label set defined in your NLP project, to ensure compatibility with regex-based string matching for labeling in your NLP platform.

Below is an example setup:

System instruction

User instruction

3. Test with a prompt example

To check if your instructions work as expected, you can test them using an example sentence. Here's how you might write a prompt:

After you click the Run button, the expected output will be:

4. Deploy the model

You need to deploy the model first before it becomes available and visible in Data Studio as a labeling agent.

Assign labeling agents

Span Labeling Agent

Use this guide if your project requires the agent to apply labels to spans of text.

Row Labeling Agent

Use this guide if your project requires the agent to answer row-based questions.

You can assign labeling agents during project creation, or add them later from Project Settings in an existing project. See the guide for your project type for the step-by-step.

Launch the project and review results

When you click Launch project, the labeling agents will automatically start labeling.

Current limitation:

  • Each span will only have one label.

  • Limited supported question type for optimized performance.

Best practices

  • Use the external model as a timesaving aid but always include a human review step.

  • Train your model with high-quality data to improve suggestion accuracy.

  • Communicate clearly with labelers about how to handle model predictions.

  • Automate some of the work with consensus by using multiple models, e.g., use the consensus of 3 and deploy 3 Labeling Agents, then focus only on those that are not accepted through consensus.

FAQs

  • Can I assign multiple models to the same project?

    • Yes. You can assign up to 10 labeling agents.

  • Can I use labeling agents in line labeling project?

    • Not yet. They can be assigned to span + line labeling project but will only apply labels for span labeling task.

  • How are labeling agent labels shown in the text editor?

    • They are treated like human labelers but are masked. You’ll see their labels in the reviewer mode and analytics.

Last updated