DOCUMENT OPS

Classify and tag contract clauses with a Hugging Face model before indexing

Splits each signed contract into clauses, classifies them with a Hugging Face model (indemnity, liability, termination, confidentiality), and stores per-clause tags alongside…

CategoryDocument Ops
Enginesim
Difficultyadvanced
Triggerevent
Steps5
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerNew signed contract in DropboxDropboxDropbox
  • ActionExtract text and split into clausesDropboxDropbox
  • ActionClassify each clause via Hugging Face modelHugging FaceHugging Face
  • LogicRoute low-confidence clauses to unclassified bucket
  • OutputWrite contract + labeled clause map to PostgresPostgreSQLPostgres

What it does

Beyond top-level metadata, this workflow understands what's inside a contract. It segments the document into clauses, runs each through a Hugging Face classification model, and labels them — indemnification, limitation of liability, termination, auto-renewal, confidentiality, governing law — then stores the tagged clause map in Postgres next to the contract row.

When to use it

Use it when legal needs to answer clause-level questions across the portfolio: "which contracts cap liability?" or "which auto-renew?" It's the right fit for teams doing contract risk review or due diligence at scale, where plain metadata isn't enough.

How it works

  1. 1A new signed PDF in Dropbox triggers the run.
  2. 2The document text is extracted and split into discrete clauses.
  3. 3Each clause is classified by a Hugging Face inference model into a clause-type label with a confidence score.
  4. 4A logic step routes low-confidence clauses to an "unclassified" bucket so they don't pollute the index.
  5. 5The contract row plus its labeled clause array is written to Postgres, ready for clause-type queries.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect DropboxFiles and folders.
  2. 2
    Connect Hugging FaceModels, datasets, spaces — the open-source hub.
  3. 3
    Connect PostgresAny Postgres URL — query, write, migrate.
  4. 4
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  5. 5
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  6. 6
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.