Beginner

AI and Generative AI Explained

A no-prerequisite tour of AI, machine learning, deep learning, generative and agentic AI, hallucinations and AI ethics.

Level: Beginner — Highly accessible, no prior technical knowledge required


Table of Contents

  1. The Moment Everything Changed
  2. Defining Artificial Intelligence
  3. AI in Popular Culture
  4. What Are AI, AGI, and Super-Intelligence?
  5. AI and Machine Learning
  6. The Deep Learning Revolution
  7. What Is Generative AI?
  8. Visual AI
  9. From Prediction to Reasoning
  10. Agentic AI
  11. When AI Goes Wrong — Hallucinations
  12. AI Ethics and Responsible Use
  13. Summary and Conclusion
  14. Key Terms Glossary

1. The Moment Everything Changed

Let’s go back to November 2022. It wasn’t AI itself that changed that day — it had been developing for years. What changed was who had access to it.

Before that moment, AI existed in three forms:

┌────────────────────────────────────────────────────────────────────┐
│              AI BEFORE NOVEMBER 2022                               │
├──────────────────┬─────────────────────┬───────────────────────────┤
│  ACADEMIC        │  INDUSTRIAL          │  HIDDEN                   │
├──────────────────┼─────────────────────┼───────────────────────────┤
│ • Researchers    │ • Google Search      │ • Facial recognition      │
│ • Journals       │ • Netflix / Spotify  │ • Anti-spam filters       │
│ • Invite-only    │ • Fraud detection    │ • AI in video games       │
│   conferences    │ • Autonomous cars    │ • Purchase suggestions    │
│ • Isolated labs  │ • Finance            │                           │
└──────────────────┴─────────────────────┴───────────────────────────┘

Then ChatGPT launched on November 30, 2022.

xychart-beta
    title "ChatGPT Growth - Users (millions)"
    x-axis ["Launch (Nov 2022)", "1 month", "2 months (100M)"]
    y-axis "Users (millions)" 0 --> 100
    line [0, 57, 100]

Fact: 100 million users in 2 months — the fastest technological growth in history.

This shift wasn’t due to new technology. It was due to accessibility: no API key, no programming, just a text box.


2. Defining Artificial Intelligence

Defining AI is harder than it appears. The word “artificial” poses no problem. It’s the word “intelligence” that resists precise definition.

Defining Attempts Through History

ResearcherEraProposed Definition
Marvin Minsky1968”The science of making machines do things that would require intelligence if done by men.”
Nils Nilsson“The activity devoted to making machines intelligent, and intelligence is that quality that enables an entity to function appropriately and with foresight in its environment.”
Dartmouth Summer Project1956”Every aspect of learning or any other feature of intelligence can in principle be so precisely described that a machine can be made to simulate it.”

The Evolution of AI Approaches

timeline
    title Evolution of Artificial Intelligence Approaches
    section 1950s–1970s
        Rule-based systems : Symbolic logic
            : Deductive reasoning
            : "If A then B"
    section 1980s–1990s
        Expert Systems : Rules coded by human experts
            : Medical diagnosis, chemical identification
            : Deep Blue (Chess) — 1997
    section 2000s–2010s
        Statistical Machine Learning : Learning from data
            : Patterns extracted from examples
            : AlphaGo — 2016
    section 2012+
        Deep Learning : Layers of artificial neurons
            : Learning complex representations
            : ChatGPT, Claude, Gemini

Deep Blue (IBM, 1997) vs Garry Kasparov:

  • Approach: rule-based
  • Evaluates millions of possible moves per turn
  • Each evaluation written by hand by humans
  • Considered AI at the time → today: just a search algorithm

AlphaGo (DeepMind, 2016):

  • Learns from millions of human games
  • Improves by playing against itself (reinforcement learning)
  • Makes moves humans would never have considered
  • AlphaGo Zero: no human data — learns only from the rules of the game, plays 5 million games against itself in 3 days

2.1 The AI Effect

“Once you understand how something works, it stops being AI. It becomes just computation.”

This is known as the AI Effect, or Tesler’s Theorem:

AI Effect (Tesler's Theorem):
AI is whatever hasn't been done yet.

  ┌─────────────────────────────────────────────────────┐
  │  What was considered AI just yesterday...           │
  │                                                     │
  │  Chess playing → search algorithm                   │
  │  Anti-spam filters → classification                 │
  │  Speech recognition → signal processing            │
  │  Recommendations → collaborative filtering         │
  │  Translation → statistics                          │
  └─────────────────────────────────────────────────────┘
      ↓  once understood = "just software"

Even before computers, human stories imagined created intelligence. These narratives have deeply shaped our expectations and fears.

graph TD
    A["Frankenstein\n(Mary Shelley, ~1818)\nThe anxiety of creating\nsomething that surpasses us"] 
    B["2001: A Space Odyssey\n(Kubrick, 1968)\nHAL 9000 — Goal misalignment\n'I'm sorry, Dave. I'm afraid I can't do that.'"]
    C["WarGames\n(1983)\nAutomated decision-making\nwithout understanding consequences"]
    D["Terminator\n(1984)\nUnintended emergent\nautonomy"]
    E["Matrix\n(1999)\nLoss of reality — simulation"]
    F["Iron Man — JARVIS\nAssistance, partnership\naugmentation, not replacement"]
    G["Diamond Age\n(Neal Stephenson)\nThe Young Lady's Illustrated Primer\nAI that teaches critical thinking"]

    subgraph FEARS["Our Fears"]
        A
        B
        C
        D
        E
    end
    subgraph HOPES["Our Hopes"]
        F
        G
    end

    style FEARS fill:#ffeeee,stroke:#cc4444
    style HOPES fill:#eeffee,stroke:#44cc44

What Fiction Has Taught Us (and Misled Us About)

Fiction imagines AI with:

  • Personality and motivation
  • Consciousness and morality
  • Autonomy and loyalty

None of these things exist in current AI systems.

What fiction predicts      ≠    What AI actually does
──────────────────────────────────────────────────────────────
Malicious intent                 Optimizing a function
Consciousness                    Pattern matching
Decision to destroy us           Objective misalignment
Autonomous agency                Predicting the next token

Better question to ask: Not “will it decide to eliminate us?” but “what is it optimizing?“


4. What Are AI, AGI, and Super-Intelligence?

graph TD
    SI["Super-Intelligence\nMachines vastly more intelligent\nthan humans in all domains\n→ Pure speculation"]
    AGI["AGI — Artificial General Intelligence\nSystems capable of solving any problem\nas well as (or better than) a human\n→ Not yet achieved, contradictory definitions"]
    NAI["Narrow AI\nSystems specialized in one or a few tasks\n→ Where we are today"]

    SI --> AGI --> NAI

    style SI fill:#9b59b6,color:#fff
    style AGI fill:#3498db,color:#fff
    style NAI fill:#2ecc71,color:#fff

4.1 Narrow AI — Where We Are Today

Narrow AI systems excel at a specific task but are useless for everything else:

SystemTaskUseless for…
Deep BlueChessDriving a car
AlphaGoGoAnalyzing an email
Spam filterDetecting spamPlaying chess
GPT / Claude / GeminiText generation(Seems general… but is it really?)

Note: Large language models seem general — they write code, translate, analyze. But they remain pattern matching at massive scale, not true human reasoning. They are still considered Narrow AI.

4.2 AGI — Artificial General Intelligence

The definition of AGI varies by organization:

┌─────────────────────────────────────────────────────────────────┐
│                  AGI DEFINITIONS (2024-2025)                    │
├────────────────┬────────────────────────────────────────────────┤
│  OpenAI        │ "Systems that do the most economically         │
│                │  valuable work better than humans"             │
│                │  → Definition built for investors              │
├────────────────┼────────────────────────────────────────────────┤
│  DeepMind      │ "Systems that not only invent solutions,       │
│                │  but invent new problems"                      │
├────────────────┼────────────────────────────────────────────────┤
│  Anthropic CEO │ "A marketing term" — prefers to say:           │
│  (Dario Amodei)│  'a country of geniuses in a data center'     │
└────────────────┴────────────────────────────────────────────────┘

4.3 Super-Intelligence

Like ancient Greeks watching birds and thinking we could fly by having bigger wings. They were right that we would eventually fly — but we got there with engines and aerodynamics, not by becoming more “bird-like.”

For most of us: leave this philosophical debate to researchers and ethicists. What matters is understanding the tools available now.


5. AI and Machine Learning

Key point: Machine Learning is AI, but not all AI is Machine Learning.

graph TD
    AI["Artificial Intelligence (AI)\nBroad concept: making machines intelligent"]
    ML["Machine Learning (ML)\nLearning patterns from data\nDominant modern AI approach"]
    DL["Deep Learning\nLayers of artificial neural networks\nSubset of ML"]
    GenAI["Generative AI\nCreating new content\nText, images, code, audio..."]

    AI --> ML
    ML --> DL
    DL --> GenAI

    style AI fill:#e8f4f8,stroke:#2980b9
    style ML fill:#e8f8e8,stroke:#27ae60
    style DL fill:#f8f0e8,stroke:#e67e22
    style GenAI fill:#f8e8f8,stroke:#8e44ad

5.1 Conventional Programming vs. Machine Learning

CONVENTIONAL PROGRAMMING:
  [Data] + [Rules] → [Results]
  
  Ex: if email contains "Nigerian prince":
        spam = True
      elif email contains "business offer":
        spam = True
      # → Infinite possible rules, impossible to maintain

MACHINE LEARNING:
  [Data] + [Expected results] → [Rules learned automatically]
  
  Ex: Show 1 million emails labeled spam/not-spam
      → The model learns the patterns on its own

The Netflix example:

  • Approach by rules: “If you watched action movies → recommend more action”
    Too coarse, misses all nuance
  • Machine Learning: Train on millions of viewing histories, discover that someone who loved The Crown will also love Breaking Bad for complex reasons that can’t be hand-coded

5.2 The Three Main Types of Machine Learning

graph LR
    ML[Machine Learning] --> CL["Classification\nSort into categories\nEx: spam / not spam\ncat / not cat"]
    ML --> RE["Regression\nPredict a number\nEx: house price\nmovie rating 0-100%%"]
    ML --> CL2["Clustering\nFind groups\nwithout labels\nEx: audience segments"]

    CL --> SL["Supervised\n(with labels)"]
    RE --> SL
    CL2 --> UL["Unsupervised\n(without labels)"]

Classification

Sorting into categories — yes/no or multi-class answers:

Input: [Animal photo]
Output: "Cat" or "Not a cat"

Input: [Email]
Output: "Spam" or "Legitimate"

Regression

Predicting a numerical value:

Input: [House characteristics]
Output: $425,000 (not just "expensive" or "cheap")

Input: [User profile + movie]
Output: 87% probability of enjoyment

Clustering

Discovering structure without labels:

Data: [Purchase histories of millions of customers]
Automatically discovered result:
  Group A: "Thursday evening shoppers, specific product combo"
  Group B: "Tech early adopters, brand loyal"
  Group C: "Promotion hunters, price sensitive"

In a system like Netflix, all three approaches run simultaneously: classification filters what doesn’t interest you, regression predicts how much you’ll like what remains, and clustering identifies people with your obscure tastes.

5.3 Supervised vs. Unsupervised Learning

flowchart TD
    subgraph Supervised["Supervised — with labels"]
        direction LR
        T1["Labeled data\n(email + spam/ham label)"] --> M1["ML Model"]
        M1 --> P1["Prediction"]
        P1 -->|"Error compared to\nexpected result"| LF["Loss Function"]
        LF -->|"Parameter\nadjustment"| M1
    end

    subgraph Unsupervised["Unsupervised — without labels"]
        direction LR
        T2["Raw data\n(no labels)"] --> M2["ML Model"]
        M2 --> P2["Patterns / Groups\ndiscovered"]
    end

Machine Learning quality depends on both the quantity AND quality of data. A recommendation model needs millions of user interactions to function properly.


6. The Deep Learning Revolution

6.1 Feature Engineering vs. Deep Learning

The old world — Feature Engineering:

To detect a cat in a photo, a human had to define:
  - Pointed ears at the top
  - Whiskers
  - Fur pattern
  - Eye shape
  → What if the camera angle is off?
  → What if it's a hairless cat?
  → Humans guess, can be wrong, doesn't scale

The new world — Deep Learning:

We simply show 10 million photos of cats.
The machine discovers for itself what distinguishes a cat.
No need to define features → they emerge from training.

6.2 The Layered Architecture

The “deep” in deep learning refers to the stacked layers of artificial neurons:

graph LR
    subgraph INPUT["Input"]
        I["Raw image\n(pixels)"]
    end
    subgraph L1["Layer 1"]
        C1["Edge\ndetection"]
    end
    subgraph L2["Layer 2"]
        C2["Combining\ninto shapes"]
    end
    subgraph L3["Layer 3"]
        C3["Texture\nrecognition"]
    end
    subgraph L4["Layer 4"]
        C4["Object\nparts"]
    end
    subgraph OUTPUT["Output"]
        O["Cat\n(probability 94%)"]
    end

    I --> C1 --> C2 --> C3 --> C4 --> O

    style INPUT fill:#e8f4f8
    style OUTPUT fill:#e8f8e8

Each layer learns increasingly complex abstractions automatically from data, without us needing to define them.

The Cost of Deep Learning

Deep Learning requires:
  ✓ Millions / billions of examples
  ✓ Data centers full of specialized GPUs / TPUs
  ✓ Weeks or months of training
  ✓ Millions of dollars in compute costs

→ Infrastructure most companies don't have.
→ That's why Foundation Models exist (trained once, used everywhere).

Deep Learning first proved its effectiveness on image recognition in 2012, beating humans. Then the obvious question: what about language?

6.3 The Natural Language Challenge

Language is fundamentally harder than images:

Question: "Am I going to need an umbrella?"

What the question does NOT say explicitly:
  ❌ Weather
  ❌ Rain
  ❌ Forecast
  ❌ Temperature

What we infer automatically:
  ✅ This is a question about the weather
  ✅ Specifically: is it going to rain where I'll be today?
  ✅ I plan to go outside

→ Humans do this effortlessly. Machines have to learn it.

Early voice assistants: keyword matching

"What's the weather" → weather trigger ✓
"Do I need an umbrella" → ??? ✗
"Should I wear a jacket" → ??? ✗
"What's it like outside" → ??? ✗

Result: infinite possible phrasings → impossible to cover with rules.

6.4 Evolution: RNNs → LSTMs → Transformers

graph LR
    RNN["RNN\nRecurrent Neural Networks\n• Process words one at a time\n• Sequential, slow\n• Forget long context\n→ 1980s–1990s"]
    LSTM["LSTM\nLong Short-Term Memory\n• Memory gates\n• Retains context better\n• Still sequential\n→ 1997+"]
    TR["Transformers\n'Attention Is All You Need'\n• Parallel processing\n• Attention over full context\n• Scales well\n→ 2017+"]

    RNN -->|"Better memory"| LSTM
    LSTM -->|"Paradigm shift"| TR

    style RNN fill:#ffcccc
    style LSTM fill:#ffffcc
    style TR fill:#ccffcc

RNN architecture:

y1      y2      y3     ...     yn
↑       ↑       ↑              ↑
[H1] → [H2] → [H3] → ... → [HN]     ← hidden state propagated sequentially
↑       ↑       ↑              ↑
x1      x2      x3     ...     xn

The Attention Mechanism (Transformers, 2017):

“Alice gave her dog a bath after it rolled in the mud.”
To resolve what “it” refers to, the Transformer assigns attention scores:

Attention scores for "it":
  Alice   →  0.02
  gave    →  0.05
  her     →  0.08
  dog     →  0.71  ← strong attention (it's the dog!)
  bath    →  0.03
  rolled  →  0.06
  mud     →  0.05
CharacteristicRNN/LSTMTransformer
ProcessingSequentialParallel
MemoryFixed, degradesDynamic (attention)
Long dependenciesDifficultDirect
ScalabilityLimitedExcellent
ResultTask-specific modelsGeneral foundation models

This is why there was a decade-long gap between “deep learning works on images” (2012) and “ChatGPT exists” (2022). Language required breakthroughs in scale, training, and architecture.


7. What Is Generative AI?

Generative AI is AI that creates. It generates new content — text, images, code, audio — that didn’t exist before.

graph TD
    GenAI["Generative AI"]
    LLM["Large Language Models\nText (ChatGPT, Claude, Gemini)\nNext-token prediction"]
    IMG["Image generators\nDiffusion models\n(DALL-E, Midjourney, Stable Diffusion)"]
    VID["Video generation\nSora, Runway, Pika"]
    AUD["Audio generation\nElevenLabs, Suno"]
    COD["Code generation\nGitHub Copilot, Cursor"]

    GenAI --> LLM
    GenAI --> IMG
    GenAI --> VID
    GenAI --> AUD
    GenAI --> COD

7.1 Large Language Models (LLMs)

At their core, LLMs perform prediction:

Fundamental mechanism:
  Given all previous context → predict the next token

"The cat is on the ___"
→ Probability "mat": 34%
→ Probability "couch": 28%
→ Probability "roof": 15%
→ ...

Prediction with context:

"The weather today is very ___"

Without context:
┌──────────────┬─────────────┐
│  Candidate   │ Probability │
├──────────────┼─────────────┤
│    sunny     │     42%     │
│    hot       │     27%     │
│    nice      │     13%     │
│    cloudy    │     11%     │
│    cold      │      7%     │
└──────────────┴─────────────┘

With context: "I live in Antarctica."
┌──────────────┬─────────────┐
│  Candidate   │ Probability │
├──────────────┼─────────────┤
│    cold      │     66%     │
│    freezing  │     21%     │
│    snowy     │      8%     │
│    harsh     │      3%     │
│    windy     │      2%     │
└──────────────┴─────────────┘

“It’s just autocomplete like on my phone!”
Yes and no. Your phone looks at the last 3-5 words. An LLM looks at thousands or even millions of tokens — your entire conversation, all instructions, all examples. The difference in context scale changes everything.

7.2 Prediction at Scale

LLMs have billions of parameters — learned relationships between concepts:

A parameter = one small learned relationship between concepts

Examples of connections:
  "umbrella" ←→ "weather" ←→ "rain" ←→ "forecast"
  "forecast" ←→ "outdoor plans" ←→ "preparation"

With billions of these connections working simultaneously:
  Prediction becomes sophisticated enough to resemble
  comprehension.

⚠️ Note: "resembles comprehension"
         ≠ understanding as a human understands

Inference — Dual Meaning

The term “inference” has a dual meaning in AI:

  1. Technical inference: using a trained model to make predictions (when you send a message and get a response)
  2. Linguistic inference: inferring implicit meaning (“will I need an umbrella?” = “is it going to rain?”)

AI does inference on inference. This is what makes it so powerful for language.

7.3 Foundation Models and Transfer Learning

Before foundation models, AI was a world of specialists:

┌─────────────────────────────────────────────────────────────────────┐
│                    THE ERA OF SPECIALISTS                           │
├─────────────────────┬───────────────────────────────────────────────┤
│  Task               │  Dedicated model                              │
├─────────────────────┼───────────────────────────────────────────────┤
│  Sentiment          │  Trained on thousands of tweets               │
│  analysis           │  labeled positive/negative                    │
├─────────────────────┼───────────────────────────────────────────────┤
│  EN → FR            │  Separate architecture, EN-FR                 │
│  Translation        │  pairs only                                   │
├─────────────────────┼───────────────────────────────────────────────┤
│  Code               │  Distinct model, code data                    │
│  generation         │  only                                         │
└─────────────────────┴───────────────────────────────────────────────┘
  Problem: Brilliant but narrow models. Silos.
graph TD
    A["Internet-Scale Data\n(Wikipedia, books, GitHub,\nscientific articles, forums...)"]
    B["Self-Supervised Learning\nExpensive pre-training\n(weeks, millions $)"]
    C["Foundation Model\n(GPT-4, Claude, Gemini, Llama...)"]
    D["Sentiment analysis"]
    E["Translation"]
    F["Code generation"]
    G["Writing and summarizing"]
    H["Semantic search"]
    I["Autonomous agents"]

    A --> B
    B --> C
    C --> D
    C --> E
    C --> F
    C --> G
    C --> H
    C --> I

    style C fill:#4a90d9,color:#fff,stroke:#2c5f8a
    style A fill:#f0a500,color:#fff

7.4 Types of Generative Models

Autoencoders

Learn a compressed representation of data without labels:

flowchart LR
    subgraph INPUT["Input"]
        X["Data\n(e.g.: 28x28 px image)"]
    end
    subgraph ENCODER["Encoder"]
        E1["Dense layer\n+ ReLU"]
        E2["Dense layer\n(compression)"]
        E1 --> E2
    end
    subgraph BOTTLENECK["Bottleneck / Latent Space"]
        Z["z\n(compressed representation)"]
    end
    subgraph DECODER["Decoder"]
        D1["Dense layer\n+ ReLU"]
        D2["Dense layer\n(reconstruction)"]
        D1 --> D2
    end
    subgraph OUTPUT["Output"]
        XHAT["Reconstructed data\n(approximation of input)"]
    end

    X --> E1
    E2 --> Z
    Z --> D1
    D2 --> XHAT

    style BOTTLENECK fill:#f0a500,color:#000,stroke:#c07800
    style ENCODER fill:#3a86ff,color:#fff,stroke:#1a66df
    style DECODER fill:#06d6a0,color:#000,stroke:#04b085

GANs (Generative Adversarial Networks)

Two competing networks: a generator creates content, a discriminator tries to distinguish real from fake:

graph LR
    N["Random noise\n(z)"] --> G["Generator\n(creates fake data)"]
    G --> D["Discriminator\n(real or fake?)"]
    R["Real data"] --> D
    D --> |"Feedback:\nyou were detected"| G
    D --> |"Result:\n0 = fake, 1 = real"| OUT["Output"]

    style G fill:#3498db,color:#fff
    style D fill:#e74c3c,color:#fff

8. Visual AI

AI for images and video is evolving extremely fast. Here is a snapshot of current capabilities.

8.1 What Works Well

CapabilityDescriptionExamples
Motion TransferApply movement from one video to a different characterTransfer a person’s walk to a fictional character
Composition and styleGenerate images from a text descriptionDALL-E, Midjourney
Deep FakesGenerate convincing visuals of a personVideos generated in seconds
Style TransferApply an artistic style to a videoAI rotoscoping
Visual AI has learned:
  ✅ Visual patterns (appearance, textures, colors)
  ✅ Motion patterns (gestures, postures)
  ✅ Style patterns (artistic, realistic)
  ✅ Composition (framing, lighting)

8.2 Current Limitations

Visual AI has NOT learned:
  ❌ Physics (eggs don't break against walls)
  ❌ Real-world object interactions
  ❌ Physical cause and effect
  ❌ Anatomical consistency (hands are often wrong)

What this reveals about the nature of these systems: AI generates what things look like, not how they behave. It has learned visual patterns, not physical patterns.

graph LR
    GOOD["Mastered\n• Appearance\n• Movement\n• Style\n• Composition"] 
    BAD["Not yet mastered\n• Physics\n• Object interactions\n• Anatomical consistency\n• Cause and effect"]

    GOOD <-->|"same technology,\ndifferent training\ndata"| BAD

Important: Convincing deep fakes are a reality. Even when image and video generation becomes perfect and physics is resolved, generating content is not enough. The real question is: can AI do something with what it generates? Can it use tools, reason about what to do next, take actions?


9. From Prediction to Reasoning

9.1 Reasoning Models

You may have noticed that some responses are instant, while others take a moment with a “thinking” or “reasoning” indicator. Here’s what’s happening:

Direct generation (old approach):
  Question → Predict response directly → Answer
  ✓ Fast
  ✗ Not always reliable for complex problems

Reasoning Models (appeared late 2024):
  Question → Generate reasoning steps → Verify → Answer
  ✓ Better accuracy for math, code, logic
  ✗ Slower (generates intermediate steps)
PlatformFeature Name
ChatGPT”Thinking” (o1, o3)
Claude”Extended Thinking”
Gemini”Deep Think”

It’s a trade-off: speed vs. rigor. For simple problems, direct prediction is sufficient. For complex problems requiring deduction, reasoning mode is preferred.

9.2 Tools and the Orchestration Layer

The models themselves only predict text. But they can predict instructions that the surrounding software layer actually executes:

sequenceDiagram
    actor User as User
    participant Model as LLM (prediction)
    participant Orch as Orchestration Layer
    participant Tools as Tools (Search, Code, API)

    User->>Model: "What's the weather in Montreal?"
    Model->>Orch: "I need to do a web search"
    Orch->>Tools: Weather API call
    Tools->>Orch: Weather results
    Orch->>Model: Results provided as context
    Model->>User: "In Montreal, it's currently 18°C..."

The model doesn’t do the search itself. It generates a text instruction. The software layer around the model interprets that instruction and executes the actual action.

When you grant permissions:

"Yes, you can search the web"
"Yes, you can execute code"
"Yes, you can access my Google Drive files"

→ You are NOT giving permission to the model.
→ You are configuring what the SOFTWARE LAYER AROUND the model
   is authorized to do on your behalf.

Connecting your own data and tools:

Without integrations:
  You → "Write a report on the Lila project"
  AI → [Generic response based on nothing specific]

With integrations (Google Drive, Slack, Teams, Email):
  You → "Write a report on the Lila project"
  AI → [Accesses your docs, your discussions, your project notes]
     → [Report based on YOUR real documents]

This orchestration layer — tools, connections, integrations — is what transforms these systems from impressive demos into truly useful tools.


10. Agentic AI

10.1 Defining an AI Agent

“An LLM agent runs tools in a loop to achieve a goal.”
— Simon Willison

The fundamental difference between classic use and agentic AI:

CLASSIC USE (Tool Use):
  You → [Question with tool] → Answer
  You → [Next question] → Answer
  You → [Another question] → Answer
  You manage every step.

AGENTIC AI:
  You → [Global goal] → The agent decides the steps
                      → The agent executes
                      → The agent evaluates results
                      → The agent adapts if needed
                      → The agent continues until reaching the goal
                      → Final result

10.2 The Agentic Loop

flowchart TD
    G["Goal given\nby the user"]
    P["Planning\nWhat do I need to do to get there?"]
    A["Action\nExecute a tool / a step"]
    E["Evaluation\nDid it work?"]
    D{Goal\nreached?}
    AD["Adaptation\nModify the approach"]
    R["Final result\npresented to the user"]
    C["Ask for help\nIf stuck / out of budget"]

    G --> P --> A --> E --> D
    D -->|No| AD --> A
    D -->|Yes| R
    E -->|Stuck or\nlimit reached| C

    style G fill:#e8f4f8,stroke:#2980b9
    style R fill:#e8f8e8,stroke:#27ae60
    style C fill:#fff4e0,stroke:#f39c12

Example — Code debugging agent:

You → "Debug this Python script and make it work"

Agent:
  1. Runs code → TypeError on line 42
  2. Identifies probable cause
  3. Modifies code
  4. Reruns → new IndexError on line 17
  5. Identifies cause → modifies → reruns
  6. Success → presents corrected code

You managed nothing between start and finish.

Example — Deep Research agent:

You → "Do an analysis on the state of AI in healthcare"

Agent (20 minutes of autonomous work):
  1. Identifies sub-questions to explore
  2. Searches for relevant sources
  3. Reads and evaluates each source
  4. Identifies gaps → searches more
  5. Synthesizes information
  6. Writes with cited sources

→ Structured report with verified sources

10.3 Guardrails and Limits

“More autonomy = more capability, but also more ways things can go wrong.”

RISKS OF AGENTS WITHOUT GUARDRAILS

  Cost drift:
    Each loop can call an expensive API or
    run heavy computation → costs accumulate quickly

  Infinite loops:
    The agent may persist with an approach that will never work

  Unintended actions:
    With access to powerful tools → can do things
    we didn't want

RECOMMENDED GUARDRAILS:
  ✓ Attempt limit before asking for help
  ✓ Budget / cost limit per session
  ✓ Human validation checkpoints for critical decisions
  ✓ Minimum necessary permissions (principle of least privilege)
  ✓ Logging all actions for audit

10.4 Multi-Agent Systems

For very complex tasks, multiple specialized agents work together:

graph TD
    USER["User\n(global goal)"]
    ORCH["Orchestrator Agent\n(global planning)"]
    R["Research Agent\n(information gathering)"]
    W["Writing Agent\n(content generation)"]
    C["Coding Agent\n(code writing)"]
    V["Validation Agent\n(quality checking)"]

    USER --> ORCH
    ORCH --> R
    ORCH --> W
    ORCH --> C
    R --> ORCH
    W --> ORCH
    C --> V
    V -->|Issue detected| C
    V -->|Validated| ORCH
    ORCH --> USER

    style USER fill:#e8f4f8
    style ORCH fill:#4a90d9,color:#fff
    style V fill:#e8f8e8

The definition of agents, like the definition of AI itself, is constantly evolving. What matters now: an agent tries, evaluates, and adapts in a loop, without you managing every step.


11. When AI Goes Wrong — Hallucinations

11.1 Why Hallucinations Happen

Autocomplete at scale:

Autocomplete: "I am on my ___"  →  "way" or "roof" (wrong context)
LLM          : [Complex question] → Confident, precise answer... but wrong

The difference: autocomplete fails on a few words,
the LLM can generate entire pages of plausible but incorrect content.

Why it happens:

The model predicts what is statistically probable, not what is true.

If the model has no good patterns for your question:
  → It still generates something plausible-sounding
  → It doesn't say "I don't know"
  → It doesn't flag its confidence level
  → It generates, period.

That's what it's trained to do: generate plausible text.
flowchart LR
    Q["Question asked"] --> P["Searching for patterns\nin the billions of\nlearned relationships"]
    P --> GOOD{"Solid\npatterns?"}
    GOOD -->|"Yes"| CORRECT["Correct answer\n(probably)"]
    GOOD -->|"No / Uncertain"| HALL["Hallucination\nPlausible but incorrect content\n(generated anyway,\nconfident tone)"]

    style HALL fill:#ffcccc,stroke:#cc4444
    style CORRECT fill:#ccffcc,stroke:#44cc44

Concrete hallucination examples:

ContextWhat AI may invent
Book you haven’t readCharacters and scenes that don’t exist
Technical procedureFunctions that don’t exist, steps that lead nowhere
QuotesMade-up sources with real author names
Numbers and statisticsPrecise but invented data
Company historyPlausible but false events

11.2 Verification Strategies

YOU ARE THE FIRST AND LAST LINE OF DEFENSE AGAINST FALSEHOODS

Universal rule: ALWAYS verify
  → Every citation
  → Every specific fact
  → Every numerical claim
  → Especially when the stakes are high

The model doesn't know what's important. You do.
The model doesn't understand consequences. You do.

How to use AI reliably:

flowchart LR
    G["AI generates\na response"]
    H["Human\nfact-checks"]
    E["Human applies\ntheir expertise"]
    D["Final decision\nmade by the human"]

    G --> H --> E --> D

    style G fill:#e8f0ff
    style D fill:#e8ffe8

AI is constantly improving on this front. RAG (Retrieval-Augmented Generation) systems ground responses in verified documents. But even with these improvements, human verification remains indispensable.


12. AI Ethics and Responsible Use

12.1 Optimization and Its Unintended Consequences

The social media case:

flowchart TD
    OBJ["Algorithm objective:\nMaximize engagement\n(time spent, clicks, shares)"]
    LEARN["AI learns\nfrom millions of interactions"]
    DISC["Discovery:\nContent that outrages, shocks, or enrages\ngenerates MUCH more engagement\nthan calm or neutral content"]
    AMP["Algorithm amplifies\nmost engaging content"]
    RESULT["Unintended result:\nRadicalization, anxiety, division\nBut nobody programmed 'make people angry'"]

    OBJ --> LEARN --> DISC --> AMP --> RESULT

    style OBJ fill:#e8f4f8
    style RESULT fill:#ffeeee,stroke:#cc4444

The system isn’t broken. It does exactly what it was designed to do. The problem is in the optimization objective, not the execution.

12.2 Bias in Data

AI is never neutral.
It reflects the human choices that led to its creation:

  1. Training data choices
     → What to include, what to exclude
     → Which perspectives are represented

  2. Optimization objective choices
     → Maximize engagement vs. well-being
     → Accuracy vs. accessibility

  3. Deployment choices
     → Who has access, in what context

These choices are often INVISIBLE to the end user.
You see the news feed, not the decisions that shaped it.
graph LR
    DATA["Training data\n(reflects historical\nand human biases)"]
    MODEL["AI Model\n(learns patterns\nin the data)"]
    OUTPUT["Outputs\n(amplifies biases\nat scale)"]

    DATA -->|"Embedded biases"| MODEL
    MODEL -->|"Amplified biases"| OUTPUT
    OUTPUT -.->|"Feedback and\nreinforcement"| DATA

    style DATA fill:#fff4e0
    style OUTPUT fill:#ffeeee

12.3 Responsible Use

A few simple questions to ask:

┌─────────────────────────────────────────────────────────────────┐
│               QUESTIONS TO ASK BEFORE USING AI                  │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  1. What decision am I letting AI influence?                    │
│                                                                 │
│  2. Am I using AI for this because it's truly                   │
│     appropriate, or just because it's easy?                     │
│                                                                 │
│  3. What perspective might be missing from what                 │
│     AI is proposing?                                            │
│                                                                 │
│  4. What patterns might AI amplify in what I create?            │
│                                                                 │
│  5. Who is affected by the decisions I make                     │
│     with AI assistance?                                         │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

The practical framework:

Use AI to:                       Don't let AI:
  ✅ Draft and suggest             ❌ Have the final word
  ✅ Accelerate thinking           ❌ Decide for you
  ✅ Explore ideas                 ❌ Replace your judgment
  ✅ Analyze and summarize         ❌ Verify its own outputs
  ✅ Automate repetitive           ❌ Act without supervision
     low-stakes tasks                on important decisions

13. Summary and Conclusion

mindmap
  root((AI and Generative AI Explained))
    Foundations
      AI Effect: the rules always move
      Narrow AI → AGI → Super-intelligence
      Machine Learning = learning from data
    Deep Learning
      Layers of artificial neurons
      Automatic feature engineering
      2012 revolution - images
      Transformers 2017 - language
    Generative AI
      LLMs = prediction at scale
      Foundation Models = train once, use everywhere
      Images, videos, code, audio
    Agents
      Try-evaluate-adapt loop
      Tools + orchestration
      Multi-agents
    Limitations
      Hallucinations = plausible ≠ true
      No physics in vision
      Bias in data
    Ethics
      Optimization ≠ beneficence
      AI is not neutral
      Human = first and last line

What You Now Understand

ConceptWhat you understand now
AI EffectThe definition moves with every breakthrough
Machine LearningLearning patterns, not rules
Deep LearningNeuron layers, automatic feature extraction
TransformersParallelism + attention → language revolution
LLMsPrediction at scale = pseudo-comprehension
Agentic AIAutonomous try-evaluate-adapt loop
HallucinationsPlausible ≠ true → human verification required
EthicsAI reflects human choices, never neutral

The Final Perspective

AI didn’t suddenly change in November 2022. What changed is who had access to it.

You don’t need to resolve the AGI debate to make informed decisions about the tools in front of you. You don’t need to predict the future of super-intelligence to understand how AI impacts your work today.

What you have now: the foundation to understand what is actually happening, without hype, without fear, but with comprehension.

What you do with it? That’s up to you.


14. Key Terms Glossary

TermDefinition
AGI (Artificial General Intelligence)Hypothetical AI capable of performing in all cognitive domains as well or better than a human
AgentLLM that runs tools in a loop to achieve a goal, autonomously
Attention MechanismMechanism in Transformers that assigns relevance scores to each token in relation to all others
AutoencoderNeural network that learns a compressed representation of data by reconstructing its own inputs
ClusteringUnsupervised learning that discovers natural groups in data without labels
Deep LearningML subset using multiple layers of artificial neural networks
Feature EngineeringManual process of defining relevant characteristics of a problem (replaced by deep learning)
Foundation ModelModel pre-trained on massive data, adapted to multiple tasks by fine-tuning
GAN (Generative Adversarial Network)Architecture with a competing generator and discriminator to produce synthetic content
Generative AIAI that creates new content (text, image, code, audio, video)
GuardrailsConstraints and limits imposed on an agent to avoid undesired behaviors
HallucinationLLM generation of plausible but factually incorrect content
Inference1) Using a trained model to make predictions; 2) Deducing implicit meaning in language
LLM (Large Language Model)Language model with billions of parameters, trained on massive text data
LSTM (Long Short-Term Memory)Improved RNN architecture with memory gates to retain long-term context
Machine LearningAI approach where a system learns patterns from data rather than explicit rules
Multi-Agent System (MAS)System where multiple specialized agents collaborate to accomplish complex tasks
Narrow AIAI specialized in one or a few tasks — where we are today
NLP (Natural Language Processing)AI domain handling comprehension and generation of natural language
Orchestration LayerSoftware layer around the model that interprets its instructions and executes real actions
ParametersNumerical values in a neural network representing learned relationships between concepts
RAG (Retrieval-Augmented Generation)Architecture grounding responses in retrieved documents to reduce hallucinations
Reasoning ModelLLM that generates intermediate reasoning steps before giving a final answer
Reinforcement LearningLearning by trial and error with rewards and penalties (e.g.: AlphaGo)
RNN (Recurrent Neural Network)Neural network architecture processing sequences element by element
Self-Supervised LearningTraining from unlabeled data by generating its own labels
Super-IntelligenceHypothetical AI vastly more intelligent than humans in all domains
TokenBasic unit of LLM processing — a whole word or part of a word
Transfer LearningReusing a pre-trained model for a new task, avoiding from-scratch training
TransformerNeural network architecture based on attention, revolutionary for NLP (2017)

Search Terms

ai · generative · explained · genai · foundations · artificial · intelligence · models · deep · defining · machine · agentic · agi · evolution · hallucinations · language · prediction · reasoning · responsible · super-intelligence · types

Interested in this course?

Contact us to book it or get a custom training plan for your team.