You can create extraction schemas directly in the Playground by either:

All schemas you create are saved to the chat. You can access these in Your Files.

Supported Data Types for Fields (In the Playground)

When creating a schema in the Playground, you can specify the following data types:

  • boolean (bool)
  • number (float)
  • string (str)
If you need to use other data types, use the API or library.

Create a Schema in the User Interface (Build in UI)

You can use our WYSIWYG editor to create a schema directly in the Playground user interface. Simply describe each field you want the app to extract! The app shows the extracted values directly in the user interface. You can then download the schema and extracted values to use in downstream applications.

This approach is ideal if you’re not a developer but you need to identify which fields need to be extracted from documents. If you’re familiar with JSON, feel free to enter the JSON schema directly in the user interface.

  1. Go to the Playground.
  2. Upload a file or open an existing chat.
  3. Click the Extract tab.
  4. Select Build in UI.
  5. Enter the Field Name. Enter a label that closely matches how the data appears in the source. For example, if you want to extract someone’s name, enter Name.
  6. In Type, select the expected data type for the extracted value:
    • String: Use for text and dates.
    • Number: Use for numbers, including currency. If the API detects that the number is an amount in currency, it will keep any trailing zeros to the second decimal point. Otherwise, it will remove any trailing zeros.
    • Boolean: Use if the value can only be true or false. For example, use for checkboxes.
  7. (Optional) Enter a description for the field in Description. Add details to clarify what to extract, which is especially useful when the field name alone isn’t specific enough. For example, enter “Only include the first name” if the document also has fields for middle and last names.
  8. Click Save and Run.
  9. The extraction tool runs and extracts the new field from the document. The returned value displays in the List/JSON panel.

Create the JSON Schema (Build with Code)

If you’re familiar with JSON, you can write the JSON schema directly in the Playground user interface. You can then run the schema and see the extracted values. This is helpful to validate that the JSON schema extracts the intended fields and works as expected. You can then download the JSON schema to use in downstream tasks.

  1. Go to the Playground.
  2. Upload a file or open an existing chat.
  3. Click the Extract tab.
  4. Select Build with Code.
  5. Enter the JSON in the Schema panel or upload an existing schema.

Edit Fields

  1. Go to the Playground.
  2. Upload a file or open an existing chat.
  3. Open the Extract tab.
  4. Hover over the field in the Schema/UI Builder panel.
  5. Click the Edit icon that displays.
  6. Edit the field information and click Save and Run.

Remove Fields

Deleting a field cannot be undone.

  1. Go to the Playground.
  2. Upload a file or open an existing chat.
  3. Open the Extract tab.
  4. Hover over the field in the Schema/UI Builder panel.
  5. Click the Delete icon that displays.
  6. The app deletes the field.

List and JSON Views

You can view the extracted fields as either text or JSON. You can toggle between these options by clicking the List and JSON tabs.

Upload a JSON Schema to the Playground

If you have an existing JSON schema you want to edit, you can upload it to the Playground. You can then edit it, add prompts to the field descriptions, and see the extracted values directly in the Playground user interface.

Uploading a schema replaces any existing schema and extracted values.

  1. Go to the Playground.
  2. Upload a file or open an existing chat.
  3. Open the Extract tab.
  4. In the Schema/UI Builder panel, click .
  5. Select the JSON file you want to load.
  6. The app loads the JSON file and switches to the Code Editor. The extraction tool runs and extracts the fields from the document. The returned values display in the List/JSON panel.

View and Download JSON Schema

After building a JSON schema in the Playground user interface, you can download or copy it. For example, you can download the JSON schema and hand it off to a developer who can use it to build a script that extracts the specified fields for a batch of documents.

  1. Go to the Playground.
  2. Upload a file or open an existing chat.
  3. Open the Extract tab.
  4. In the Schema/UI Builder panel, click View Code.
  5. The JSON schema displays.
  6. You can copy the schema or download it as a JSON file.

Start Over (Remove Schema)

You can remove the schema you created for a file. This removes all the fields you created and any extracted values. This cannot be undone.

  1. Go to the Playground.
  2. Upload a file or open an existing chat.
  3. Open the Extract tab.
  4. In the Schema/UI Builder panel, click .
  5. Click Start Over.
  6. When prompted, click Clear & Restart.