Skip to main content
Tags are the metadata attributes you want to extract or classify from your documents. Taxonomies organize tags into hierarchical structures that define parent-child relationships.

What is a Tag?

A Tag defines a specific piece of information you want to capture from documents:

Tag Types

Classification is best when you have a known set of categories. Extraction is best for unpredictable values like names, dates, or amounts. Pattern is best for structured data like phone numbers or SSNs.

Three Ways to Define a Tag

Every tag resolves its value through one of three strategies: Pattern tags are not bare regex. Each pattern carries context keywords (context_items) and a required_context_matches threshold: a nine-digit number only counts as an SSN when words like “social security” or “SSN” appear near it. That corroboration is what keeps precision high on real documents, and the platform can suggest both the pattern and its context keywords from your data. See Precision Patterns for Sensitive Data. Rule-based tags evaluate after their input tags exist: if a rule matches, the value is resolved deterministically; if no rule matches, the tag falls back to its other configured strategy, pattern matching or LLM classification, depending on the tag definition. Because rules run at zero LLM cost, they are the right tool for policy verdicts derived from other signals (access gates, retention classes, readiness flags).

Taxonomy Structure

A Taxonomy enables hierarchical organization and conditional extraction. Child tags only get generated when parent conditions are met:
In this taxonomy, the AI first classifies the document type, then only extracts the relevant child tags. A Contract won’t have “Invoice Amount” extracted, which saves time and cost.

Creating Effective Tags

1

Define Clear Descriptions

Give the AI specific instructions about what to extract. The better your description, the more accurate the extraction.
2

Choose the Right Type

Use Classification for known categories, Extraction for open-ended values, and Pattern for structured formats.
3

Set Available Values

For Classification tags, provide a complete list of possible values to improve accuracy.
4

Organize into Taxonomies

Group related tags hierarchically to enable conditional extraction and reduce unnecessary processing.

Python SDK


API Reference

Upsert Tag

Create or update a tag

List Tags

List all your tags

Delete Tag

Remove a tag

Suggest Patterns

AI-powered pattern suggestions

Upsert Taxonomy

Create or update a taxonomy

List Taxonomies

List all your taxonomies

Delete Taxonomy

Remove a taxonomy

Suggest Taxonomy

AI-powered taxonomy suggestions