Home / Insights / AI and Machine Learning

AI and Machine Learning

Named Entity Recognition for Business Documents: Models, Labelling and Accuracy

Named entity recognition pulls names, dates, amounts, parties and product codes out of free text so systems can act on them. This guide helps technical and operations leaders choose an approach, plan the labelling work, and measure accuracy in a way that predicts how the system will behave in production.

TopicsAI and Machine LearningGenerative AI and LLMs

Key takeaways

  • Named entity recognition (NER) turns free text into structured fields; for business documents the entity types are usually your own (supplier, policy number, delivery date), not the generic person, organisation and location of public datasets.
  • There are four practical approaches, rules, fine-tuned encoder models, compact zero-shot models and prompted large language models, and many production systems combine two of them.
  • Labelling guidelines matter more than labelling volume: ambiguous rules produce inconsistent labels, and no model can learn better than the agreement between your annotators.
  • Measure entity-level precision and recall per entity type on a held-out set that reflects real documents, and decide in advance which errors are costly.
  • Design for imperfect accuracy from day one: confidence thresholds, validation against business data and a human review queue turn a good model into a dependable process.

A large share of business information still arrives as text: emails, contracts, purchase orders, referral letters, claims forms, support tickets and meeting notes. Before software can route, check or act on that information, someone or something has to find the relevant pieces, such as the customer name, the invoice number, the amount, the delivery date or the clause that sets a notice period. Named entity recognition, usually shortened to NER, is the family of techniques that does this automatically.

This article is for CTOs, engineering managers and operations leaders who are considering NER for a document workflow. It explains what NER involves for business documents, compares the main model approaches, sets out how to plan labelling, shows how to measure accuracy properly, and covers deployment, costs and risks. It reflects how our natural language processing team approaches entity extraction: combining classic NLP techniques with language models, with confidence scoring, human review for uncertain results, evaluation sets and monitoring built in.

What named entity recognition means for business documents

In research, NER traditionally means finding a small set of generic entity types in news text. The CoNLL-2003 shared task, one of the field’s best-known benchmarks, framed language-independent NER in this way, and many off-the-shelf models are still trained on similar data. Libraries such as spaCy ship pre-trained pipelines that recognise labels like ORG, GPE, MONEY and DATE.

Business documents are different in three ways:

  • Custom entity types. You care about supplier, buyer, policy number, SKU, medication, referring practitioner or termination date, not just organisation or date. A generic model will find a date; it will not know which date is the delivery date.
  • Layout and format. Text comes from PDFs, scans, tables and email threads. Line breaks, headers and OCR errors affect what the model sees.
  • Downstream consequences. An extracted amount may trigger a payment, and an extracted date may set a deadline. Errors have a cost, so accuracy has to be measured and managed.

NER versus related tasks

It helps to be precise about scope. NER finds spans of text and labels them. Classification assigns a label to a whole document or message. Relation extraction links entities (this amount belongs to this line item). Normalisation converts what was found into a standard form, for example turning 3rd of March or 03/03 into an ISO date, or matching a supplier name to an ID in your ERP. Most business projects need NER plus normalisation, and some need relation extraction too. Scoping this early prevents disappointment when a model finds every date but cannot say which one matters.

Rules, trained models or large language models: the options

There are four practical approaches. Each has a place, and the best production systems often combine them.

ApproachHow it worksStrengthsWeaknessesGood fit
Rules and patternsRegular expressions, dictionaries, layout rulesPrecise, explainable, no training data, cheap to runBrittle with varied wording; maintenance grows with varietyIDs with fixed formats, known product codes, templated documents
Fine-tuned encoder modelsA transformer such as a BERT-family model trained on your labelled examples to tag tokensHigh accuracy on your domain, fast and cheap per document, can run on your own serversNeeds labelled data, typically hundreds to a few thousand examples per entity type, and retraining when types changeStable, high-volume workflows with clear entity types
Compact zero-shot NER modelsA small model that takes entity type names as input and finds matching spansNo training to start, runs locally, quick to prototype new typesLower accuracy than a fine-tuned model on niche types; still needs evaluationPrototypes, long-tail entity types, bootstrapping labels
Prompted large language modelsA general LLM instructed to return entities, usually as JSONFlexible, handles reasoning (which date is the delivery date), little setupHigher cost and latency per document, output format must be validated, may produce values not present in the textLower volumes, complex documents, early discovery

The case for compact models

Research on generalist NER models is worth watching. The GLiNER paper (November 2023) describes a compact bidirectional transformer that can recognise arbitrary entity types supplied at run time, and reports that it outperformed ChatGPT and fine-tuned LLMs in zero-shot evaluations on several NER benchmarks. Benchmarks are not your documents, but the direction is important: you do not always need a large, expensive model to extract entities.

Common hybrid patterns

  • Rules for formats, models for meaning: regular expressions catch invoice numbers and postcodes; a model handles party names and free-text dates.
  • LLM to bootstrap, encoder to scale: use a prompted LLM to pre-label a few thousand documents, have people correct the labels, then fine-tune a smaller model for production volume.
  • Model plus validation: any approach, followed by checks against business data (does this supplier exist, is this amount within range, does the date fall in a plausible window).

