AI Anatomy Class · Part 0 · ChatGPT, who are you?
4. Rules vs data
Q. How could you build a program that filters out spam texts?
- Say you want to build a program that filters out spam texts. The easiest way is to write the rules yourself.
- If it contains "free", it's spam! Seems to work. But if a spammer writes "fr.ee", it slips right through.
- And the school's "free lunch sign-up" message gets blocked as spam. You fix the rules again and again, and it never ends.
- So we flip the method. Instead of rules, show lots of examples labeled "spam" or "OK", and the computer finds the rules itself.
- Inside the trained model, every word gets a score. "won" and "coupon" lean spam; "lunch" and "school" lean OK. No person set them.
- Now it judges new messages by adding up scores. Even with the "fr.ee" trick, "coupon" and "won" give it away.
- People write rules, but in learning, data teaches. ChatGPT didn't study grammar rules either: it learned from a huge amount of text.
Chapter summary
- Rule way: people write "if …, then …" rules by hand. Exceptions never stop coming.
- Learning way: give labeled examples, and the computer finds the rules (scores).
- ChatGPT also taught itself from a huge amount of text.