Question:

How does AI work?

AI works by learning patterns from enormous amounts of data. You feed it text, images, or other inputs, and it gradually adjusts millions of internal settings until it gets good at predicting what should come next or what the right answer is.

The most common type of AI right now is a Large Language Model, or LLM. These are trained on a huge chunk of the internet: books, articles, code, forums, and more. During training, the model reads text, tries to predict what comes next, checks whether it was right, and adjusts. It does this billions of times. The result is a file of numbers called weights that encode everything the model learned. When you ask it a question, it uses those weights to generate a response, one word at a time, picking the most likely next word given everything before it.

The key insight is that this process produces something that looks a lot like understanding. The model doesn’t have a database of facts it looks up. It has internalized patterns from its training data well enough to reason, answer questions, write code, and hold a conversation. Sometimes it gets things wrong because it’s always doing probabilistic prediction, not retrieval from a source of truth. That’s why AI sometimes hallucinates.

Training a large model is expensive. It takes weeks on thousands of specialized chips and can cost tens of millions of dollars. The trained model itself is just a file of billions of numbers, but those numbers are what make it capable. Larger models with more parameters tend to be more capable, though bigger doesn’t always mean better in a predictable way.

What you interact with in tools like ChatGPT or Claude isn’t just the raw model. It’s the model combined with a system prompt that shapes its behavior, wrapped in an app interface built on top of it.

I’ve watched AI go through a few distinct eras. Early on, I took Andrew Ng’s open courseware ML course and learned about techniques like Support Vector Machines, which felt cutting edge at the time. Then deep learning took over, and companies like DeepMind started doing things that seemed almost impossible. Then OpenAI arrived and changed everything again. Now I use Claude Code every day to build this site, working entirely from the terminal with AI assistance, and I couldn’t imagine going back to the way things were.

You might also like