# Document and Row Labeling

## Overview

The **Document labeling** and **Row labeling** extensions display the question sets configured during project creation, allowing users to answer questions for each row or document.

{% tabs %}
{% tab title="Row labeling" %}

<figure><img src="/files/3i3q7zrXa0lS6z2zPgCF" alt=""><figcaption><p>Row labeling extension</p></figcaption></figure>
{% endtab %}

{% tab title="Document labeling" %}

<figure><img src="/files/Q3hLDzjj11GUNoig9KL4" alt=""><figcaption><p>Document labeling extension</p></figcaption></figure>
{% endtab %}
{% endtabs %}

## Question set modification

You can manage and update question sets either from the **Label management** page in your workspace or directly within a project. This includes adding new question sets, editing existing ones or removing them. Learn more about [label set management](/workspace-management/label-management/label-set-management.md).

Within a project, question sets can be modified from the three-dot menu in the extension.

<figure><img src="/files/3i3q7zrXa0lS6z2zPgCF" alt=""><figcaption></figcaption></figure>

### Upload a new question set

You can add or replace a question set in two ways:

* **From the three-dot menu.**
* **Using the file uploader** (only shown only when no question set is configured).

### Use existing question set

This option lets you select a saved question set from the library. Using a different question set will:

* Replace the current question set.
* Remove existing answers associated with the previous set.

<figure><img src="/files/nw70pzzdFicfDUg1V0WH" alt=""><figcaption></figcaption></figure>

### Edit question set

You can modify question sets even after the project has started. You can add new questions, edit existing ones, or remove them.

{% hint style="info" %}
Changes made inside a project do not automatically update the corresponding question set in the **Label management** page.
{% endhint %}

#### Add questions

Click the add icon to add a new question to the current question set.

<figure><img src="/files/LrngFgZWgOiOb7OgxfpU" alt=""><figcaption></figcaption></figure>

#### Edit question

Select the question you want to modify and update its settings as needed. You can update both display-related properties and functional behavior:

* **Display-related properties**:
  * Question name.
  * Slider color.
  * Date/time format.
  * Other visual properties.
* **Question type**: Change the question to a different type.
  * Switching between **Text** and **Text area** keeps existing answers.
  * Switching to any other question type removes previous answers.
* **Required or optional:** Choose whether the question must be answered or can be skipped. If existing answers no longer match the updated setting, labelers will be asked to review them.
* **Single or multiple answers**: Change whether the question allows one answer only or multiple answers. If existing answers no longer match the updated setting, labelers will be asked to review them.
* **Answer options**: Add, rename, or delete options.
  * Adding options gives labelers more choices.
  * Renaming options updates only the displayed text and keeps existing answers.
  * Deleting options removes answers associated with those options.
* **Regex validation**: Add or update regex rules to validate text input. If existing answers no longer match the updated setting, labelers will be asked to review them.
* **Slider range**: Update the minimum or maximum slider value. Answers outside the updated range will display a warning in the labeling extension.
* **Remove questions:** You can remove both newly added and existing questions when needed.

Questions that have already been submitted have the following limitations:

* They cannot be removed or reordered.
* Dynamic question sets cannot be modified.

<figure><img src="/files/LrngFgZWgOiOb7OgxfpU" alt=""><figcaption></figcaption></figure>

### Save to library

Save the current question set to your library (**Label management** page) so it can be reused in other projects.

## Keyboard shortcuts

### Disable keyboard shortcut

<figure><img src="/files/Wl07ffT5SzgwtezionsF" alt=""><figcaption></figcaption></figure>

This option disables numeric keyboard shortcuts for selecting answers.

If this option is disabled, **Match shortcuts to numeric labels in dropdowns** will also be disabled.

### Match shortcuts to numeric labels in dropdowns

<figure><img src="/files/N9XhZHUc0ecSN0HjBfEs" alt=""><figcaption></figcaption></figure>

This option makes dropdown shortcuts use the same numeric values as the dropdown options. For example:

| Dropdown option | Default shortcut | Match shortcuts enabled |
| --------------- | ---------------- | ----------------------- |
| **0**           | Shortcut 1       | Shortcut 0              |
| **1**           | Shortcut 2       | Shortcut 1              |
| **4**           | Shortcut 3       | Shortcut 4              |

{% tabs %}
{% tab title="Disabled" %}

<figure><img src="/files/toGWAHFppbe4zmIwgT6F" alt=""><figcaption><p>Shortcuts don't match the numeric labels</p></figcaption></figure>
{% endtab %}

{% tab title="Enabled" %}

<figure><img src="/files/3VqRr5i7tGv2mnSGFU3u" alt=""><figcaption><p>Shortcuts match the numeric labels</p></figcaption></figure>
{% endtab %}
{% endtabs %}

This option only works when:

* The project contains at least one dropdown question.
* Keyboard shortcuts are enabled.
* All dropdown options are single-digit numbers between 0 and 9.
  * If any dropdown option is not a number between 0 and 9, this feature will not apply.

## Discard draft from current document

This option removes any unsaved or unsubmitted changes in the current document. Use it when you want to discard your current progress and start again.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.datasaur.ai/advanced/extensions/document-and-row-labeling.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