How to choose the right approach for your workflow

The decision depends on a handful of factors you can usually answer in a short discovery phase.

QuestionIf the answer is…Lean towards
How many documents per month?Tens of thousands or moreFine-tuned encoder or compact model for cost and speed
How varied is the wording and layout?Mostly templatedRules first, model for exceptions
Do entity types change often?Yes, new types each quarterZero-shot model or prompted LLM, with evaluation each time
Does extraction need reasoning across the document?Yes (which party is the buyer, which date is binding)Prompted LLM or encoder plus relation extraction
Can text leave your environment?No, or only with strict termsSelf-hosted encoder or compact model
How costly is a missed or wrong entity?High (payments, clinical, legal)Any model plus validation and mandatory review of low-confidence results

For example, a logistics company processing delivery notes from fifty carriers might use rules for consignment numbers, a fine-tuned model for addresses and dates, and route anything below a confidence threshold to an operator. A law firm reviewing a few hundred contracts a month might instead use a prompted LLM to find parties, dates and notice periods, with a lawyer confirming each one.

If you are weighing commercial and open models for the LLM option, our article on evaluating GPT-4, Claude, Gemini and open models sets out a method. If you are considering fine-tuning a small model, see when LoRA fine-tuning is worth the effort.

Planning the labelling work

Whatever approach you choose, you need labelled examples: to train a model, to test a prompt, or at minimum to measure accuracy. Labelling is where many NER projects quietly fail.

Write the guidelines first

Before anyone labels a document, write a guideline that defines each entity type with examples and counter-examples. Decide the hard cases explicitly:

  • Does a company name include Ltd or Pty Ltd?
  • Is the date in an email signature a document date?
  • Are amounts labelled with or without currency symbols?
  • What happens when an entity spans a line break or a table cell?
  • Are abbreviations and misspellings labelled as the entity?

Labelling format

Most token-level tools use the BIO (or IOB) scheme. As the Hugging Face token classification guide explains, B- marks the beginning of an entity, I- marks a token inside it and O marks tokens outside any entity. Modern transformer tokenisers split words into sub-word pieces, so labels have to be aligned carefully to the first sub-word of each word; mistakes here silently damage training. Store labels as character offsets in the original text as well, so you can switch tools or tokenisers without relabelling.

A labelling process that works

  1. Sample documents that reflect real variety: every major source, layout, language and quality level, including bad scans.
  2. Have two people label the same first batch independently, then compare. Where they disagree, refine the guideline.
  3. Track inter-annotator agreement. If two trained people agree on only part of the entities, the guideline is ambiguous, and no model will do better than that agreement.
  4. Use model pre-labelling to speed up later batches, but make annotators confirm every span; pre-labels bias people towards accepting errors.
  5. Keep a held-out test set that nobody trains on or tunes prompts against.

Domain experts should label or at least review. An accounts payable clerk knows which reference is the purchase order number; a generic annotator may not.

Measuring accuracy in a way that predicts production

A single accuracy number is almost meaningless for NER. Most tokens in a document are not entities, so a model that labels everything as outside can score high token accuracy while finding nothing useful.

Use entity-level metrics

  • Precision: of the entities the system extracted, how many were correct?
  • Recall: of the entities that were really there, how many did it find?
  • F1: the harmonic mean of the two.

Report these per entity type, not just overall. A system can be excellent at dates and poor at party names, and the average hides it. Decide whether partial matches count: extracting Acme instead of Acme Holdings Pty Ltd may be acceptable for search but not for a contract register.

Decide which errors cost more

For payment workflows, a wrong amount (a precision failure) is usually worse than a missed one, because a missed amount goes to review. For compliance screening, missing an entity (a recall failure) may be worse. Agree targets per entity type with the business owner, in terms of the workflow: for example, at least 98% precision on invoice totals, with anything uncertain sent to review.

Measure the process, not just the model

Once validation rules and review are in place, the meaningful numbers are straight-through rate (documents needing no human touch), error rate after review, and time per document. Track them per source, because accuracy often varies sharply between a clean digital PDF and a phone photo of a printed form. Our guide to evaluation sets and regression checks explains how to keep these measurements running as models and prompts change.

Deploying NER into a real workflow

A model in a notebook is not a working system. The pipeline around it matters as much.

A typical production pipeline

  1. Ingest and convert: receive documents, run OCR where needed, and preserve layout information such as page, line and table position.
  2. Pre-process: clean OCR noise, split long documents into sections, and detect language.
  3. Extract: run rules and models, returning each entity with its text span, label and a confidence score.
  4. Normalise and validate: convert dates and amounts to standard formats, match names against master data, and apply business rules.
  5. Route: send high-confidence, validated results straight through; send the rest to a review screen that highlights the span in the original document.
  6. Learn: store reviewer corrections as new labelled data for the next training or prompt iteration.

