# Asset Builder

The Asset Builder allows project managers to upload tabular files containing rows of data, to then create custom assets, one per row, including both the data in the imported table and data that is common to all assets.

See this video for a visual overview of the Asset Builder (as of May 2024)

{% file src="<https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FLLfLPEIxAHb1gIXIXaWR%2FAsset%20Builder%20Tutorial.mp4?alt=media&token=0aababb3-74ed-46f7-a6b1-aa7e7507f523>" %}

## Creating Assets

In the project where you would like to create the assets, enter the *Assets* tab and click on *Add Data*. In the dialog that appears, click on the *Asset Builder* tab. The Asset Builder will open.

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FQ3bJ3WwYOsGWsXQLKz97%2Fimage.png?alt=media&#x26;token=4b0b3a57-6459-4f02-9a6a-d5fe491bd5f9" alt=""><figcaption></figcaption></figure>

### Step 1: Import Rows

{% hint style="info" %}
If your project includes classification questions, and you wish for some or all of the questions to be displayed inline *in* the asset, rather than on the left side of the screen, please ensure you have created the classifications you need from the project's *Settings -> Category Schema* section before beginning to create your assets.
{% endhint %}

{% hint style="info" %}
If your data rows contain links to files in private buckets, and you would like to display the content of those links in the assets you will create, please ensure you have created a storage integration between Ango Hub and the bucket before beginning to create your assets. [Read more in our docs on how to create storage integrations](https://docs.imerit.net/data/storages/importing-private-cloud-assets-aws).
{% endhint %}

#### Import File

The first step is to import the rows of data which will form part of the final asset.

On the Asset Builder's *Data Upload* page, drag and drop the file containing the rows you wish to import onto the area marked below, or click on the area to open your OS's file picker.

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FBLfIfebBSPO3tBw5Ur8I%2Fimage.png?alt=media&#x26;token=c1653bfe-7837-4b03-a8a3-fddbb6a4edf5" alt=""><figcaption></figcaption></figure>

The following are the file formats supported for importing rows:

<table><thead><tr><th width="285">Format</th><th width="109">Extension</th><th>Notes</th></tr></thead><tbody><tr><td>Comma-Separated Values</td><td>.csv</td><td>Any type of delimiter is supported beyond commas.<br><br>You may indicate a custom delimiter during upload.</td></tr><tr><td>Tab-Separated Values</td><td>.tsv</td><td></td></tr><tr><td>Excel Binary File Format (Office 1997-2007)</td><td>.xls</td><td></td></tr><tr><td>Excel Workbook (Microsoft Office 2007 onwards)</td><td>.xlsx</td><td></td></tr><tr><td>JavaScript Object Notation</td><td>.json</td><td></td></tr></tbody></table>

You may see, copy, and download a sample .csv from the left-hand side of the screen.

#### Pick Delimiter (if input file is .csv)

If the file you have imported is a .csv, you will be prompted to select the delimiter used in the file you have just imported.

{% hint style="info" %}
**What is a delimiter?**

A .csv file is a list of rows, with the first row being the table's header.

Each row is then divided into columns. The delimiter is the character dividing the rows into columns.

Common delimiters include: comma, semicolon, tab, space, period.
{% endhint %}

You may pick your delimiter from a list of presets or enter your own by choosing *Custom*:

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FLbtSSS4g3ax2lhCDyQ9C%2Fimage.png?alt=media&#x26;token=96375dc4-ad72-4227-bd4d-f8013a959177" alt=""><figcaption></figcaption></figure>

You may choose to replace the file by clicking on *Replace file*.

Once you are done, click on *Next Step*. Ango Hub will start parsing the file. You will then be directed to the next page.

### Step 2: Previewing Rows

If you have followed the steps so far, you will be shown a preview of the data rows you have added.

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FnSUA23Mh9CXFeWSpg4WQ%2Fimage.png?alt=media&#x26;token=dcc3ba88-4712-41f4-8781-71fda3414450" alt=""><figcaption></figcaption></figure>

You may add more rows by clicking on the *Add More Data* button at the top.

{% hint style="warning" %}
If your upload is split into multiple files, please ensure that in all files, the column headers are the exact same in number, position, and name.
{% endhint %}

Click on *Next Step* when you are done.

### Step 3: Editing the Asset

At the end of this entire process, after you will have designed the asset, the Asset Builder will have created one asset for each data row you have added in the first two steps.

Each asset will have two data components: data which is the same for all assets (for example, text you manually type into the editor), and data which is different for each asset, pulled from each data row. This latter data will be chosen by you by picking an element from the *Data* column on the right.

At this stage, you can create the template for the assets which will be displayed to annotators. The template will save:

* the template content
* externalId column selection
* batch column selection
* data config (columns and their types, storages, etc.)
* classification pre-label config

In the page that appears, you will see, on the left side, the editor with which you will create the asset. On the right side, you will see two tabs: *Data* contains a list of all columns in your table, and *Classifications* contains a list of classifications present in the project (if any).

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2Fe58Riolyy9gl3d7Ll9Z0%2Fimage.png?alt=media&#x26;token=a10dc757-89a9-4743-91eb-e582d375c0a7" alt=""><figcaption></figcaption></figure>

#### Select External ID Column

In Ango Hub, all assets must have an [External ID](https://docs.imerit.net/core-concepts/assets#external-id). From the *External ID Column* dropdown, pick a data column you would like to use as source to pick the assets' external IDs.

#### Select Batch Column

You may have each asset created with Asset Builder be assigned to a specific batch.

Assume, for example, that you have a column in your table which contains the batch name for each row. In the example above we have called it "Batch", but it may have any name you desire.

| External ID | Text                                       | Batch       |
| ----------- | ------------------------------------------ | ----------- |
| Q1          | The Python programming language...         | Programming |
| Q2          | This prompt has been created...            | LLMs        |
| Q3          | Vehicles can be found in many different... | Vehicles    |

If, from the "Batch Column" dropdown on the top right-hand side of the Asset Builder

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FGQLfAscHIPzgCzGX2Srz%2Fimage.png?alt=media&#x26;token=8db0c01d-fb96-435c-99d0-2a26009291a1" alt=""><figcaption></figcaption></figure>

you selected the "Batch" column, then each asset would be assigned to its batch, according to the contents of the "Batch" column.

In our example above, the first task would be assigned to the "Programming" batch, and so on. Batches that do not exist in the project will be created.

#### Entering Data Common to All Assets

In the Asset Content Editor, using the editor's rich text editing capabilities and its toolbar, you may enter any text, image, video, table, URL, list, or code snippet you wish. Data added this way will be shared by all assets created.

If you have a saved template, you may load it from the dropdown on the top-right corner of the asset builder editor:

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2Fwdouyveob0K8rq8SWqfs%2Fimage.png?alt=media&#x26;token=0c118ae9-80fd-4046-baf2-cf9cdac4f243" alt=""><figcaption></figcaption></figure>

While the Asset Content Editor allows you to easily enter text, or any media, and format it in any way, for special needs not covered by the editor you may click on the <img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2F07nfxFyedYhlwv9ftm4O%2Fimage.png?alt=media&#x26;token=41661372-8787-420d-9b1d-d52aca5bf229" alt="" data-size="line"> icon in the editor's toolbar to enter the editor's HTML view. You may include here any arbitrary HTML.

{% hint style="info" %}
Embedding JavaScript code using `<script>` tags is not supported. `<script>` tags and their contents are purged when the asset is created, and when switching from the HTML view to the preview.
{% endhint %}

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2Fd201h41Fn0PXhHVhbWcN%2Fimage.png?alt=media&#x26;token=617784ab-1f81-49e6-8aea-c1ec90116908" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
`<iframe>` tags are supported. This means that you may embed another live website, or parts of another website, in the assets.

You may either add the same iframe to all assets, by including it in the common HTML, or have individual different iframes for each asset by having the code content of the iframe as a .csv column.

This way, you may, for example, embed live YouTube videos, or any other content from websites.

Please do note that if you wish to embed a YouTube video in an iframe, you must use the "embed" URL (e.g. [https://www.youtube.com/embed/XUltI4v\_UU4](https://www.youtube.com/watch?v=XUltI4v_UU4)) rather than the "normal" URL (e.g. <https://www.youtube.com/watch?v=XUltI4v_UU4>)

<img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FRGHuExgdSBwXEfz47ABx%2Fimage.png?alt=media&#x26;token=3c8da68d-f759-4377-9cf5-f0b8327deae4" alt="" data-size="original">
{% endhint %}

#### Entering Table Row Data

In addition to data that is common to all assets, you may embed data directly from the data rows you have uploaded in Steps 1 and 2.

To do so, in the Asset Builder Editor, place the cursor where you would like to add the row data. Then, from the right-hand side of the screen, look for the column name of the data you would like to add.

Click on the *+* button on the column you would like to add. This will add a placeholder in the editor with the name of the column between double curly brackets:

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FskitNzyh5nAHBNgKs2gU%2Fimage.png?alt=media&#x26;token=65b00e3d-adba-4086-9a02-02c9cb8ca890" alt=""><figcaption></figcaption></figure>

For example, if your data rows have a column named `vehicle_type`, and you have clicked on *+* on the vehicle\_type column section, the asset editor will appear this way:

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FLVboRuYRGmqzupoXvprK%2Fimage.png?alt=media&#x26;token=d15c55e7-b6ad-4f0e-94e7-094bebe87fa0" alt=""><figcaption></figcaption></figure>

In the final assets, the example above will look like this (for one row):

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2Fu0ACWbqR3LbeZlikFqpV%2Fimage.png?alt=media&#x26;token=f7ff84aa-a9b2-4624-b075-1be6da9bfa44" alt=""><figcaption></figcaption></figure>

where Hub substitutes {{vehicle\_type}} with the actual content of the rows in the vehicle\_type column.

{% hint style="warning" %}
Manually typing the double curly brackets and the column name in the editor will still add the relevant field and make the data display in the asset, however, it will not add HTML fields which are necessary to display the media correctly.

While you can add fields by typing them manually, we strongly recommend using the *+* button to add them to the editor, as this adds specific code to the HTML which makes the field appear correctly in the asset.
{% endhint %}

***

By default, row data is displayed as plain text. You may choose, however, how the data is shown by expanding the "Configs" dropdown on the right side of the screen, before clicking on *+*.

For example, if the data you are adding is a link to an image, video, audio, or code for an iframe, and you would like to display the image directly, or an audio/video player through which annotators can play the media, select the correct media type from the dropdown, then click on *+*.

The *PDF* option additionally allows you to embed PDF, .doc, .docx, images, and .txt from Google Drive (see warning below) and .pdf and .txt files from AWS S3.

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FOuX7sKgcy7uiQgW8PSHp%2Fimage.png?alt=media&#x26;token=01dc3cc8-f6f2-45e4-b563-6a17d1467016" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If you intend to embed an image, audio, or video, the link **must** be a direct link to the file itself. This means that the URL must end with the filename and extension of the file. URLs such as those provided by Google Drive, etc. will **not** work.

:white\_check\_mark: <https://example.com/image/example.jpg>

:x: <https://drive.google.com/file/d/1-Vm7E57M\\_Ria6wjlhqC-aaXRt1fBBha9/>
{% endhint %}

{% hint style="info" %}
If you intend to embed a .pdf, .txt, .doc, image, or .docx file from Google Drive, the file must be **public** and the link **must** end in `/preview`. For example, this is a valid link:

:white\_check\_mark: <https://drive.google.com/file/d/1GAhD_X7Bp_l6IEqU62q-v48JEnCWDSgG/preview>
{% endhint %}

If the row data is a link to an asset in a private AWS S3, Azure, or GCP bucket, you may pick the storage integration Hub should use under the *Storage* dropdown, before clicking on the plus button:

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FfHV0AAns2l1Buqw6VYIJ%2Fimage.png?alt=media&#x26;token=98b3a4f3-476f-4c52-919a-db88e5de06d5" alt=""><figcaption></figcaption></figure>

At any point, you may preview what the assets will look like, using the data you have imported in Steps 1 and 2, by clicking on the *Preview* button in the top-right.

#### Entering Inline Classifications

If your project has top-level classifications in its category schema, you may choose to have some or all classifications appear directly in the asset itself rather than on the left-hand side of the screen.

To do so, on the right-hand side of the Asset Builder, switch to the *Classifications* tab.

In the Asset Builder Editor, place the cursor where you would like the classification to appear.

From the *Classifications* tab, click on the title of the classification you would like to include:

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FubkzBAs5BwWipXH1AMmp%2Fimage.png?alt=media&#x26;token=e3f79cbb-39c2-4ea2-b72c-d5a663000419" alt=""><figcaption></figcaption></figure>

A placeholder for the classification will be inserted in the editor. In the final asset, the classification will be integrated in the asset itself.

{% hint style="info" %}
You may include an inline classification only once per template per classification.

If you insert the same classification in more than one location in your asset template, the classification will only be shown at the location where you have last inserted it.
{% endhint %}

{% hint style="info" %}
Classifications inserted this way will not appear in the preview that appears when clicking on the *Preview* button in the top-right side of the Asset Builder. They will, however, appear in the final assets.
{% endhint %}

For example, this is what classifications look like when embedded inline into an asset:

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2F4PGtSgvrEP9ydbdqSPRF%2Fimage.png?alt=media&#x26;token=8cdf7a76-4064-4eb5-bd09-03e0f269d2ba" alt=""><figcaption></figcaption></figure>

#### Pre-labeling Inline Classifications

You may pre-populate classifications as you create assets with the Asset Builder with content in columns of the table itself.

For each classification (the classifications do not need to necessarily be embedded in the asset itself – this will work for any classification in the project, whether it is displayed in the *Classifications* section on the left-hand side of the screen or in the asset itself) you may select a column containing the answer to the classification.

To do so, from the *Classification* tab in the Asset Builder, navigate to the classification you would like to pre-label and select, from the *Pre-label column* dropdown, the column containing the pre-labels.

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FcZhmTa4z9ejzPYNohdqq%2Fimage.png?alt=media&#x26;token=0d12db76-2854-48fd-a22a-ab2e7b9803e3" alt="" width="375"><figcaption></figcaption></figure>

When the assets are created, the classification will be pre-populated with the contents of the column selected in this step.

#### Pre-label format

For classifications with a single input (e.g. radio, text, single dropdown), having the text content of the answer in the column, with no special formatting, is enough.

For example, if you wish to pre-label a radio button with the options Red, Blue, and Yellow, having "Yellow" as text (without quotes) in the CSV will be sufficient to have the Yellow options pre-selected as answer.

For classifications with multiple inputs (e.g. checkbox, multiple dropdown) and for classifications with single inputs, but with the [*Multiple* toggle](https://docs.imerit.net/core-concepts/multiple-classification) turned on (i.e. the annotators can answer a classification, like radio or text, multiple times), the answers separated by a semicolon will be sufficient to pre-populate the classification.

Example:

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2Fhap2L0b7psOJW9WWDCDC%2Fimage.png?alt=media&#x26;token=d94c4bcd-4fcf-4d5e-a836-a20e93392de9" alt=""><figcaption></figcaption></figure>

Once you are done creating your asset, you may save it as a template to be used again when importing new data rows.

To do so, click on the dropdown on the top right of the asset builder editor and then on *Add Template* to save your template, giving it a name and description. This template will be available to all project managers in your project.

<figure><img src="https://3895963154-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTcOUG6rfWxqGM0N4db2P%2Fuploads%2FlL4YeiSpKhP98MLXucZH%2Fimage.png?alt=media&#x26;token=864c04d8-469b-4c84-b240-8a4b88adc603" alt=""><figcaption></figcaption></figure>

### Step 4: Creating the Assets

When you are finished creating the asset template, click on *Create Assets* in the bottom-right corner of the Asset Editor to create the assets and import them in the current project.

{% hint style="info" %}
Assets created this way, once imported to the project, are fixed. They may not be updated later on. To update the assets, you will have to delete them and recreate them using the Asset Builder.
{% endhint %}


---

# 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.net/data/importing-assets/asset-builder.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.
