1.0.0
Home
Menu ✕
▼Search
Search content
▼Content Navigator
▼Popular Tags
▼Archive
◀
Home> Artificial Intelligence> Generative AI> Traditional AI versus generative AI

Traditional AI versus generative AI: predict from known data or compose new outputs

What you will find in this article
  • What traditional AI does with labeled data: learn a mapping from known inputs to known outputs, and why a wrong label is learned as faithfully as a right one.
  • The two shapes of a prediction — classification (a class) and regression (a number) — and how a risk score plus a threshold turns a prediction into an operational decision in fraud and spam.
  • The structural limit of that paradigm: a closed answer space, and why recognition, ranking and detection fit it while open-ended creation does not.
  • What changes with generative AI: patterns learned with far less manual labeling, outputs composed at interaction time, conditioning on the prompt, and the Transformer as the reason long context holds together.
  • The analogy to keep — the multiple-choice student versus the writer — and a table to decide which paradigm fits a given task.
CODEFLOW · ARTIFICIAL INTELLIGENCE · GENERATIVE AI Predict or compose From a closed answer space to an output composed at interaction time A B C D choose one of the options compose a new answer Traditional AI labeled pairs model class / value Generative AI raw corpus model new output

A bank wants to know whether the card payment that just arrived is fraud. A city wants to know how many people will go to the beach next Saturday. A support team wants a reply drafted for an angry customer. The first two questions have an answer shape fixed in advance — a class, a number — and the system only has to pick or estimate it. The third has no option to pick: the reply has to be composed. That difference in the shape of the answer is the cleanest line between traditional AI and generative AI, and it decides which one a task needs.[2]

1. Two questions, two paradigms

Traditional AI operates over inputs and outputs that were defined before training. It does not create anything; it learns relations between known variables to estimate a probable answer, which is exactly what prediction and decision support need.[2] The paradigm depends on examples in which the system already knows what went in and what the result should have been.

Generative AI learns the internal regularities of the data and uses them to produce new examples that are coherent with what it learned.[3] The question changes from which label should I assign? to which output can I compose from the patterns I observed? — and that is why the answer does not have to exist beforehand as a closed option: it is built at the moment of the interaction.

Two pipelines: predict inside a closed space or compose a new output — Figure 1
Labeled examples(x, y) pairs Learns the mapping x → ysupervised training Class or valueclosed answer space fraud or normal, spam or legit, 7.7 thousand visitors Prompt (instruction + context) Large raw corpuslabels come from the data Learns the patternsself-supervised training New outputcomposed at interaction time text, image, sound or code that did not exist as an option Traditional AI Generative AI Both lanes learn from data. What differs is the learning signal (an explicit label versus the data itself) and the shape of the answer.
Figure 1 — The traditional pipeline maps a known input to a known kind of answer; the generative pipeline learns patterns without a hand-written label for every example and composes the answer under the guidance of a prompt.

Practise: open in the Lab: Exercise 1, Shape of the answer

2. Traditional AI: learning from labeled examples

Labeled data are records in which every example already carries the category or the value expected for it: a transaction marked fraud or normal, a customer marked cancelled or stayed, a day marked with the number of visitors that actually showed up. Labels exist because the model needs an explicit reference to learn how to map input to output without ambiguity. This is supervised learning: the training procedure adjusts the parameters θ of a function fθ so that its predictions get as close as possible to the labels over the whole training set.[2]

(1) θ* = argminθ  1N  ∑i=1N  L(fθ(xi), yi)

Equation (1) says everything about the dependence on labels: the loss L compares each prediction with its label yi, and nothing else. If the labels are wrong — say, images of dogs marked as human — the system learns the wrong association, because it has no way to correct the semantics of the data on its own: to the optimizer, the label is the truth. Label errors are not a rare curiosity; an audit of ten widely used benchmark test sets found an average of 3.3% mislabeled examples, enough to change which model ranks best.[5]

▼Why the model does not fix a wrong label by itself
A supervised model has no notion of dog or human; it has pixels on one side and a target on the other. Its only job is to make the two agree more often. A consistently wrong label is, from the model's point of view, a consistent pattern to be learned. Only an inconsistent label (the same kind of image marked both ways) shows up as noise, and even that is averaged away rather than flagged. Fixing semantics is a job for the people who curate the dataset, which is why data quality, and not only model choice, dominates the cost of traditional AI projects.[5]

Practise: open in the Lab: Exercise 2, Wrong labels

3. Classification and regression: the two shapes of a prediction

Classification is the task of choosing among discrete categories: cancel or stay, spam or legitimate, fraud or normal operation. Regression estimates a continuous quantity: traffic volume, future demand, the number of people expected at the beach. Both use patterns observed in the history, but they differ in the type of output — a closed class in classification, a numeric value in regression.[2] The simplest models of each family make the contrast explicit:

