๐ค
STUDENT NOTES ยท DAY 17 OF 24
How AI Actually Works ๐ค
ChatGPT feels like magic. Today you learn the trick โ and it's simpler (and cooler) than you think.
1The one big trick: guess the next word
๐
Py: An LLM plays one game, billions of times: "given this text, what word probably comes next?" Guess, add it, guess again. That's it. That's the whole magic.
Play the LLM! What comes next?
Once upon a ___
The model gives every word a probability โ then usually picks a likely one.
2Words for your new world
๐ฃ๏ธ Prompt โ the text YOU send in. ๐งฉ Token โ a chunk of text (โ part of a word) โ models read and bill in tokens. ๐ก๏ธ Temperature โ low = safe and predictable, high = creative and wild.
๐ฆ
Professor Hoot: Better prompt โ better answer. "Explain loops" is okay; "Explain loops to a 10-year-old using cricket" is chef's kiss. ๐ค
3Talking to an LLM from Python
๐ค
Bittu: Same requests.get idea as the weather API โ different URL, smarter replies. You already have this skill!
4The warning label โ ๏ธ
๐
Bugly: LLMs sometimes state WRONG things very confidently. It's called hallucination โ my proudest collaboration.
๐
Py: They generate plausible text, not verified facts. Always double-check numbers, names and citations. Trust, but verify!
5Quick quiz! ๐ง
At its core, an LLMโฆ
๐ก Predict โ append โ repeat, at massive scale. Simple trick, astonishing results.
Turning temperature UP makes answersโฆ
๐ก Low temp = safe librarian. High temp = wild poet. Choose per task!
6Your mission ๐
Mission 1: Ask the same question to the class AI at temperature 0 and 1.5 โ compare the answers.
Mission 2: Craft a prompt that explains dictionaries using a cricket analogy. Refine it twice.
Mission 3: Catch the AI hallucinating: ask about a fake event and watch it improvise. Screenshot it!
Day 17 done โ the magician's trick is yours! ๐ฉ
Next: build your own AI chatbot with memory.
Go to Day 18: Build a Chatbot โ