> 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/data/importing-assets/creating-and-importing-llm-chat-assets.md).

# Creating and Importing LLM Chat Assets

Ango Hub allows you to annotate individual messages in LLM chat conversations by using the [LLM Chat Labeling Editor](/labeling/labeling-editor-interface/llm-chat-labeling-editor.md). This page explains how to create new LLM Chat assets and how to import existing ones.

## Creating Empty Live LLM Conversations

To create an empty conversation which will be populated live by the annotator, from your project, navigate to the *Assets* tab, then click on *Add Data*. A dialog will appear.

Click on *LLM Asset Creator.* A number of options will appear on the left-hand side of the screen.

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

**Storage Method**. If you have [previously integrated](/data/storages.md) a storage method with Ango Hub, you may pick one here. The conversation will be saved in the storage and bucket chosen. If you do not pick a storage method, the chats will be saved in iMerit's own private and encrypted AWS S3 storage bucket.

It will be saved in the path:

```
/{projectId}/conversations/{conversationId}.json
```

**Number of Conversations.** Pick here the number of empty conversations you wish to create.

You may create up to 10,000 conversations at one time. If you need to create more conversations, split them across multiple imports.

**LLM**. Pick the LLM you'd like to use in the assets you are creating. You may create and manage LLMs from your organization page, in the "LLM" section. [See how to add an LLM to your organization here](/data/adding-and-managing-llms.md).

Click on *Upload new conversations* to create the empty conversations in your project.

## Importing Existing Conversations via JSON

From your project, navigate to the *Assets* tab, then click on *Add Data*. A dialog will appear.

Click on *LLM Asset Creator.*

Drag and drop on the right-hand side of the dialog a JSON in this format:

```json
[
  {
    "messages": [
      {
        "id": "1",
        "content": "Content of message 1",
        "user": {
          "role": "user",
          "id": "lorenzo@example.net",
          "label": "Lorenzo"
        }
      },
      {
        "id": "2",
        "content": "Content of message 2",
        "user": {
          "role": "assistant",
          "id": "<any ID you'd like>",
          "label": "ClinicalAI-v13r15"
        }
      }
    ],
    "externalId": "conv_001-or-any-external-id-you-like-this-is-optional",
    "attachments": [
      {
        "type": "TEXT",
        "value": "Patient 1"
      }
    ]
  }
]
```

Each message must have an unique, chronologically advancing ID. The `role` *must* be either `user` or `assistant`. The `id` can be anything you need. The `label` is the name of either the user or the assistant which will appear next to the messages.

## Importing Existing Conversations and Annotations

From your project, navigate to the *Assets* tab, then click on *Add Data*. A dialog will appear.

Click on *LLM Asset Creator.*

Drag and drop on the right-hand side of the dialog a JSON in this format:

{% tabs %}
{% tab title="Import with Title" %}

```json
[
    {
        "externalId": "chat-asset-1",
        "messages": [
            {
                "id": "1",
                "content": "Content of message 1",
                "user": {
                    "role": "user",
                    "id": "100001",
                    "label": "Human"
                }
            },
            {
                "id": "2",
                "content": "Content of message 2",
                "user": {
                    "role": "assistant",
                    "id": "100002",
                    "label": "AI"
                }
            }
        ],
        "objects": [
            {
                "message": "1",
                "title": "Message",
                "classifications": [
                    {
                        "title": "Sentiment",
                        "answer": "Positive"
                    }
                ]
            },
            {
                "message": "2",
                "schemaId": "83e243f743bde31861ca899",
                "classifications": [
                    {
                        "title": "Sentiment",
                        "answer": "Neutral"
                    }
                ]
            }
        ]
    }
]
```

{% endtab %}

{% tab title="Import with Schema ID" %}

```json
[
    {
        "externalId": "chat-asset-1",
        "messages": [
            {
                "id": "1",
                "content": "Content of message 1",
                "user": {
                    "role": "user",
                    "id": "100001",
                    "label": "Human"
                }
            },
            {
                "id": "2",
                "content": "Content of message 2",
                "user": {
                    "role": "assistant",
                    "id": "100002",
                    "label": "AI"
                }
            }
        ],
        "objects": [
            {
                "message": "1",
                "schemaId": "83e243f743bde31861ca899",
                "classifications": [
                    {
                        "schemaId": "92a2f5ed57edcd1ce440338",
                        "answer": "Positive"
                    }
                ]
            },
            {
                "message": "2",
                "schemaId": "83e243f743bde31861ca899",
                "classifications": [
                    {
                        "schemaId": "92a2f5ed57edcd1ce440338",
                        "answer": "Neutral"
                    }
                ]
            }
        ]
    }
]
```

{% endtab %}
{% endtabs %}

<details>

<summary>Sample Category Schema</summary>

```json
{
  "tools": [
    {
      "schemaId": "83e243f743bde31861ca899",
      "tool": "message",
      "title": "Message",
      "required": false,
      "classifications": [
        {
          "schemaId": "92a2f5ed57edcd1ce440338",
          "tool": "radio",
          "title": "Sentiment",
          "required": false,
          "classifications": [],
          "multiple": false,
          "options": [
            {
              "value": "Positive",
              "schemaId": "34a4303c7d79aff4c657701"
            },
            {
              "value": "Neutral",
              "schemaId": "8e46bd25a1d89a2e99d3683"
            },
            {
              "value": "Negative",
              "schemaId": "504eb4a2f8f173ab11d2542"
            }
          ],
          "parentToolType": "message",
          "parentToolId": "83e243f743bde31861ca899",
          "shortcutKey": "2",
          "frameSpecific": false
        }
      ],
      "multiple": false,
      "color": "#f44336",
      "shortcutKey": "1"
    }
  ],
  "classifications": [],
  "relations": []
}
```

</details>

Chat assets and their corresponding annotations are imported simultaneously.