(2) p(fraud | x) = σ(w·x + b) = 11 + e−(w·x + b)
(3) ŷ = w·x + b

Equation (2) is logistic regression, the workhorse of binary classification: the same weighted sum as in (3), squashed into a probability between 0 and 1 by the logistic function σ, and then turned into a class by a threshold. Equation (3) is linear regression: the weighted sum is the answer, no class involved. Figure 2 shows the two on small examples.

A class on the left, a number on the right — Figure 2
Classification: fraud or normal? time of day amount decision boundary normal fraud Regression: how many beach visitors? visitors (thousands) temperature (°C) 20 38 32 ŷ ≈ 7.7 thousand at 32 °C
Figure 2 — Left: a classifier learns a boundary that separates the labeled classes; every new transaction falls on one side. Right: a regression learns the least-squares line ŷ = 0.494·T − 8.08 over ten labeled days and reads a number off it; the ten points and the line are exact, the scenario is illustrative.
▼Cancel or stay: why customer churn is the classic classification exercise
A telecom's customer table is small and fully labeled: plan, months as a customer, monthly bill, number of support calls, and whether the customer cancelled in the following month. It is the standard first exercise in classification precisely because every ingredient of the paradigm is visible at once — known inputs, a known binary label, and a model that learns which combinations of inputs went with which outcome. Nothing is generated; the model only learns where the boundary lies, and the business acts on it by contacting the customers most likely to leave.[2]

Practise: open in the Lab: Exercise 3, Class or number

4. From prediction to decision: scores, thresholds and triage

Traditional AI observes recurring patterns and turns them into an operational decision. In bank fraud the system learns the usual behaviour of each customer — amounts, hours, places, merchants — and flags deviations with a risk score.[6] In spam filtering it separates messages on the basis of traits already recognised as suspicious, an idea that dates back to the Bayesian filters of the late 1990s.[7] The practical value lies in automating triage, prioritisation and recommendation at a scale no team of analysts could match.

From a transaction to a decision: the score and the threshold — Figure 3
Transactionamount, hour, place Behaviour modelcustomer history Risk score0.87 approve review block 0.87 0 0.5 1 The same pipeline filters spam: message traits → model → score → inbox or junk folder. Recommendation ranks items by a score in the same way. Where the thresholds sit trades missed fraud against false alarms; that is a business decision, not something the model outputs.
Figure 3 — The model produces a score; the decision comes from comparing it with thresholds chosen by the business. Nothing is created: an observed pattern is turned into a rank, a flag or a route.

Practise: open in the Lab: Exercise 4, Score to decision

5. The structural limit: a closed answer space

The restriction of this paradigm is that it generalises over what it has already learned but does not synthesise a new output in the generative sense. It identifies, classifies, ranks or predicts inside a space of answers already delimited by the training data and by the task. The fraud model can only say fraud or normal; the visitor model can only return a number; a recommender can only rank items that exist in its catalogue. That is why recommendation, detection and recognition work well in this model, while open-ended creation demands another approach.[2]

  • Answer space fixed before training. The classes, or the numeric range, are part of the problem statement; the model never adds an option.
  • One label per example. The supervision signal is explicit and expensive: someone had to write it down, and its mistakes are learned as facts.
  • Strength where the space is known. Triage, scoring, ranking and detection are exactly the tasks whose answers are a class or a number, and the paradigm remains the right tool for them.

6. Generative AI: learning patterns to compose new outputs

Generative AI learns the internal regularities of the data and uses them to produce new examples coherent with what it learned.[3] The change of mindset is to leave which label do I assign? for which output can I compose from the observed patterns?. Unlike traditional AI, it can learn with far less dependence on exhaustive manual labeling: instead of requiring every example to come marked with the right answer in a rigid format, it mines large volumes of data to capture structure, sequence, context and implicit relations.[4] That widens the scale of training and changes the kind of knowledge the model can internalise.

The trick is that the label comes from the data itself. A language model is trained to predict the next token of a text that already exists; a masked model is trained to fill in words that were hidden from it.[8] Nobody had to annotate anything: every sentence on the web is simultaneously an input and its own answer. Formally the model learns a probability distribution over whole sequences, factored one step at a time:

(4) p(x1, …, xT | prompt) = ∏t=1T  p(xt | prompt, x<t)

Compare (4) with (2). The classifier outputs a probability over a handful of classes fixed in advance. The generative model outputs a probability over the next piece of an output, conditioned on the prompt and on everything it has already written — and by chaining those steps it assigns probability to sequences nobody listed beforehand. The answer space is no longer a menu; it is the set of all outputs the learned patterns make plausible.

