> For the complete documentation index, see [llms.txt](https://docs.datasaur.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.datasaur.ai/assisted-labeling/ml-assisted-labeling/llm-assisted-labeling.md).

# LLM Assisted Labeling

{% hint style="info" %}
**Supported labeling types**: Span labelin&#x67;**,** row labeling.
{% endhint %}

**LLM Assisted Labeling** allows you to use models from OpenAI, Azure OpenAI, Anthropic, Gemini, and Cohere to assist with labeling. This helps make labeling easier across different use cases.

## Providers and model support

<table><thead><tr><th width="146.5625">Provider name</th><th>Model</th></tr></thead><tbody><tr><td>OpenAI</td><td>gpt-3.5-turbo, gpt-4, gpt-4-turbo, gpt-4o, gpt-4o-mini</td></tr><tr><td>Azure Open AI</td><td></td></tr><tr><td>Anthropic</td><td>claude-2, claude-2.1, claude-3-haiku-20240307, claude-3-opus-20240229, claude-3-sonnet-20240229, claude-3-5-sonnet-20240620</td></tr><tr><td>Gemini</td><td>gemini-pro, gemini-1.5-flash, gemini-1.5-pro</td></tr><tr><td>Cohere</td><td>command-light, command-r, command-r-plus</td></tr><tr><td>Custom</td><td>Support for any LLM Provider without requiring additional coding for Row Labeling.</td></tr></tbody></table>

## Quick guide

After creating the project, enable the **ML-assisted labeling** extension and select **LLM Assisted Labeling** as the provider. The following fields will be available:

<figure><img src="/files/Dbo2Klur0Lptal1nz5JA" alt="Image of Empty Row Based Project"><figcaption></figcaption></figure>

{% hint style="info" %}
For custom providers, refer to the dedicated [page](/assisted-labeling/ml-assisted-labeling/llm-assisted-labeling/custom-provider.md).
{% endhint %}

1. **LLM provider**: Select a supported LLM provider.
2. **Target text**: Select Input column(s) that will be used as context.
3. **Target question**: Select a question to be answered.
4. **System prompt**: Define the model’s behavior and context.
5. **User prompt**: Defines the task for the model.
6. **API key**: Add the LLM provider secret key.
7. **For Azure OpenAI**
   1. **API version:** Enter the API version from your Azure OpenAI.
   2. **API base URL**: Enter the base URL for your Azure OpenAI API model.
   3. **Model deployment:** Enter the deployment model name from Azure OpenAI.
8. **Advanced settings**
   1. **Top P**: Limits predictions to the smallest set with a cumulative probability of P.
   2. **Temperature**: Controls randomness; lower values make responses more predictable.
   3. **Maximum tokens**: Limits the length of the generated response.
   4. **Model name**: The specific version of the language model.

{% hint style="info" %}
For guidance, you can refer to our prompt examples: [row labeling](/assisted-labeling/ml-assisted-labeling/llm-assisted-labeling/prompt-examples.md#row-labeling) and [span labeling](/assisted-labeling/ml-assisted-labeling/llm-assisted-labeling/prompt-examples.md#span-labeling).
{% endhint %}

After completing the configuration, click **Predict labels** to generate labeling suggestions.

<figure><img src="/files/CRZlIS3Ao074YMShwRxr" alt="Image of Prediction Result"><figcaption></figcaption></figure>

{% hint style="info" %}
A 429 error indicates rate limits from the LLM provider. Check your API usage and limits.
{% endhint %}
