What is Output Format?

Tela allows you to define a structured Output Format for your prompts.

Output Format is a way to communicate to your Canvas how you want to receive the response, providing guidelines that will help the model extract information with precision.

Structuring an Output Format is useful when:

  • You want your output to consistently be generated within the same framework
  • You need to integrate your Canvas with other processes, that require structured data
  • You want to organize the output from your Canvas in lists or tables

Setting up your Output Format

To add an Output Format to your Canvas you can to click on the Output Format + button on the bottom left of the Craft experience.

This will open the Output Format interface, where you can click Add Attribute + to create your first attribute.

Creating attributes

Attributes are the guidelines that will tell your Canvas what to respond and how to structure the content. Each attribute has a label, a description and a type.

  • Label: a relevant name for the attribute, similar to naming a variable when programming or a column header on a table. We recommend using only letters, numbers and underscores for your labels.
  • Description: a short text describing what is the desired output and how it should be formatted, if applicable. This can complement and reinforce the instructions for your Prompt.
  • Type - The type of attribute, which can be:
    • Text - textual or string content
    • Number - numeric content
    • Boolean - Either TRUE or FALSE
    • List - a list of Attributes of variable length
    • Object - a group of Attributes representing an object
    • Table - a table of Attributes of variable length

Lists and objects are powerful types of attributes that can be used together in several applications. Since they are more complex, the next section will provide more details about how to use them.

Diving deeper into Lists

Lists are useful when you can have more than one valid response for an attribute. Using lists, you can tell the Canvas to bring you everything that can be a valid response for that attribute.

When using a list, you will notice that it requires a new Type, which will be the Type of the elements inside your list.

Example

Supposing you have a Canvas that presents a story and your objective is to extract the name of every character in the story.

You can create an Output Format with the attribute listOfCharacters having the Text type since the names are strings of text:

With this list attribute, your Canvas will know to look for more than one character in your story and the response will contain a list of all the characters found!

Diving deeper into Objects

Objects are often described as a digital representation of something in the real world, they can have any number of attributes that will provide information related to it.

You will be asked to provide a type to the objects you create. It can be any one of Tela’s attribute types, even other Objects and Lists, allowing you to create complex structures if you need.

Example

Supposing you have a Canvas about cars and you need to extract all the relevant characteristics of a car from a document.

You can create an Output Format with an Object car containing the following attributes:

You can note that many types have been used in this example, even a list of objects to represent the previous owners.