AI Basics
What AI is, how it learns, and what happens inside ChatGPT, Gemini and Claude when you ask them something. No maths, no computer skills needed.
What you will learn today
- 01What AI is, in simple words
- 02How a computer “learns” from examples
- 03What an algorithm is (it’s just a recipe)
- 04What data is, and why it must be clean
- 05How an AI practises until it gets good
- 06What an LLM is (the “brain” of a chatbot)
- 07What happens when you type into ChatGPT
- 08Where AI makes mistakes, and how to stay safe
You already use AI every day
You may not notice it, but AI is already in your phone. Click each card to see where it is hiding.
AI is not a robot from a movie. Most AI today is quiet software inside apps you already use. It guesses, suggests and decides small things for you, all day long.
What is AI?
Artificial Intelligence, explained without big words
AI is a computer doing a job that normally needs a human brain — like understanding words, recognising a face, or making a choice.
Artificial = made by people. Intelligence = being able to learn and solve problems. So AI simply means: a machine that can do “thinking” work.
Normal computer program vs AI
📋 Normal program
Follows fixed rules that a person typed in.
Example: “If the bill is over $1,000, ask the manager.” It can only do exactly what it was told. Nothing more.
🧠 AI program
Learns from examples, then makes its own judgement.
Example: Show it 100,000 old bills. It learns by itself which ones were usually fraud — even clues no person ever noticed.
The AI family — boxes inside boxes
You will hear many big words: AI, Machine Learning, Deep Learning, Generative AI. Don’t worry. They are not four different things. Each one sits inside the one before, like boxes inside boxes.
A bank in Riyadh has 2 million card payments every day. No team of people could check them all. So an AI checks every payment in a split second and asks: “Is this normal for this customer?”
A coffee in Riyadh at 9 am — normal. ✅
A $3,000 TV bought from another country at 3 am — strange! 🚩 The bank sends an SMS: “Was this you?”
Two kinds of AI
Narrow AI — exists today
Very good at one kind of job: translating, recognising faces, writing text, predicting sales. Every AI you use today is this kind.
General AI — not here yet
A machine that could learn any job as well as a person. Scientists are working on it, but it does not exist yet.
A shop’s software gives 10% off to anyone who spends over $100. Is this AI?
How Computers Learn
Machine Learning: learning from examples, the way children do
How does a child learn what a cat is? Nobody gives them a rule like “four legs + whiskers + 30 cm tall”. You just point at many cats and say “cat”. After enough cats, the child can spot a cat they have never seen before. Machine Learning works the same way.
Old way vs new way
A supermarket wants to know how much bread to order for each shop. Instead of guessing, it gives the computer 3 years of sales, plus the weather and holidays like Ramadan and Eid. The computer finds patterns, for example: “People buy 40% more bread the day before a long weekend.” Now it can predict next week’s order. Less bread is thrown away, and shelves are not empty.
Three ways a computer can learn
Learning with the answers given
Like a student with a teacher. We give the computer examples with the right answer already written on them.
Example: 50,000 old emails, each marked “spam” or “not spam”. The computer learns what spam looks like. Then it can sort new emails by itself.
Experts call this supervised learning. Used for: spam filters, loan approval, sales forecasts, fraud alerts.
Finding groups by itself
No answers are given. The computer looks at the data and finds groups that belong together.
Example: An online shop gives the AI its customer list. The AI finds 4 groups: bargain hunters, weekend shoppers, loyal big spenders, and one-time buyers. Now marketing can send each group a different offer.
Experts call this unsupervised learning. Used for: customer groups, spotting unusual activity, sorting documents.
Learning by trial and reward
Like training a pet with treats. The computer tries something. Good result = reward. Bad result = penalty. After thousands of tries, it finds the best way.
Example: A warehouse robot learns the fastest path to pick up items. Every faster trip gets a “reward”, so it keeps getting better.
Experts call this reinforcement learning. Used for: robots, games, delivery routes — and also to make chatbots like ChatGPT more polite and helpful (Topic 7).
A phone company wants to predict which customers will leave next month. They have old customer records marked “stayed” or “left”. Which way of learning is this?
Algorithms
The step-by-step “recipe” a computer follows
An algorithm is a list of clear steps to solve a problem. Think of it as a recipe.
A recipe for tea: 1. Boil water. 2. Add tea leaves. 3. Wait 3 minutes. 4. Add milk and sugar. That is an algorithm! Clear steps, in the right order, that always give you a result.
Algorithm vs model — what’s the difference?
📖 Algorithm = the recipe
The method the computer uses to learn.
🎂 Model = the finished cake
What you get after the computer has learned from your data. The model is the thing you actually use.
Recipe + ingredients → bake → cake.
Algorithm + data → learn → model.
Same recipe with different ingredients gives a different cake. Same algorithm with different data gives a different model.
Try it: how a bank decides on a loan
Many banks use a decision tree. It is a simple recipe that asks yes/no questions, one after another. Pretend you are the customer:
In real life, nobody types these questions by hand. The bank’s computer learns the best questions from thousands of old loans.
Four common recipes (no need to memorise)
Decision tree
Asks yes/no questions in a chain, like the loan game above.
Used for: loans, sending customer calls to the right teamStraight-line guess
Looks at past numbers and draws a line to guess the next number. Experts call it linear regression.
Used for: sales forecasts, price guessesGrouping
Puts similar things together without being told the groups. Experts call it clustering.
Used for: customer groupsBrain-like network
Many tiny maths parts passing signals to each other, a bit like brain cells. Experts call it a neural network. It powers ChatGPT, Gemini and Claude.
Used for: language, pictures, voiceYou don’t need the maths. Just remember: the algorithm is the recipe, the data is the ingredients, and the model is the finished cake.
Data: the Food of AI
What a dataset is, and how it gets ready
A dataset is just a big collection of examples we use to teach an AI. Most of the time, it looks like a large Excel sheet.
What a dataset looks like
A coffee shop wants to guess which customers will come back next month. Here is a small part of its list:
| Customer | Visits / month | Average spend | Uses the app? | Came back? (the answer) |
|---|---|---|---|---|
| C-001 | 12 | $6.50 | Yes | Yes |
| C-002 | 1 | $4.00 | No | No |
| C-003 | 6 | $9.20 | Yes | Yes |
| C-004 | 2 | $3.50 | No | No |
- Each row = one example (one customer).
- Each column = one fact about that example (visits, spend…).
- The last column is the label = the right answer we want the AI to learn to guess.
Data comes in many forms
Numbers
Sales, prices, temperatures
Text
Emails, reviews, contracts
Pictures
X-rays, product photos
Sound & video
Phone calls, meetings, CCTV
Getting data ready — 6 steps
- CollectGather examples from sales records, forms, documents or websites (with permission).
- CleanRemove copies, fix spelling, fill in or remove empty boxes, and use the same units (for example, all prices in SAR).
- LabelWrite the right answer next to each example. Often people do this — for example, doctors marking X-rays as “healthy” or “problem”.
- TidyPut everything in the same layout so the computer can read it.
- SplitHide some examples for a test later — like a teacher keeping the exam questions secret.
- Check fairnessMake sure the examples include all kinds of people the AI will be used on. If not, the AI will be unfair. (Experts call this unfairness bias.)
See the difference: messy vs clean data
| Name | City | Order value | Date |
|---|---|---|---|
| Ahmed Ali | riyadh | 250 | 03/04/26 |
| ahmed ali | Riyadh | 250 SAR | 2026-04-03 |
| Sara K. | Jeddah | (empty) | April 5 |
| Omar | Jedda | $80 | 05-04-2026 |
Problems: the same customer twice, spelling mistakes, an empty box, two kinds of money, and four ways of writing dates.
| Name | City | Order value (SAR) | Date |
|---|---|---|---|
| Ahmed Ali | Riyadh | 250 | 2026-04-03 |
| Sara K. | Jeddah | — (left out, amount missing) | 2026-04-05 |
| Omar | Jeddah | 300 | 2026-04-05 |
Copy removed, spelling fixed, one kind of money, one date style. Now the AI can learn properly.
An AI is only as good as the data you feed it. Bad data = bad AI, no matter how clever the recipe is. In real AI projects, getting the data ready usually takes the most time.
In 2018, the news agency Reuters reported that Amazon stopped using a test AI tool for checking CVs. It had learned from 10 years of old hiring records — and most of those hires were men. So the AI started giving women’s CVs lower scores. The AI was not “sexist” on purpose; the examples it learned from were one-sided, and it copied that pattern. This is why step 6 (check fairness) matters.
Training an AI
How an AI practises until it gets good
Training an AI is like a student preparing for an exam with old exam papers. They try a question, check the answer, see the mistake, fix it, and try again — thousands of times — until they rarely get it wrong.
The practice loop
Inside every AI there are many tiny settings, like volume knobs on a music system. Experts call them parameters. A simple AI may have a few hundred knobs. ChatGPT, Gemini and Claude are said to have billions. Training simply means turning all those knobs to the right place.
Watch a spam filter learn
Round 1 — knows nothing
The AI has just started. Its knobs are set at random. It is only guessing, like flipping a coin.
Round 100 — spots easy clues
It notices that emails shouting “WIN A FREE iPHONE!!!” are usually spam.
Round 1,000 — spots hidden clues
It learns that strange sender addresses, urgent requests for money and odd links are warning signs — even when the words look normal.
Final test — emails it has never seen
Now we test it with the emails we kept hidden. It gets 97% right. It is ready to use — but we keep watching, because spammers keep changing their tricks.
Why we keep some data hidden
A student who memorises old exam answers gets 100% in practice — then fails the real exam, because the questions are new. An AI can do the same thing. It memorises its practice examples instead of learning the real pattern. Experts call this overfitting. That is why we always test the AI on examples it has never seen.
An AI gets 99% right on its practice examples, but only 60% right on new ones. What most likely happened?
What is an LLM?
LLM = Large Language Model — the “brain” inside ChatGPT, Gemini and Claude
The name, word by word
Large
It has read a huge amount of text — a big part of the public internet, books and articles.
Language
Its job is words. It understands and writes English, Arabic, Urdu and many more languages.
Model
A trained “finished cake” (Topic 3) that has learned how language works.
When you type on your phone, the keyboard suggests the next word. An LLM is the same idea, but much, much bigger. It has “read” more than a person could read in thousands of lifetimes. So it can continue any text — an email, a report, a poem — in a very human way.
How an LLM reads: in small pieces
An LLM does not read whole words like we do. It cuts text into small pieces called tokens. A token can be a whole word, part of a word, or a full stop. Type a sentence below to see roughly how it gets cut up:
This is a simple demo — real tools cut text a little differently. Rough rule: 100 tokens ≈ 75 English words. AI companies often charge by the number of tokens, like a taxi charges by the kilometre.
The best-known LLM chatbots
| Name | Made by | Good to know |
|---|---|---|
| ChatGPT | OpenAI (USA) | The chatbot that made AI famous in late 2022. |
| Gemini | Google (USA) | Built into Google Search, Gmail and Android phones. |
| Claude | Anthropic (USA) | Good with long documents, careful writing, and doing tasks for you (Day 4). |
| Microsoft Copilot | Microsoft | Inside Word, Excel, Outlook and Teams. |
| Llama, Gemma, Qwen… | Meta, Google, Alibaba… | Free models you can download and run on your own computer (Day 3). |
What LLMs can do at work
You will practise many of these on Day 2.
How Chatbots Work
How ChatGPT, Gemini and Claude are made — and what happens when you press “Send”
Part A — How a chatbot is made (3 stages)
Stage 1 is like a person who has read every book in the library, but has no manners. Stage 2 is job training: “this is how a good assistant answers”. Stage 3 is customer feedback: “this answer was great, that one was rude” — so it keeps getting better.
Part B — What happens when you press “Send”
1 · You type a message
2 · Your words are cut into small pieces
“Write” · “ a” · “ short” · “ thank” · “-you” · “ message” … Each piece (token) is turned into numbers, because computers work with numbers.
3 · It reads the whole chat
It looks at your new message plus your earlier messages, any files you added, and secret instructions from the company (like “be polite”). This is its short-term memory. Experts call it the context window.
4 · It guesses the next word
Using everything it learned, it guesses which word most likely comes first — for example “Dear”. Then it guesses the next one, and the next: “Dear” → “Mr” → “Khan” → “,” …
5 · Word by word, the reply appears
That’s why you see the answer “typing” on the screen. It writes one small piece at a time, very fast.
6 · Safety checks and extra help
The company checks the answer is safe. If your question needs fresh news, the chatbot may also search the internet, read your file, or do a calculation before it answers.
Try it: you be the AI
The AI always asks itself one question: “Which word most likely comes next?” Pick a word and see how likely each choice is.
“Thank you for your order. Your package will arrive within 3 business ____”
ChatGPT, Gemini and Claude do not look up a ready-made answer. They write a new answer every time by guessing likely words. That is why the same question can get slightly different answers — and why they can sometimes be wrong while sounding very sure (next topic).
Same idea, three products
ChatGPT
By OpenAI. Can also search the web, make pictures, talk by voice and read your files.
Gemini
By Google. Works closely with Google Search, Gmail, Drive, YouTube and Android.
Claude
By Anthropic. Good with long documents and writing, and can do tasks inside your apps (Day 4).
Where AI Goes Wrong
What every user must know before trusting an answer
AI is powerful, but it is a tool, not an expert you can trust blindly. Here are its main weak spots.
It can make things up
It can invent facts, numbers, quotes or books that sound real but are false — and say them very confidently. Experts call this a hallucination.
It can be out of date
It stopped learning on a certain date. Unless it searches the web, it may not know recent news or prices.
It can be unfair
It learned from things people wrote, so it can repeat people’s unfair ideas and stereotypes.
It can slip on numbers
It can make maths or counting mistakes, especially with long numbers. Always check important figures.
It doesn’t truly understand
It has no feelings, life experience or common sense like a person. It guesses words. It does not really “know” your business.
Your privacy
What you type may be saved by the AI company. We cover this on Days 2 and 3.
In 2023, two lawyers in New York asked ChatGPT for past court cases to support their argument. It gave them six cases — all made up, with fake names and fake quotes. They gave them to the court without checking. The judge fined them $5,000, and it was in the news around the world. Lesson: the AI wrote it, but the people were responsible.
The golden rule: trust, but check
- Check names, numbers, dates and quotes against a real source.
- Ask the AI: “Where did you get this?” — then open the source and check it yourself.
- For legal, medical or money matters, ask a qualified person to look at it.
- Turn on web search for anything recent (prices, news, laws).
- Remember: you are responsible for anything you send or publish.
Think of AI as a very fast, very well-read new intern. Great first drafts — but you still check the work before it goes to a client.
Hands-on Practice
Try it yourself with ChatGPT or Gemini (both have free versions)
Open ChatGPT (chatgpt.com) or Gemini (gemini.google.com). Copy this and paste it in:
Now ask the same thing in the other tool. Which answer was easier to understand? Write down one difference.
Search each book on Google or Amazon. Are they all real? Are the authors and years right? Write down what you found.
Think of something at your work that AI could guess (for example: which invoices will be paid late, or which enquiries will turn into customers). On paper, plan the Excel sheet:
- What would each row be? (one invoice? one customer?)
- Which 4–5 columns (facts) would help?
- What is the answer column?
- What could make it unfair or one-sided?
Then ask ChatGPT or Gemini: “Here is my plan: … What am I missing?”
Ask the same question three times, each in a new chat: “Suggest a name for a coffee shop in Jeddah.” Why are the answers different each time? (Hint: Topic 7.)
Recap & Quiz
Check what you remember from today
Today in 6 sentences
- AIis a computer doing “thinking” work. Machine Learning is AI that learns from examples.
- An algorithmis the recipe, data is the ingredients, and the model is the finished cake.
- Datamust be collected, cleaned, labelled, tidied, split and checked for fairness.
- Trainingis a loop: guess → check → fix → repeat. Then we test it on examples it has never seen.
- LLMslike ChatGPT, Gemini and Claude write by guessing the next word, one piece at a time.
- Trust, but check— AI can be wrong while sounding sure, and you stay responsible.
Key words — click to flip
Quiz
Which sentence is TRUE?
In a real AI project, what usually takes the most time?
Why do we hide some data from the AI while it learns?
How does ChatGPT write its answer?
ChatGPT gives you a number for a client report. What should you do?
An AI learned from 10 years of hiring records where most new staff were men. What is the danger?
Now you know how AI works. Tomorrow you will learn to use it at work: how to ask it well, write emails, read documents, make summaries and draft policies — and whether your data is safe.