When I graduated with a Data Science degree in 2017, AI was kind of like a funny toy, and mostly something researchers (read: not me) spent their time on. Getting a half decent result from an ML model involved a bunch of code, several failed attempts at training, and then the inevitable abdication and surrender.
Today, it’s coming for my job:
This is from a model called ChatGPT, a recent release from OpenAI[^1] that acts as a sort of conversation companion. ChatGPT has been making rounds on the web for prompt responses that are very good, like the above (but don’t worry, all of this post is hand written by yours truly).
Nothing like this existed when I was in school — and even over just the past year, the quality of available ML models has accelerated dramatically. Sentiment among people I know in AI has never been higher and more excited, and hundreds of startups have been popping up, building on top of these so-called Large Language Models (LLMs).
How did things improve so quickly? And what are these models actually doing?
Basics of ML models and text generation#
Admittedly, this is not the first time I’ve written about this. You might remember GPT-3, another OpenAI model that dropped in 2020 with some seriously impressive results for generating text:
GPT-3 is a language generation model. Machine Learning is just about figuring out relationships – what’s the impact of something on another thing? This is pretty straightforward when you’re tackling structured problems – like predicting housing pricing based on the number of bedrooms – but gets kind of confusing when you move into the realm of language and text. What are ML models doing when they generate text? How does that work?The easiest way to understand text generation is to think about a really good friend of yours (assuming you have one). At some point if you hang out enough, you get a good feel for their mannerisms, phrasing, and preferred topics of conversation - to the point where you might be able to reliably predict what they’re going to say next (“finishing each other’s sentences”). That’s exactly how GPT-3 and other models like it work - they learn a lot (I mean, like really a lot) about text, and then based on what they’ve seen so far, predict what’s coming next. The actual internals of language models are obviously Very Scary and Very Complicated - there’s a reason that most big advancements come from big research teams full of PhDs.
ChatGPT is trained on text and code from across the web (articles, books, comments, etc.), but also actual human conversations:
We trained this model using Reinforcement Learning from Human Feedback (RLHF), using the same methods as InstructGPT, but with slight differences in the data collection setup. We trained an initial model using supervised fine-tuning: human AI trainers provided conversations in which they played both sides—the user and an AI assistant. We gave the trainers access to model-written suggestions to help them compose their responses.
There’s a whole taxonomy of OpenAI models and what other models they’re built off of.