Practical design points

  • Always keep the link from an extracted value back to its location in the source document. Reviewers and auditors need it.
  • When using an LLM, require structured JSON output, validate it against a schema, and reject values that do not appear in the source text unless the field is meant to be inferred.
  • Version models, prompts and guidelines together, so you can explain why last month’s output differs from this month’s.
  • Monitor confidence distributions and review rates over time; a sudden rise usually means a new document source or template has appeared.

Costs, privacy and risks

The main cost drivers are rarely the model itself.

  • Labelling time: domain experts’ hours for guidelines, labelling and review are often the largest early cost.
  • Document conversion: OCR and layout handling for poor scans can take more engineering effort than extraction.
  • Run cost: prompted LLMs are charged per token and add latency; fine-tuned encoders and compact models are typically much cheaper per document at volume, but need hosting and occasional retraining.
  • Human review: the review queue is an ongoing operating cost; reducing it is where accuracy improvements pay back.

Privacy and security

Business documents contain personal data: names, addresses, health details, bank information. Decide early where processing can happen. Self-hosted models keep text in your environment; external APIs require data processing agreements and a check of retention terms. Apply data minimisation, restrict access to review screens, and log who viewed what. Ironically, NER is also one of the main tools for finding and redacting personal data, so the same pipeline can support privacy controls elsewhere.

Risk summary

RiskMitigation
Inconsistent labels produce an unreliable modelWritten guidelines, double labelling, agreement tracking
Test set does not reflect real documentsSample by source and quality; refresh the test set as sources change
LLM returns values not in the textSchema validation, span matching, review of unmatched values
Accuracy drops on new templatesMonitor review rates by source; add examples and retrain
Sensitive data exposed to third partiesSelf-hosting or contractual controls, redaction, access logging

A checklist for your first NER project

  • Entity types are defined in business terms, including which date, amount or party matters.
  • Normalisation and validation rules are specified for each entity type.
  • A labelling guideline with examples and edge cases is written and tested with two annotators.
  • A representative held-out test set exists, sampled across sources and document quality.
  • Precision and recall targets are agreed per entity type with the business owner.
  • The approach (rules, fine-tuned, zero-shot, LLM or hybrid) is chosen against volume, variety, privacy and cost.
  • Every extraction carries a confidence score and a link to its source span.
  • Low-confidence or invalid results go to a review screen; corrections are captured as training data.
  • Models, prompts and guidelines are versioned together, and accuracy is re-measured on each change.
  • Review rates and accuracy are monitored per document source after launch.

Start with one document type and a few entity types that matter most, prove the accuracy and review flow, and expand from there.

Frequently asked questions

Can we use an off-the-shelf NER model for our documents?

Pre-trained models handle generic types such as organisations, dates and amounts reasonably well, but they do not know your business meaning, for example which date is the delivery date or which organisation is the supplier. Most business projects need custom entity types, through fine-tuning, a zero-shot model or a prompted LLM.

How many labelled examples do we need?

It depends on the approach. A prompted LLM or zero-shot model needs only a test set to measure accuracy, typically a few hundred documents. Fine-tuning an encoder usually needs hundreds to a few thousand labelled examples per entity type, depending on variety. Clear guidelines reduce how many you need.

Is a large language model always more accurate than a smaller model?

No. LLMs are flexible and good at reasoning across a document, but a smaller model fine-tuned on your data can match or beat them on well-defined entity types at a fraction of the cost per document. Research such as GLiNER also shows compact models performing strongly in zero-shot settings.

What accuracy should we expect?

There is no universal figure; it depends on document quality, entity types and guideline clarity. Measure precision and recall per entity type on your own held-out documents, set targets with the business owner, and design review for whatever the model cannot handle confidently.

Can NER run without sending documents to an external provider?

Yes. Fine-tuned encoder models and compact zero-shot models can run on your own servers or private cloud, and open-weight language models can be self-hosted too. This is often the preferred option for health, legal and financial documents.

Sources and methodology

Guidance reflects PoliteTech delivery experience. The external references below informed specific points in this article.

  1. Hugging Face: Token classification task guide — accessed 9 November 2026. BIO labelling scheme, sub-word label alignment and entity-level precision, recall and F1 with seqeval
  2. Zaratiana et al.: GLiNER, Generalist Model for Named Entity Recognition using Bidirectional Transformer (arXiv, November 2023) — accessed 9 November 2026. Compact zero-shot NER model reported to outperform ChatGPT and fine-tuned LLMs on several benchmarks
  3. spaCy: Linguistic features, named entities — accessed 9 November 2026. Pre-trained entity labels, document-level entity annotation and dependence of statistical models on training data
  4. Tjong Kim Sang and De Meulder: Introduction to the CoNLL-2003 Shared Task (ACL Anthology, 2003) — accessed 9 November 2026. Background on the classic language-independent NER benchmark

Which fields do you need pulled out of your documents?

Send us a description of your documents and the entities you need. We can assess the right approach, plan the labelling and measure accuracy on a sample before you commit to a build.