How To Train Your AI:
Demystifying ChatGPT With Machine Learning, Neural Networks, and Deep Learning Basics
An approachable look at the tech that powers AI
`
​
Segun Akinyemi
Senior Software Engineer
GitHub
Senior Software Engineer at Microsoft building systems that power business decisions using Azure. I lead STEM outreach initiatives in Charlotte, North Carolina, connecting people with knowledge that helps them navigate tech careers. Beyond that, I blog, read, run, hike, watch anime, longboard, and enjoy exploring Charlotte's best third places.
•🌍 Roots: Nigerian heritage, raised in Seattle, educated in St. Louis, now in Charlotte.
•🎓 Education: B.S. in Computer Information Systems (Lindenwood University), M.S. in Information Systems Management (Washington University in St. Louis).
•💻 Engineer: Building with Python, C#, TypeScript, & SQL. Embracing AI Engineering.
•📚 STEM Educator: Leading programs that connect students with tech careers.
LinkedIn
Website
> About
> Highlights
What Microsoft products have you used or are currently using?
You might be surprised by just how much Microsoft is a part of your everyday life! 🧐
Let’s Chat!
Today we are…
Exploring the inner workings of how the models powering Generative AI systems like ChatGPT are trained.
Machine Learning, Neural Networks, and Deep Learning are foundations of AI. They may sound complex, but we’re going to break them down into simple, approachable concepts.
​
What is Generative AI and why is it important in the world?
Let’s explore…
Question
Generative AI is…
A computer system that makes new things like text, images, videos, or music by learning from what it already knows.
Like an artist that draws inspiration from everything it has seen or heard to make something new.
​
Artificial Intelligence
​
Machine Learning
​
Deep Learning
This Is a New Moment For AI
Generative AI
1950s
Artificial Intelligence
the field of computer science that seeks to create intelligent machines that can replicate or exceed human intelligence.
1959
Machine Learning
subset of AI that enables machines to learn from existing data and improve upon that data to make decisions or predictions.
2017
Deep Learning
a machine learning technique in which layers of neural networks are used to process data and make decisions.
​
2021
Generative AI
create new written, visual, and auditory content given prompts or existing data.
The History of AI
​
​
1960
The ”first computer” that learned skills by trial and error.
​
​
1978/79
In Japan, SCARA, the robotic arm for high-speed assembly unveiled.
​
Late 2000s
IBM’s Watson, a computer system answers questions via natural language. Beats Jeopardy! contestants.
​
1950
Alan Turing introduces the “Turing Test”
1956
Field of AI is launched, “artificial intelligence” coined at Dartmouth
​
1997
IBM’s Deep Blue beats reigning world champion Garry Kasparov in chess.
Late 1990s
KISMET, a robot head that recognizes and replicates human emotion.
​
1988
Jabberwacky, a chatbot designed to have conversations with users and imitate human interaction.
​
2011
Apple launches Siri, an intelligent personal assistant.
​
​
2021
OpenAI develops DALL-E, an image generator based on text prompts.
2022
OpenAI launches ChatGPT,
a chatbot that interacts in
a conversational way.
​
​
16 years
3 months
50M
100M
​
​
​
Facebook: 4.5 years
ChatGPT: 3 Months!
Cell Phones: 16 years
Internet: 7 years
Time to reach 100M users
Generative AI Is Not Just Hype
Source: Microsoft Research
​
Some AI Model Makers
​
​
OpenAI
GPT (Astra, Sol, Luna, Mini, Nano), Codex
​
​
Anthropic
Claude Opus, Sonnet, Haiku, Fable, Mythos
​
​
Google
Gemini (Carbon, Argon, Pro, Flash, Deep Think), Gemma
​
​
Meta
Muse (Spark, Wonder, Glimmer), Llama (Maverick, Scout)
​
​
DeepSeek
DeepSeek V, DeepSeek R, DeepSeek Flash, DeepSeek Coder
​
​
Qwen
Qwen Max, Qwen Plus, Qwen Flash, Qwen Coder, Qwen Omni
​
​
Mistral
Mistral Large, Mistral Medium, Mistral Small, Magistral, Codestral
How are Generative AI models (LLMs) created?
It’s conceptually simple, yet in practice, can be quite complicated, and expensive.
Let’s find out how together!
Let’s Learn!
How AI Trains: Part 1
To recognize objects in photos, tag friends on Instagram, and help voice assistants like Siri better understand you.
​
Is This a Cat?
​
Yes or No answers only!
​
​
Is This a Cat?
​
Yes or No answers only!
​
​
Is This a Cat?
​
Yes or No answers only!
​
​
Is This a Cat?
​
Yes or No answers only!
​
Let’s Write Some Rules For Recognizing Cats!
Be extremely detailed!
​
Is This a Cat?
​
Yes or No answers only!
​
​
Is This a Cat?
​
Yes or No answers only!
​
​
Is This a Cat?
​
Yes or No answers only!
​
​
Is This a Cat?
​
Yes or No answers only!
​
​
Is This a Cat?
​
Yes or No answers only!
​
​
Is This a Cat?
​
Yes or No answers only!
​
Start exactly where a machine-learning model does. No clues, no background. Can you spot patterns?
Let’s Learn From Scratch
​
Is This Tengwar?
​
Yes
​
No
​
Is This Tengwar?
​
Yes
​
No
​
Is This Tengwar?
​
Yes
​
No
​
Is This Tengwar?
​
Yes
​
No
​
Is This Tengwar?
​
Yes
​
No
​
Is This Tengwar?
​
Yes
​
No
​
Is This Tengwar?
​
Yes
​
No
​
Is This Tengwar?
​
Yes
​
No
​
Is This Tengwar?
​
Yes
​
No
​
Is This Tengwar?
​
Yes
​
No
​
Is This Tengwar?
​
Yes
​
No
​
Is This Tengwar?
​
Yes
​
No
​
Is This Tengwar?
​
Yes
​
No
How’d You Do?
Did you notice any patterns over time? If not, given more examples, do you think you could’ve?
1 EXAMPLES
Cat / Not a Cat
Tengwar / Not Tengwar
2 PREDICT
Choose a label
3 CHECK
Reveal the answer
4 ADJUST
Use the feedback
How AI Trains: Supervised Learning
The answer key is the “supervision”
A model repeats this loop across many labeled examples.
How AI Trains: Part 2
To predict and generate text like ChatGPT, suggest songs on Spotify, and recommend shows on Netflix.
Let’s Train A GPT Like Model!
Conceptually, it’s simpler than you might think!
​
”
Rock and…
Roll
Guessing the missing word!
​
”
Let’s get ready to…
rumble
Guessing the missing word!
​
”
With great power comes great…
responsibility
Guessing the missing word!
​
”
A Lannister always pays his…
debts
Guessing the missing word!
​
”
The pen is mightier than the…
sword
Guessing the missing word!
​
”
Houston, we have a…
problem
Guessing the missing word!
​
”
Say hello to my little…
friend
Guessing the missing word!
Weighted Probabilities
GPTs predict the most likely next word using math: tracking probabilities, adjusting "weights" (importance given to word patterns), and refining guesses to improve accuracy.
GPT
How are
​
Him = 0.2
We = 0.1
You = 0.5
London = 0.2
Maximized probability of the correct word (“You”) over many training iterations
​
Let’s Make Things Harder!
What happens when the sentence has context within a larger paragraph?
​
”
It was the best of times, it was the worst of times, it was the age of….
wisdom
Guessing the missing word!
​
”
The rain fell softly against the window as she picked up her favorite…
ukelele
Guessing the missing word!
​
”
Without hesitation, he stepped onto the platform and grabbed the…
oboe
Guessing the missing word!
​
”
Adam was not good at games. But by some accident of eye and timing he beat his brother at…
peewee
Guessing the missing word!
What’s Changed?
Without context, things get harder! So how does ChatGPT do it? With a lot (like…truly insane amounts) of practice!
1 TEXT
Rock and roll
The sky is blue
2 PREDICT
Rock and ___
The sky is ___
3 CHECK
Compare with
the real word
4 ADJUST
Use the feedback
How AI Trains: Self-Supervised Learning
The text is its own answer key
A model repeats this loop across massive amounts of text
How AI Learns: Two Methods to Making a Model
SUPERVISED LEARNING
People provide the answer key
Cat / Not a Cat
Tengwar / Not Tengwar
SELF-SUPERVISED LEARNING
The data provides the answer key
Rock and ___
The sky is ___
GUESS → CHECK → ADJUST
BOTH REPEAT THE SAME LEARNING LOOP
Different answer keys. Same goal: learn patterns from examples.
Now We’re Ready For The Fancy AI Terms!
Machine Learning
The overall field of teaching computers to learn from examples, rather than following fixed instructions like in traditional computer programming.
Neural Networks
A type of Machine Learning made up of lots of tiny programs (like digital neurons) working together in layers.
Each one looks at a small part of the data (like words or pixels). As they share what they find, the network slowly learns patterns, one layer at a time.
Deep Learning
A neural network with many more layers of digital neurons, small programs that each handle a piece of the data (like words, images, or sounds).
More layers = more chances to spot complex patterns and make better predictions.
Large Language Models are…
A type of Generative AI that specializes in language.
It learns by reading massive amounts of text and predicts what words come next to generate human-like responses
GPT stands for…
Generative: Creates new text by predicting what comes next, using patterns it learned from tons of reading.
Pre-trained: Was trained ahead of time on books, websites, social media, and more to understand language and context.
Transformer: A model that focuses on the most important words in a sentence, like highlighting key info to better understand meaning.
Putting It All Together
​
It’s Complicatedly Simple
•AI is Patterns, Not Magic: It finds patterns and predicts what comes next using math, not meaning.
•It Learns By Guessing: Whether from labeled data (supervised) or by filling in blanks (self-supervised), it improves by trial and error.
•Big Models Need Big Math: Billions of guesses, massive datasets, and powerful computers make AI feel “smart.”
•It Doesn’t Truly Understand: AI doesn’t “know”. It recognizes patterns, not meaning (until we reach AGI, artificial general intelligence).
•Humans Still Matter: We guide it. Our feedback shapes what it learns and how it behaves
AI learns from patterns, not meaning. Humans provide the goals. Math does the work.
The Point Is
Real World AI Training
It’s rather expensive, way more complicated, and extremely cool.
Training Data: The Secret Sauce of AI
AI models get their patterns from:
Books & Articles
Websites & Wikipedia
Social Media (TikTok, IG, Reddit, etc.)
Images, Video & Code
Ever used any of these? You helped train AI, with or without consent!
Real World AI: Guess, Check, Adjust, Hope, and Pray?
•Real machine learning engineers tweak hundreds of parameters, adjusting inputs to get better results.
•But even with all that math, AI remains an inexact science.
•Sometimes models behave in ways we can’t predict and don’t fully understand.
​
”
Money…
talks
Guessing the missing word!
Microsoft Reports Are Exposing AI’s Real Cost Problem
​
Using the tech is more expensive than paying human employees.
There are actual physical computers behind all this, but they’re different than your laptop!
Let’s Talk Hardware
You’re helping a friend with a lot of stuff move. Which vehicle are you choosing?
You’re extremely frugal and going on a road trip. Which vehicle are you choosing?
​
GPUs Excel at Deep Learning
Heavily parallelized environments
Superior choices for repeatable tasks to scale e.g., model training & inferencing tasks
Excellent price-performance benefits
Energy efficient
Capabilities
Real-time inferencing
Batch inference
Basic training
Midrange training
Data-parallel training
Model-parallel training
​
​
​
​
​
​
Use cases
The Big Tech Backbone of AI
The Powers That Be
​
You’re not just using OpenAI, Anthropic, or Apple Intelligence. You’re using Microsoft, Google, or Amazon, powered by NVIDIA GPUs, whether you know it or not!
Chips & Hardware
NVIDIA • AMD • Custom Chips
Supply the computing power
Cloud & Data Centers
Microsoft • Amazon • Google
Run AI at global scale
Models & AI Products
OpenAI • Anthropic • Google
Create the AI models
If a handful of companies control the compute, they control the future of AI, and who benefits from it.
Why This Matters
​
🍔
Producing a single hamburger uses more water than thousands of AI prompts.
“That one is true, no matter how you count.”
CBS News, June 2026
Is AI Drinking All the Water?
​
​
​
​
​
​
​
Data
Centers
Need Power
​
​
Grid
Upgrades
Cost Money
​
​
​
​
​
$
Your
Bill
Goes Up!
The most pressing concern isn't running out of water. It's ordinary people paying for Big Tech’s data center expansion.
CBS News
CBS Report
CBS Report
CBS Report
​
Responsible AI Transparency Report
Highlights our continued commitment to innovation with AI, but without ruining the planet, or destroying humanity.
Microsoft Learn Student Hub
All the tools, training, and community support to assist you build, learn, and succeed
AI & Your Tech Career
A practical, continuously updated guide to AI’s impact on tech careers.
Skills to learn, tools to try, free courses, student perks, and straight answers about AI fears.
Built by a software engineer who uses AI every day and is tired of watching people panic.
Scan the QR code and tap in!
​
Created by Segun Akinyemi | aka.ms/nocap
Thank You!
感謝
Dank u wel
谢谢
Grazie
Danke
Merci
Terima kasih
ありがとうございました
Kop khun ขอบคุณ
Tack
감사합니다
Obrigado
Teşekkür ederiz
Dziękuję
Gracias
Cám ơn
Questions?