What is an extraction model?

An extraction model reads an incoming message and its attachments and pulls out specific pieces of structured data - for example an invoice number, an order date, a delivery address, or a customer name. Instead of sorting a message into a category, it returns a clean, structured object you can pass straight into another system.

This article explains what an extraction model does and the concepts you will work with. To build one, see the "Set up your first extraction model" article.

What it does

You tell the model which fields you want, and for each incoming message it finds the matching values in the text and returns them together as a structured result. Because the model works from the meaning of the text rather than a fixed template, it can find the same field even when documents are laid out differently.

A common use is reading details out of attached documents such as invoices or order forms. Tekst automatically reads the text from supported attachments before the model runs - see Supported attachments for the list of file types and limitations.

Entities

The fields you want the model to pull out are called entities. For each entity you define:

  • A name that describes the value (for example "Invoice number").
  • A description that tells the model what to look for.
  • An output format - the type of value to return, such as text, a number, an integer, a true/false value, or a structured object.

Entities can be nested. An entity can be an object made up of other fields, and a field can be a list (array) when a message contains several values of the same kind, such as multiple line items on an order.

The structured result

When the model runs, it returns a single structured object containing the values it found for each entity. Any field the model cannot find is returned empty, so downstream automations can handle missing values predictably.

Predictions and feedback

Each run produces a prediction. Your team can review the extracted values and correct anything that is wrong, and those corrections become validated examples that improve the model over time.

Drafts

Changes to an extraction model are saved as a draft. Adding an entity, changing an output format, rewriting a description, or importing entities from a CSV file does not affect live message processing until you publish. The version you published last keeps extracting in the meantime.

To learn more, see the "What is a model draft?" article.

Related articles

  • For an overview of all model types, see the "What are models on Tekst?" article.
  • To build a model, see the "Set up your first extraction model" article.
  • To understand scoring, see the "How extraction accuracy is measured" article.
  • To understand the draft workflow, see the "What is a model draft?" article.

0 comments

Please sign in to leave a comment.