> For the complete documentation index, see [llms.txt](https://docs.mindee.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mindee.com/classification-models/extraction-model-chaining.md).

# Extraction Model Chaining

Use Classification to automatically extract the correct data from files.

Note: Classification Models always return a single class regardless of the number of pages or if there are multiple documents on the same page.

## Extraction Set Up

### At Model Creation

When creating your Classification Model, you'll be adding document classes in the creation window.

For each document class, you can link one of your [Extraction Models](/extraction-models/extraction-models-overview.md) for chaining. The Extraction Model must exist prior to the Classification Model creation.

Use the search field to filter available Extraction Models.

### After Model Creation

This works exactly like when creating at model creation.

Simply go to your Split model's "Utility Configuration" page and adjust as needed.

You can add new classes, remove classes, and change Extraction Models.

### Selectively Extracting

If a detected class has no linked Extraction Model, no extraction runs for that class.

This allows selectively extracting some files while ignoring others.

Let's say you receive mixed file types from your users, typically but not limited to: plane tickets, travel receipts, driver licenses, and passports.

You need only passports. In your Classification configuration, add a `passport` class and an `other`  class, and only link an extraction model to the `passport` class.

All documents will get classified, but only those linked to an Extraction Model will have extraction results.

{% hint style="info" icon="lightbulb" %}
Always add an `other` class in addition to classes of interest to you, unless all potential document types are known in advance.
{% endhint %}

## Access Extraction Results

When an Extraction Model is linked, the detected class contains an Extraction Response object.

That object is the same as the response returned by a standalone Extraction request.

Check [Classification Result](/classification-models/sdk-integration/classification-result.md) for details on accessing crop items and their extraction responses.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.mindee.com/classification-models/extraction-model-chaining.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.