▼Self-supervision is still supervision, technically
The training loop of a language model minimises a loss exactly like equation (1); what changes is where yi comes from. In supervised learning a person wrote it; in self-supervised learning it is the next token of the very text being read.[3] That is why the "less dependence on labels" is real but not absolute: the labels are free and abundant, but they still carry whatever the corpus contains, including its errors and its biases.

Practise: open in the Lab: Exercise 5, Two ways to answer

7. Conditioned composition: prompt, context and coherence over long inputs

The new point, against traditional prediction, is that the output is not pre-fixed as a known class. When the user provides an instruction, the model uses the context it received to determine what to generate — text, image, sound or code. The result remains conditioned on the learned patterns, but it is composed dynamically instead of selected from a list of possible answers.[4]

This capability enables automated writing, image generation, assisted code production and sophisticated machine translation.[9] In real-time translation the system does not merely identify isolated words; it recomposes the message coherently in the target language, which is why neural translation overtook phrase-based systems once attention let the decoder look back at the right part of the source.[10] The same principle is starting to appear in wearables and embedded devices — smart glasses and smart rings — that use contextual generation to support continuous interaction through the day: a caption for what the camera sees, a reply suggested from the last messages, a summary spoken into an earpiece.

Modern generative models keep coherence over larger inputs because they process dependencies between distant parts of the content. The Transformer, presented in the previous article, is the base that handles long context better and sustains semantic continuity during generation: attention lets every position weigh every other one directly, instead of relying on a state that fades with distance.[1] That is decisive in dialogue, translation and long-form writing, where the meaning depends on what came much earlier.

Multiple choice versus writer: pick an option or build the answer — Figure 4
fixed set of answers, known before training input x classifier class A class B class C class D picks one answer composed one token at a time, each conditioned on the previous ones prompt generator The beach was packed … next token Multiple choice Writer Top: the answer must be one of the given options. Bottom: the answer did not exist before; it is built under the constraints of the prompt and the learned patterns.
Figure 4 — The multiple-choice student chooses among alternatives that were given; the writer produces a new story from the repertoire it accumulated. The dashed arcs are the context: every token is chosen in the light of the ones already written, which is what keeps a long output coherent.

The two ways of answering fit in a few lines of code. The shape of the return value is the whole difference:

two_ways_to_answer.py — Python
from math import exp

CLASSES = ["normal", "fraud"]          # closed answer space: fixed before training

def classify(features, weights, bias, threshold=0.5):
    # traditional AI: a score for the positive class, then a decision — equation (2)
    z = sum(w * x for w, x in zip(weights, features)) + bias
    score = 1 / (1 + exp(-z))
    return CLASSES[int(score >= threshold)], score   # one of the known options, plus the score

def predict_value(features, weights, bias):
    # regression: a number, not a class — equation (3)
    return sum(w * x for w, x in zip(weights, features)) + bias

def compose(prompt_tokens, model, max_new=50, stop="<eos>"):
    # generative AI: the answer is built token by token — equation (4)
    context = list(prompt_tokens)
    for _ in range(max_new):
        distribution = model.next_token_distribution(context)   # p(x_t | prompt, x_<t)
        token = distribution.sample()
        if token == stop:
            break
        context.append(token)          # what was written becomes part of the context
    return context[len(prompt_tokens):]   # a sequence nobody listed beforehand

8. Multiple choice versus writer: choosing the paradigm for the task

The most useful analogy is to compare traditional AI to a multiple-choice student and generative AI to a writer. The first chooses among alternatives already given; the second produces a new story from the repertoire it accumulated. The practical implication is direct: traditional systems are strong when the answer space is known, while generative systems stand out when the task demands composition, reformulation and creation conditioned on context. Table 1 puts the two side by side.

AspectTraditional AIGenerative AI
Question it answersWhich class, or which value?Which output can be composed from the patterns?
Training dataLabeled examples, one explicit target eachLarge raw corpora; the target comes from the data itself
Answer spaceClosed — fixed before trainingOpen — any sequence the patterns make plausible
Typical tasksFraud and spam detection, demand forecasting, recommendation, recognitionWriting, code, image and sound generation, translation, dialogue
OutputA class, a number, a rank, a scoreText, image, sound or code composed at interaction time
Controlled byFeatures and the decision thresholdThe prompt and the context window
Main failure modeWrong or biased labels learned as factsFluent but wrong output that reads as correct
Human roleSet thresholds, audit the labels, review flagged casesSpecify the intent, inspect and correct the output

Table 1 — The two paradigms compared. Neither replaces the other: a bank runs a classifier on every transaction and a generative model only where a text has to be written.[2,4]

▼Most real systems use both
The fraud pipeline of Figure 3 is traditional end to end, and should stay that way: its answer is a class and its errors need to be measurable. What generative AI adds is around it — the explanation written for the analyst who reviews a flagged case, the message drafted to the customer, the SQL generated to investigate a pattern. Deciding which parts of a workflow have a closed answer and which need composition is the first design question, well before choosing a model.

