arrow_back All articles

How do your favorite LLMs like ChatGPT work, and where is the future for LLMs heading?

William Golovlev · 2 min read AI/ML
How do your favorite LLMs like ChatGPT work, and where is the future for LLMs heading?

AI used to be split into two worlds. Images and other “unstructured” data? Deep learning nailed that. Spreadsheets and databases? Traditional algorithms owned that space.

Then people figured out how to make neural networks treat words (and spreadsheet categories) a lot like pixels: as numbers with meaning. That idea is called embeddings, and it’s most of this post.

How language models actually work

The NLP breakthrough wasn’t grammar rules. It was a simple game: predict the next word.

At its core, that’s what ChatGPT does. It’s very, very good at guessing what comes next.

Train a model on something like Wikipedia to guess the next word, and it picks up patterns along the way. After “The capital of France is…”, the word “Paris” is a very likely next word. It’s statistics, at huge scale.

I used to think of AI as some mysterious intelligence. Now I see it as sophisticated pattern matching. Not Skynet, just calculus on steroids.

A model trained this way is called a pretrained language model. Once it has the patterns of a language, you can fine-tune it for a specific task with far less data. Same brain, narrower focus: a generalist turned specialist.

Embeddings: making words mathematical

Computers only understand numbers. So how do you tell one that “Monday” and “Tuesday” are similar, but “Monday” and “Blueberry” aren’t?

The old way, one-hot encoding, makes every category equally different. Monday vs Tuesday is the same distance as Monday vs Blueberry. That throws away exactly the information you want.

Embeddings turn each word into a list of numbers (a point in space) where position carries meaning:

  • Monday and Tuesday land close together.
  • The famous example: King minus Man plus Woman lands near Queen.
  • Words, categories and plain numbers can all feed into the same network.

That space usually has hundreds of dimensions, each capturing some slice of how words relate.

Deep learning for “boring” data

Most people think deep learning is for images and self-driving cars. But embeddings let neural networks do well on plain spreadsheet data too: sales forecasting, credit risk, that kind of thing.

The trick is to treat every category (store ID, zip code, product type) like a word. The network learns what each “word” means. Store 14 and store 92 might end up close together because they sell alike, even if nobody told the model that. I’ve used this to spot data leakage that manual analysis missed.

What I took away

How you represent the data matters more than the model architecture. Pixels, words, spreadsheet rows: turn them into good embeddings and the network handles the rest.

There are traps, though. Next post covers how to tell if your model actually works, or if it’s just cheating.

#NLP#LLM#ChatGPT#Neural Networks#Embeddings#AI Architecture