> For the complete documentation index, see [llms.txt](https://docs.imerit.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.imerit.net/labeling/labeling-tools/tools/nested-classifications.md).

# Nested Classifications

Overview of the Nested Classifications labeling tool in Ango Hub

Ango Hub allows annotators to answer multiple, nested questions regarding individual labels, relations, or top-level classifications.

![](https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Mj9Q2CMggO8ujraHZeP%2F-Mk6HQyDoN7-1cABX7Mt%2F-Mk6JA0Da1QyOlhwak7w%2Fimage.png?alt=media\&token=f1648fbf-0508-4164-aeeb-dc5a4628eb57)

In the example above, we ask annotators to draw a polygon. Then, they answer questions related to the polygon they’ve just drawn. Each question’s answer determines which question will be asked next.

Here, if annotators select the “clothing” answer, they will be shown a question asking what type of clothing it is. If then they select “shirt” they will be asked the shirt’s gender, and so on.

You may nest classifications under existing classifications conditionally (i.e. to appear once a user selected a specific answer) or unconditionally (the nested classification appears regardless of what answer the user picks.)

## Setting Up Nested Classifications on Ango Hub <a href="#how-to-nest-classifications-in-your-project" id="how-to-nest-classifications-in-your-project"></a>

From the project’s *Settings* tab, enter the *Category Schema* section.

Click on the label or relation on which you’d like to ask nested questions. In our example, we expand a “Vehicle” bounding box.

![](https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Mj9Q2CMggO8ujraHZeP%2F-Mk6PkSagTqxzKOwanFv%2F-Mk6QHiKL3B4LgliM97-%2Fimage.png?alt=media\&token=3dc7fbc7-6023-49eb-8f5e-694f36413299)

Click on the *Add Classification* button towards the bottom.

If you are adding a nested classification to a tool or relation class, you will be prompted to select the type of classification you need.

If you are adding a nested classification to another classification, you will be prompted to select the classification answer that should be selected by the user for the nested classification to trigger. ([More on classification in Ango Hub](/labeling/labeling-tools/classification-tools.md).)

If you are nesting a classification under an existing classification, and if you wish for the nested classification to appear regardless of the answer picked by the user, pick the *Any* option from the dropdown:

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2Fc5h5dsbsiK2BaMUOjnrC%2Fimage.png?alt=media&amp;token=cb56ef1d-3f94-45d1-a5ee-5b9dd89a18bf" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If you are adding a classification to a *Text*-type classification tool, the nested classification will be displayed regardless of the text being input as soon as the user starts entering text.
{% endhint %}

{% hint style="info" %}
The *Add Classification* button will not appear for classifications if no options have been added.
{% endhint %}

A new labeling tool will appear. Fill up its title and description as before, and add options if available.

![](https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Mj9Q2CMggO8ujraHZeP%2F-Mk6HQyDoN7-1cABX7Mt%2F-Mk6K-r_8_INje2MLXpN%2Fimage.png?alt=media\&token=265fe0a6-5651-490d-bb40-8297bc7af02c)

From here, if you click on *Add Classification* again, you can nest a further question. For example, we can show annotators a free text tool if they answer “Other.”

![](https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Mj9Q2CMggO8ujraHZeP%2F-Mk6HQyDoN7-1cABX7Mt%2F-Mk6K2qgzcXcWNr4Pd2H%2Fimage.png?alt=media\&token=b9a6e780-5d61-49fc-8c3f-e85397feeabe)

Enable the *Required* toggle on a nested classification if labelers must answer it before submitting the task. Required conditional classifications are enforced only when their parent answer makes them visible.

### How to Answer Nested Questions <a href="#how-to-answer-nested-questions" id="how-to-answer-nested-questions"></a>

In the [labeling editor](/labeling/labeling-editor-interface.md), right-click on the annotation where you’d like to answer the nested questions. You can also expand an annotation or relation in the Objects panel and answer its questions there.

A contextual menu will appear. Clicking on it will expand the questions if available.

![](https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Mj9Q2CMggO8ujraHZeP%2F-Mk6HQyDoN7-1cABX7Mt%2F-Mk6KB9fhIZXr9UDJDOA%2Fimage.png?alt=media\&token=bc58fe25-68de-4b9c-9569-3b4397a78182)

Relation questions are available wherever relations are supported, except in 3D MSFT projects and the DICOM series editor. When a required relation question is unanswered or an answer does not match its configured format, Ango Hub blocks submission and identifies the relation that needs attention.

![](https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Mj9Q2CMggO8ujraHZeP%2F-Mk6HQyDoN7-1cABX7Mt%2F-Mk6KERsvoE26f3ZjcUX%2Fimage.png?alt=media\&token=54206258-5b70-4734-bdfc-e4a33170e029)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.imerit.net/labeling/labeling-tools/tools/nested-classifications.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