9. Conclusion

The line between the two paradigms is not intelligence, size or age; it is the shape of the answer. Traditional AI learns from labeled examples to pick a class or estimate a number inside a space defined before training, which makes it precise, auditable and the right tool for detection, ranking and forecasting. Generative AI learns the patterns of the data itself and composes an output that did not exist as an option, conditioned on the prompt and on a context that the Transformer lets it hold over long stretches. Ask first what shape the answer has: if it is a menu, use the multiple-choice student; if it has to be written, call the writer — and keep a human reading what the writer produces. The next article opens the writer's toolbox: the probabilistic map the model learns instead of a mapping, autoregression one token at a time, self-attention over long context and the embeddings that give meaning its coordinates.

References (10) Tags Related Articles Versions and History
  • [1]A. Vaswani; N. Shazeer; N. Parmar et al. — Attention Is All You Need, NeurIPS 2017. arXiv:1706.03762 (accessed on 09/10/2026)Academic paper
  • [2]T. Hastie; R. Tibshirani; J. Friedman — The Elements of Statistical Learning: Data Mining, Inference, and Prediction, 2nd ed., Springer, 2009. hastie.su.domains/ElemStatLearnBook
  • [3]A. Radford; K. Narasimhan; T. Salimans; I. Sutskever — Improving Language Understanding by Generative Pre-Training, OpenAI, 2018. cdn.openai.comTechnical report
  • [4]T. B. Brown; B. Mann; N. Ryder et al. — Language Models are Few-Shot Learners, NeurIPS 2020. arXiv:2005.14165Academic paper
  • [5]C. G. Northcutt; A. Athalye; J. Mueller — Pervasive Label Errors in Test Sets Destabilize Machine Learning Benchmarks, NeurIPS 2021 Datasets and Benchmarks Track. arXiv:2103.14749Academic paper
  • [6]R. J. Bolton; D. J. Hand — Statistical Fraud Detection: A Review, Statistical Science 17(3), 2002. doi:10.1214/ss/1042727940Academic paper
  • [7]M. Sahami; S. Dumais; D. Heckerman; E. Horvitz — A Bayesian Approach to Filtering Junk E-Mail, AAAI Workshop on Learning for Text Categorization, 1998. microsoft.com/researchAcademic paper
  • [8]J. Devlin; M.-W. Chang; K. Lee; K. Toutanova — BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding, NAACL 2019. arXiv:1810.04805Academic paper
  • [9]M. Chen; J. Tworek; H. Jun et al. — Evaluating Large Language Models Trained on Code, 2021. arXiv:2107.03374Academic paper
  • [10]D. Bahdanau; K. Cho; Y. Bengio — Neural Machine Translation by Jointly Learning to Align and Translate, ICLR 2015. arXiv:1409.0473Academic paper

Further reading

  • [a]I. Goodfellow; Y. Bengio; A. Courville — Deep Learning, MIT Press, 2016. deeplearningbook.orgBook
  • [b]scikit-learn developers — Supervised learning, scikit-learn User Guide. scikit-learn.orgDocumentation

References verified on 09/10/2026 and checked during technical review. External links open outside Codeflow.

Key concepts:Labeled dataClassification vs regressionRisk score and thresholdClosed answer spaceSelf-supervised patternsConditioned composition

Click a tag to list all related articles.

Title Category Reading Published Status
Mythology, automata and the origin of the question: the early history of AI, from Turing to the first winter Artificial Intelligence14 min 09/10/2026 Published
From output prediction to the probabilistic map: autoregression, self-attention and embeddings Artificial Intelligence13 min 09/10/2026 Published
When code stops being the differentiator: the developer's role with generative AI Artificial Intelligence13 min 09/09/2026 Published
Fundamentals over tools: how to evaluate and build with generative AI Artificial Intelligence12 min 09/09/2026 Published
What is Generative AI, and why did it only become viable now? Artificial Intelligence12 min 09/08/2026 Published
5 related article(s) in Artificial Intelligence
Article version
1
Published on
09/10/2026 08:00
Author
@rafaelsantos
Source language
English

09/10/2026 08:00 — Initial publication of the article.

▼Comments

Comments are GitHub Discussions on codeflow/codeflow.github.io. Sign in with GitHub to post; each article has its own thread.

Contents
Help
Article Contents ✕
Figures

The contents reflect the article open in the main area.

Help ✕
How to read an article

The labels at the top indicate the category, level and review stage of the content. Numbered citations [1] point to the References tab at the end of the article.

The formulas are numbered on the right and referenced in the text as “equation (n)”. The figures are SVG: they follow browser zoom without loss.

Use the language selector at the top to switch between versions of the same article, when they exist.

Exercise Lab ✕
Language not available ✕


You can keep reading it in the current language or go to the Home page in the selected language.