# Composite Interfaces

## What is a Composite Interface?

A composite interface is an interface that contains other interfaces within in. It's very helpful if you're doing multiple operations on an image. For example, you might need to do some data entry on an image, such as doing Optical Character Recognition.

## Setup the Dataset

Select "Composite" from `Setup > Data Type`, then select Configure to create additional interfaces, and configure each one individually.

![](/files/-MIFjeUS_rA2scbTob31)

## Labeling Composite Interfaces

When labeling a composite interface, you'll be prompted to select any of the sub-interfaces on each sample.

![Select each sub-interface when labeling to add data for that sample](/files/-MIFk09lbG00WahRxICs)

## Exporting JSON

When exporting a composite interface, it's best to use the JSON format. Check out the [Composite Interface JSON Format ](https://github.com/UniversalDataTool/udt-format/blob/master/interfaces/composite.md)Specification.

The resultant JSON for each sample looks like this:

```javascript
{
  /* ... same information as sample, e.g. imageUrl ... */

  // Expected annotation
  "annotation": {
    // Each key is a fieldName, the annotation is the annotation from that interface
    "some_field_name": {/*... whatever annotation goes with the interface defined for this field ...*/}
  }
}
```


---

# 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.universaldatatool.com/building-and-labeling-datasets/composite-interfaces.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.
