GenAI Lesson 2 – Evolution of AI | Dataplexa

Evolution of AI: From Rules to Generative AI

To really understand Generative AI, we need to understand "what failed before it".

GenAI didn’t appear suddenly. It is the result of decades of trial, error, and engineering limitations.

In this lesson, we’ll walk through the evolution of AI the same way industry experienced it.

Phase 1: Rule-Based Systems (The First AI)

The earliest AI systems were not “learning” systems. They were collections of rules written by humans.

If this happens → do that.

These systems worked only when:

  • The problem space was small
  • Rules were predictable
  • Humans could think of every case

Here’s a simple example of a rule-based system.


def spam_filter(email):
    if "win money" in email.lower():
        return "spam"
    if "free offer" in email.lower():
        return "spam"
    return "not spam"

print(spam_filter("You win money now"))
  

This works — until it doesn’t.

The moment users change wording, the system breaks. There is no learning, only matching.

spam

Why Rule-Based AI Failed at Scale

As systems grew, rules became unmanageable.

Engineers faced:

  • Thousands of brittle rules
  • Unexpected edge cases
  • No ability to adapt

This forced a shift from “programming behavior” to “learning behavior”.

Phase 2: Traditional Machine Learning

Traditional ML introduced a powerful idea:

Don’t write rules. Learn patterns from data.

Instead of saying *what to do*, we let models learn relationships.

For example, spam detection became a classification problem.


from sklearn.feature_extraction.text import CountVectorizer
from sklearn.linear_model import LogisticRegression

texts = ["win money now", "meeting tomorrow", "free offer inside"]
labels = [1, 0, 1]

vectorizer = CountVectorizer()
X = vectorizer.fit_transform(texts)

model = LogisticRegression()
model.fit(X, labels)

print(model.predict(vectorizer.transform(["free money"])))
  

This system is better.

But it still has a strict limitation: it can only choose from predefined outputs.

[1]

The Ceiling of Traditional ML

Traditional ML is excellent at:

  • Classification
  • Regression
  • Ranking

But it struggles with:

  • Open-ended generation
  • Creative tasks
  • Long-form reasoning

You can classify an email. But you cannot *write* an email.

That limitation pushed AI to the next phase.

Phase 3: Deep Learning

Deep learning introduced neural networks capable of learning complex representations.

Instead of manual features, models learned features automatically.

This unlocked:

  • Speech recognition
  • Image recognition
  • Language understanding

But early deep learning models were still mostly discriminative.

They answered: “What is this?” not “Create something new.”

The Critical Shift: Modeling Probability Distributions

The real breakthrough came when models started learning:

P(data) instead of P(label | data)

This subtle shift changed everything.

If a model understands the distribution of data, it can sample from it.

Sampling = generation.

Phase 4: Generative Models

Generative models don’t predict a class. They predict what could come next.

Let’s compare both mindsets side by side.

Traditional ML:

Given input → choose correct label

Generative AI:

Given context → generate next element

A Tiny Example of the Generative Mindset

Instead of predicting “positive” or “negative”, we predict the next word.


context = ["the", "future", "of", "ai", "is"]
possible_next = ["generative", "bright", "unknown"]

import random
print(random.choice(possible_next))
  

Large language models do this — just with billions of parameters and learned probabilities.

generative

Why Transformers Changed Everything

Earlier generative models struggled with long context.

Transformers introduced attention: the ability to look at all parts of input at once.

This allowed models to:

  • Understand long documents
  • Maintain coherence
  • Scale efficiently

Once Transformers met massive data and compute, GenAI became practical.

What This Evolution Means for You as an Engineer

You are no longer just training models.

You are designing systems that:

  • Generate outputs
  • Must be controlled
  • Must be evaluated differently

This is why GenAI engineering includes prompts, retrieval, tools, and safety.

Practice

What was the earliest form of AI called?



Traditional ML is mainly designed for what type of task?



What new capability did GenAI introduce?



Quick Quiz

What do generative models learn?





What process allows models to create new outputs?





Which architecture enabled modern GenAI at scale?





Recap: AI evolved from rigid rules to learning systems, and GenAI emerged when models learned to generate from data distributions.

Next up: We’ll dive into foundation models — the backbone of all modern GenAI systems.