# 4. Associations

## Create Associations

This section allows the recipe creator to associate/link [attributes](/project-setup/create-recipe/3.-attributes.md) with [classes](/project-setup/create-recipe/2.-classes.md). This is helpful when a class is to be linked to one or more than one attribute and not all.

{% hint style="success" %} <img src="/files/qchq9tcQpS8cX7YBw03I" alt="" data-size="line"> If an attribute is associated with all the classes, it much more convenient to mark it as a [global](/project-setup/create-recipe/3.-attributes.md#global-attribute-on-off) attribute while creating a [class level attribute](https://docs.imerit-prod.io/project-setup/create-recipe/pages/8y4xwQ0lyWeilUzIlS9g#a.-class-level).&#x20;
{% endhint %}

<figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXfGC_qHxTHbI_RTX_6qMRUbdSgmCKiqIiOnR9gjdp2DhZG_Jozx8BhsEaoGgxNjGNGSeNLTFdoJ6awD7lpim8VBqwWNq8r7dCYns459EoYK2ZpV-dzqQv4WLUSecITVX-tRigXDyZIXPBkE1OAKkEC7S4CX?key=lGhAQLv5xC3Ciuwf6zBTGQ" alt="" width="188"><figcaption></figcaption></figure>

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

* The *New Association* form on the right side (highlighted area in red) is used to create associations/links between [classes](/project-setup/create-recipe/2.-classes.md) and [attributes](/project-setup/create-recipe/3.-attributes.md) created in the prior steps.

<figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXeOw-g-Gl2YM-gE1iRqcND1B5QYVn2UD5f2-W4Xa-m_iPM0-nhvrZVqg1OZEFkSJaKx15ljTeFE0HYIDQvpieWUBu-SC8Uyn9RiBorgxdNjOALeWnMZkFrMptShPJZ_IOnEhX5kp-HNSzHf3PIT_JF3f3jb?key=lGhAQLv5xC3Ciuwf6zBTGQ" alt="" width="375"><figcaption></figcaption></figure>

* Users can select multiple [attributes](/project-setup/create-recipe/3.-attributes.md) and link them to a single [class](/project-setup/create-recipe/2.-classes.md). On saving, the association is reflected in rows on the left side (highlighted area in pink).
* All the class level attributes that were marked as [global](/project-setup/create-recipe/3.-attributes.md#attribute-type) during attribute creation are populated in the bottom left sections (highlighted area in yellow).
* Task level and batch level attributes that were created in the previous steps appear in their respective tabs in the bottom section (highlighted area in yellow).

***

## Create Relations

This section allows the recipe creator to create relationships between two classes with [instances](/project-setup/create-recipe/2.-classes.md#has-instances).&#x20;

{% hint style="warning" %}
Relations can be formed only between classes that have [instance](/project-setup/create-recipe/2.-classes.md#has-instances). Only these classes will appear in the selection dropdown of 'Subject' and 'Object' input.
{% endhint %}

<figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXfN3SXI_m5wBrJzIBnyygVPPm3SfELfn7FhiPto7e5jlMApnl6S07ZCZj1Pk_jmW4jyAQPq50pW66pTWfC2Y5qwRZEItmJY1FGRdz2PUlWT4He_hnmC8iVCoT9qrllbFe018SpozqtoxiyDVQFO-sIg84A?key=lGhAQLv5xC3Ciuwf6zBTGQ" alt=""><figcaption></figcaption></figure>

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

* The *New Relation* form on the right side (highlighted area in red) is used to create a relationship between two classes. On saving changes, the relationship will get reflected in rows on the left side (highlighted area in pink).

  1. Enter Relation Name
  2. Choose a subject (child/following) class from the dropdown. For example, *Rider*
  3. Choose a object (parent/leading) class from the dropdown. For example, *Bicycle*

  <figure><img src="https://lh7-us.googleusercontent.com/docsz/AD_4nXcH7XOWylLOHDfFdOt4smajRJkOymTTn1rdHv3X8U9YJP9iByjILF8QL-nyy53Xz82Q_VFKqpTNIEzWsEnNoA6BheujTxDcDLjFCZmJLriUx0IbkbnG-43nxemu6bv4xpq4rLxXtq3Ogs5fNLhDy4KqySDJ?key=lGhAQLv5xC3Ciuwf6zBTGQ" alt="" width="375"><figcaption></figcaption></figure>

[Learn how to use Relationship](/annotation-tool/key-features/relationship.md).<br>


---

# 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.imerit-prod.io/project-setup/create-recipe/4.-associations.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.
