Home/AI & ML Glossary/Natural Language Processing

What is Natural Language Processing?

Natural language processing is the field concerned with getting computers to work with human language, spanning classification, information extraction, search, translation, and generation.

The plain definition

NLP is a broad field, not a single technique. It covers classification (routing a support ticket, detecting sentiment), extraction (pulling parties and dates from a contract), retrieval (finding relevant documents), transformation (translation, summarisation), and generation (drafting a reply).

The field changed shape twice in quick succession — first when transformers replaced recurrent architectures, then when large language models made many tasks solvable with a prompt instead of a bespoke trained model. That second shift is genuinely large, and it has also produced a widespread and expensive overcorrection.

Not everything needs a language model

The overcorrection is reaching for a general-purpose LLM for tasks that a small dedicated model handles better and far more cheaply. For a well-defined classification problem with a few thousand labelled examples, a fine-tuned encoder model is typically faster, an order of magnitude cheaper per call, more consistent because it is not stochastic, and easier to evaluate. Sentiment analysis, intent routing, spam detection, and language identification all sit here.

A reasonable decision rule. Use a small fine-tuned model for high-volume, well-defined, stable tasks where you have labels — classification and structured extraction with a fixed schema. Use an LLM where the task is open-ended, the output is free text, requirements shift faster than you can relabel, or you have no training data and need something working now. Use an LLM to bootstrap and then distil: have it label a few thousand examples, verify them, and train the small model you actually deploy. That combination is frequently the best cost-quality point available.

Classical techniques also remain correct. Regular expressions genuinely are the right tool for structured identifiers. BM25 keyword search still outperforms embeddings on exact part numbers and proper nouns, which is why hybrid retrieval wins.

What makes language hard

Ambiguity is pervasive and often unresolvable without context the model does not have. Domain language defeats general models: clinical notes, legal drafting, and engineering shorthand each have vocabulary and conventions that general pretraining covers thinly. Negation and scope are handled poorly relative to how much they matter — 'no evidence of fracture' and 'evidence of fracture' are close in embedding space and opposite in meaning, which is a real hazard in clinical and compliance work.

Multilinguality is unevenly served; performance drops sharply outside high-resource languages, and code-switching within a single document is harder still. And evaluation is genuinely difficult for generative tasks — there is no single correct summary, so scoring requires either human review or model-graded rubrics, both of which need care to be trustworthy.

One governance point worth flagging early: text data is dense with personal information. Names, addresses, and identifiers appear throughout free-text fields, which makes redaction, retention, and consent live concerns before a single model is trained. See training data on provenance obligations.

  • A field, not a technique — classification, extraction, retrieval, transformation, generation
  • Small models still win — cheaper, faster, and more consistent on fixed, high-volume tasks
  • Distil from an LLM — label with a large model, deploy a small one
  • Negation is a real hazard — opposite meanings sit close in embedding space
FAQ

More on Natural Language Processing.

Do I need a large language model for text classification?

Usually not, if you have labelled data. A fine-tuned encoder model such as a BERT variant is typically faster, far cheaper per prediction, deterministic, and easier to evaluate than prompting a large model. LLMs are the better choice when you have no labels and need something working immediately, or when categories change faster than you can relabel. A strong middle path is to use an LLM to generate and verify labels, then train the small model you actually deploy.

What is the difference between NLP and an LLM?

NLP is the field; a large language model is one technology now used within it. NLP includes decades of methods — rule-based parsing, statistical models, keyword retrieval, small task-specific neural networks — many of which remain the correct choice for particular problems. LLMs handle a remarkably wide range of language tasks with no task-specific training, which is why they dominate current practice, but they have not made the rest of the field obsolete.

Free consultation

Applying this to a
real system?

We build and ship production machine learning. If natural language processing is part of a problem you are working on, tell us about it.

Start the conversation

or write to us at [email protected]