Natural language processing vs generative AI is not a contest between two rival technologies. Natural language processing (NLP) is a field of AI that tries to get computers to understand and use human language. Generative AI is a family of computational techniques that produce new content such as text, images or audio from training data. The two meet in large language models (LLMs), transformer-based language models that also generate text, so an LLM belongs to both. When there is one right answer to find, a fine-tuned task-specific model often gives better efficiency, accuracy and reliability than prompting an LLM.
Is natural language processing considered AI?
Yes. NLP is a field of artificial intelligence, and Jurafsky and Martin’s Speech and Language Processing calls the field (under its many names, from computational linguistics to language modelling) “the new heart of modern AI”. Britannica describes modern NLP as drawing on computational linguistics, statistics, machine learning and deep learning, after early systems that were hand-coded, rule-based and unable to cope with the exceptions and nuances of language.
So the short answer to “what field is NLP a subset of” is AI. NLP’s methods have shifted several times over the decades. Symbolic approaches dominated roughly from 1965 until the early 1990s, statistical classifiers became the norm for tasks like parsing from the late 1980s, and general neural architectures culminated in the transformer in 2017.
That history matters for scoping. NLP is defined by the problem (human language), not by any one technique, so “using NLP” says nothing about whether the model behind it is a logistic regression, a BERT classifier or a chat model.
Natural language processing vs generative AI: a field versus a model family
NLP is defined by its subject, human language; generative AI by its modelling approach. Feuerriegel and colleagues (2023) note that generative AI is primarily based on generative modelling, which is mathematically distinct from the discriminative modelling often used in data-driven decision support. A discriminative model learns to map an input to a label. A generative model learns enough about the data to produce new samples of it.
The two circles overlap without either containing the other. Generative AI covers text, code, speech and images, and Feuerriegel and colleagues list diffusion probabilistic models for text-to-image generation alongside transformers and LLMs for text. An image generator is generative AI with no language processing in it. In the other direction, a sentiment classifier or a named-entity tagger is NLP that generates nothing.
Quick comparison: NLP, generative AI and LLMs
| NLP | Generative AI | LLM | |
|---|---|---|---|
| What it is | A field of AI working on human language | Techniques that generate new text, images, audio or code | A large, transformer-based language model pretrained on large text corpora |
| Defined by | The data and problem: language | The modelling goal: generation | Its architecture, scale and pretraining |
| Typical outputs | Labels, entities, parses, translations, generated text | New content in any modality | Text, conditioned on a prompt |
| Example methods | SVM, logistic regression, CRF, BERT | GANs, VAEs, diffusion models, LLMs | GPT-3 and its successors |
Is an LLM an NLP model, a generative AI model, or both?
An LLM is both. Feuerriegel and colleagues define an LLM as a neural network for modelling and generating text that combines three things: a large sequential architecture such as a transformer with attention, self-supervised pretraining on auxiliary tasks such as next-word prediction, and very large text datasets. Google’s machine learning glossary puts it more loosely as any transformer-based language model with a very high number of parameters.
Jurafsky and Martin define a language model as a system that, given a prefix of words, assigns a probability distribution over the possible next words. Sample from that distribution repeatedly and you get generated text, which is why the same model sits inside NLP (it processes language) and inside generative AI (it produces new content). For a closer look at the mechanics, our explainer on how language models work goes through tokens, pretraining and inference.
Not every transformer in NLP is generative in this sense. Transformer-based transfer-learning models fall into autoencoding, autoregressive and sequence-to-sequence groups. BERT, for example, is a stack of transformer encoders pretrained to recover corrupted input tokens.
How do generative language models fit within the field of NLP?
Jurafsky and Martin date the shift toward prompted language models to 2019. Until then, they write, the dominant paradigm was statistical classification, where you labelled training data and trained a classifier, and once prompted language models became the centre of the field, NLP “began to be about generation”.
The mechanism is simple to state. LLMs treat any NLP task as a conditional text generation problem, producing the required output from the input alone through in-context learning, without task-specific fine-tuning or large labelled sets. That learning happens during prompting and does not update the model’s weights. LLMs are flexible few-shot or zero-shot learners, needing only a few samples to learn a task such as predicting the sentiment of reviews.
A 2023 evaluation of ChatGPT on 20 popular NLP datasets across 7 task categories found it did well on tasks favouring reasoning, such as arithmetic reasoning, but still struggled with specific tasks such as sequence tagging. An earlier transfer-learning review found zero-shot performance can be surprisingly high but tends to be lower than state-of-the-art fine-tuned models, with zero-shot GPT-3 as its example.
When should you use traditional NLP techniques instead of generative AI?
Use a classical or fine-tuned task-specific model when the task has one right answer (a label, an entity, a relation), you can label some data, and cost, latency or reliability matter. Use a generative model when the output itself is open-ended text, when you have no labelled data yet, or when the task leans on reasoning and world knowledge. The measured evidence comes in two layers.
Classical models against fine-tuned transformers
A cost study on industrial Indonesian datasets compared classical algorithms such as logistic regression and SVM with transformer models on text and sequence labelling, tracking F1 alongside training time, model size, and loading and prediction time. The best classical approaches averaged only around 0.03 F1 below the transformer models. They trained in seconds on a CPU, hundreds of times faster than the transformers, which needed a GPU. Prediction on CPU was about 10 times faster than transformer prediction on GPU. A single customised BERT model could reach 2 GB of storage, which multiplies quickly once you version models. The authors put the accuracy gap at 7% at worst and recommended simple methods for early adopters’ production environments.
That study does not say transformers are no better. A 2021 study of social-science text found that across all its tasks and training-set sizes, conventional SVM and XGBoost models were consistently outperformed by fine-tuned transformers such as BERT and RoBERTa. Both studies find transformers ahead, but they differ on the size of the gap. The cost study also found the F1 gap on one entity dataset narrowed as training data grew, while the social-science study found transfer learning helps most when target training data is small to medium. Our reading is that the gap depends on the task and the data, so it should be measured on your own data before it is assumed.
Fine-tuned small models against prompted LLMs
A 2024 study compared ChatGPT (GPT-3.5 and GPT-4) and Claude Opus, prompted zero-shot, with several smaller fine-tuned LLMs on sentiment, approval, emotion and party-position classification across news, tweets and speeches, and fine-tuning on application-specific data won in all cases. A 2023 study across nine datasets and four information-extraction tasks found advanced LLMs gave lower performance, higher latency and higher cost than fine-tuned small models under most settings.
Explosion, the team behind spaCy, argues the same from practice: for text classification, entity recognition and relation extraction, a few hundred labelled examples and a transformer sized for a single GPU usually give better accuracy than an LLM, using the same architecture in a more convenient size, configured for exactly one task. NIST’s Generative AI Profile (AI 600-1) cites a study finding generative tasks such as summarisation more energy- and carbon-intensive than classification. Jurafsky and Martin note that because LLMs are very expensive, lighter methods remain worthwhile for many text processing tasks. Where model size is the open question, our comparison of small and large language models covers that choice on its own.
Decision table: classical NLP, fine-tuned models or a generative model
| Situation | Better fit | Why |
|---|---|---|
| One right answer (classification, entities, relations) and you can label a few hundred examples | Fine-tuned small transformer | Beat zero-shot LLMs on classification and extraction in published comparisons |
| Tight budget, no GPU, modest labelled data | Classical model (logistic regression, SVM, CRF) | Close on F1, trains on CPU in seconds, predicts faster |
| Very many labels and few training examples | Start classical, then test transformers | 69 labels over 1,365 instances may not be enough for transformers |
| High-volume stream or latency-sensitive interface | Small task model | LLM latency and cost are too high to sit on a data firehose |
| Open-ended output: summaries, drafts, answers | Generative model | Supervised learning’s advantage is stated for non-generative tasks |
| No labels yet, prototyping | Prompted LLM, then replace predictive steps | Use LLM output to bootstrap labelled data and train a replacement |
| A hard minority of samples the small model gets wrong | Small model filters, LLM reranks | A preliminary information-extraction study (filter-then-rerank) reported a 2.4% average F1 gain at acceptable cost |
Explosion’s approach is to split the system into predictive and generative steps first, then decide per step. For one predictive component, that means labelling two to five hours of data, measuring the LLM’s accuracy on it, and training a supervised replacement if the LLM falls short. The upfront advantage of in-context learning is lower overhead, and that advantage counts for less the longer a project runs.
When the generative steps of a language system need to be designed and built, TechnoLynx does that work through Generative & Agentic AI R&D.
Is generative AI different from other kinds of AI?
Generative AI differs from discriminative AI in what it models. NIST describes generative models as producing outputs that approximate the statistical distribution of their training data, as when an LLM predicts the next token. Feuerriegel and colleagues point out the consequence: a generative model produces the most probable response to a prompt, not necessarily the correct one. In LLMs the resulting errors, plausible-looking but nonsensical or incorrect text, are called hallucination. Britannica describes the same effect in probability-based NLP models such as ChatGPT, which can answer with probable but inaccurate text instead of signalling that they do not know.
A classifier can be wrong too, but its output space is fixed and checkable against a label set, which is why the decision table above pushes “one right answer” tasks toward predictive models. Generative models also have a training cut-off and compress what they saw, and both limits can be mitigated by adding real-time retrieval.
Generative AI also covers more than language, from images to speech. Generative adversarial networks (GANs) train a generator, which turns random noise into synthetic samples, against a discriminator trained to tell real data from generated data. Variational autoencoders (VAEs) model the latent space as a probability distribution, so a decoder can sample from it and reconstruct or interpolate between data points. Diffusion probabilistic models are one approach to text-to-image generation. The 2017 transformer paper proposed that transformers could advance generative modelling beyond earlier LSTM networks. The neural network foundations of generative AI are covered separately, as is a working taxonomy of symbolic, traditional ML and generative approaches and a side-by-side of machine learning, deep learning, LLMs and generative AI. The step from generating content to taking actions is a separate distinction, discussed in agentic AI vs generative AI.
Scoping a language project around the step, not the label
“Is this an NLP project or a generative AI project?” says little about how to build it. The question worth settling for each step is whether its output has a right answer you can label. The filter-then-rerank result shows the two sides working together: small fine-tuned models act as filters, and an LLM reranks the difficult samples they identify, giving a 2.4% average F1 gain in a preliminary information-extraction system at acceptable time and cost. The open question for any given project is where that line sits, and that can only be settled by measuring both sides on the project’s own data.