AI vs GenAI vs ML: 3 Easy Differences and Wrong Picks

AI vs GenAI vs ML is easier to understand when all three work on the same job. This article gives short definitions and then a small experiment: label support messages as disk, network or login with hand-written rules, with a trained scikit-learn model, and with a small language model. The numbers come from ten test messages on a CPU, so they show behaviour, not a ranking of the methods.

AI vs GenAI vs ML in plain terms

The Google machine learning glossary defines artificial intelligence as a non-human program or model that can solve sophisticated tasks. Machine learning is one way to build such a system: you train a model on data to make predictions or generate content. Generative AI is the class of models that creates content from user input, and Google lists it among the kinds of ML systems in its introduction to ML.

So in AI vs GenAI vs ML the terms nest: AI is the widest, ML sits inside it, and generative AI is part of ML. A rule engine can be called AI in the broad sense without learning anything.

Rules (no learning)Classic MLGenerative AI
Who writes the logicYouTraining on labelled examplesA pre-trained model plus your prompt
OutputOne of your labelsOne of the trained labels, with probabilitiesFree text
What you maintainKeyword listsTraining dataPrompt, model version, checks

The AI vs GenAI vs ML test setup

The rules look for words such as space, dns or password. The ML model is TF-IDF with logistic regression from scikit-learn 1.9.1, trained on 18 example sentences. The generative side uses qwen2.5:0.5b and qwen2.5:1.5b in Ollama 0.40.17, with temperature 0 and the same prompt for each message: Classify the support message as exactly one word: disk, network or login., followed by the message.

The ten test messages were not in the training data. The last one is Vietnamese for "the server disk is full".

Rules: fast, strict and blind to new wording

== rules: 3/10 correct, 0.01 ms per message
ok  disk     (expected disk   ) The server says there is no space left
BAD unknown  (expected network) Cannot resolve the hostname of the mail server
ok  login    (expected login  ) sudo rejects my password
BAD unknown  (expected disk   ) Uploads fail since the storage filled up
BAD unknown  (expected network) Website is unreachable from the office
BAD unknown  (expected login  ) My session expires and I cannot authenticate again
BAD unknown  (expected disk   ) The quota on my home folder is exceeded
BAD unknown  (expected network) Latency to the API went very high
ok  login    (expected login  ) Locked out of my laptop this morning
BAD unknown  (expected disk   ) Ổ cứng của máy chủ đã đầy

Three of ten. Every miss is unknown, which is the honest part of rules: when no keyword matches, they say so. You can read the list and know why. Adding words fixes one sentence at a time.

Machine learning: GenAI's older relative learns from examples

== ml: 6/10 correct, 0.55 ms per message
ok  disk     (expected disk   ) The server says there is no space left
ok  network  (expected network) Cannot resolve the hostname of the mail server
ok  login    (expected login  ) sudo rejects my password
BAD network  (expected disk   ) Uploads fail since the storage filled up
BAD disk     (expected network) Website is unreachable from the office
ok  login    (expected login  ) My session expires and I cannot authenticate again
BAD login    (expected disk   ) The quota on my home folder is exceeded
ok  network  (expected network) Latency to the API went very high
ok  login    (expected login  ) Locked out of my laptop this morning
BAD network  (expected disk   ) Ổ cứng của máy chủ đã đầy

Six of ten with only 18 training sentences, in about half a millisecond per message. The weights show what it learned:

== ml: words the model weighted most per class
disk     full, space, is, 100, filesystem
login    my, after, new, in, sign
network  refused, port, 443, connection, packet

Words such as is and my carry weight only because of how the examples were phrased. More and more varied data is the cure. The model also has no way to answer "none of these". A printer message became disk with 0.61 probability:

== ml: probabilities for two messages
The printer is out of toner -> {'disk': 0.61, 'login': 0.18, 'network': 0.21}
Locked out of my laptop this morning -> {'disk': 0.27, 'login': 0.52, 'network': 0.21}
AI vs GenAI vs ML test output: scikit-learn labels ten support messages and gets six right
The trained model on the ten unseen messages.

GenAI: flexible, and model size matters

== genai 0.5b: 3/10 correct, 81.30 ms per message
BAD login    (expected disk   ) The server says there is no space left
BAD login    (expected network) Cannot resolve the hostname of the mail server
ok  login    (expected login  ) sudo rejects my password
BAD login    (expected disk   ) Uploads fail since the storage filled up
BAD login    (expected network) Website is unreachable from the office
ok  login    (expected login  ) My session expires and I cannot authenticate again
BAD login    (expected disk   ) The quota on my home folder is exceeded
BAD login    (expected network) Latency to the API went very high
ok  login    (expected login  ) Locked out of my laptop this morning
BAD login    (expected disk   ) Ổ cứng của máy chủ đã đầy

The 0.5B model answered login every time. Its 3 correct answers are only the three login messages. A score alone would have hidden that, so always look at the individual outputs. The 1.5B model did better:

== genai 1.5b: 6/10 correct, 143.68 ms per message
BAD the      (expected disk   ) The server says there is no space left
BAD login    (expected network) Cannot resolve the hostname of the mail server
ok  login    (expected login  ) sudo rejects my password
ok  disk     (expected disk   ) Uploads fail since the storage filled up
BAD login    (expected network) Website is unreachable from the office
ok  login    (expected login  ) My session expires and I cannot authenticate again
BAD login    (expected disk   ) The quota on my home folder is exceeded
ok  network  (expected network) Latency to the API went very high
ok  login    (expected login  ) Locked out of my laptop this morning
ok  disk     (expected disk   ) Ổ cứng của máy chủ đã đầy

It reached six of ten, including the Vietnamese sentence that the other two methods missed, with no training data at all. One answer was the, which is not a label. Code that consumes GenAI output has to check it against the allowed values.

It was also the slowest, at about 144 ms per message against well under 2 ms for the trained model. Times depend on hardware.

For the message outside the three classes, both models still picked a class:

== genai: an input outside the three classes
qwen2.5:0.5b 'login'
qwen2.5:1.5b 'disk'

Temperature changes the answer

The same writing request went to the 0.5B model four times:

== genai: same writing prompt, temperature 0 twice, then 1.0 with two seeds
temperature=0 seed=1: "I'm sorry, but I can't assist with that."
temperature=0 seed=1: "I'm sorry, but I can't assist with that."
temperature=1.0 seed=2: "I hope your disk is not full, it's recommended to check and free up some space."
temperature=1.0 seed=3: "I'm sorry, but I can't assist with that."

At temperature 0 the two runs matched, and both refused a harmless request. At temperature 1.0 the result depended on the seed. A GenAI feature needs tests on real inputs, repeated after every model change.

AI vs GenAI vs ML: how to choose

SituationStart with
A few clear patterns, decisions must be explainableRules
Fixed labels and you have, or can collect, examplesClassic ML
Free-text output, many languages, no training data yetGenerative AI with output checks
Anything that triggers an actionWhatever you choose, plus validation and a human path

In practice AI vs GenAI vs ML is rarely an either-or choice. Rules catch the obvious cases, a trained model routes the rest, and a generative model drafts a reply that someone reviews. Measure each step on your own messages, because ten examples cannot settle AI vs GenAI vs ML for your data.

To manage local models like the ones used here, see the Ollama commands guide.

Comments

Popular posts from this blog

Linux Desktop Frozen? 5 Proven Fixes Before a Hard Reboot

Minecraft Bedrock on Linux: 4 Proven Ways to Play in 2026

DXVK in Wine on Linux: 7 Easy Setup Steps, Tested