Understanding AI · lesson 46 of 60 · about 5 minutes
Learning to Be Helpful
A model that only predicts internet text isn't a helpful assistant yet. See how human feedback shapes it.
What you'll learn
- Explain why pre-training alone doesn't make a good assistant
- Describe how people rate answers to guide the model
- Explain what that changes about its answers
Predicting isn't helping
Ask a pre-trained model a question and it might continue with more questions, because on the internet, questions are often followed by more questions. It has learned how text goes, not how to be a good assistant.
Learning from people
So there's a second stage, fine-tuning. First the model trains on examples of good conversations. Then people compare pairs of its answers and choose the better one: more helpful, more honest, safer. The model is adjusted to give answers people prefer. This is often called learning from human feedback.
People's votes on two answers. The model is nudged towards the kind of answer that won.
votes = {"answer A": 7, "answer B": 2}
best = max(votes, key=votes.get)
print("people preferred", best)Output
people preferred answer ATip
This is also where chatbots learn to say no to harmful requests and to admit when they're unsure, though not perfectly.
Now try it yourself
This lesson is free in Codiqo, with 6 questions on what you just read. You can only learn to code by writing code, so it ends with a short program you write yourself, which we run and check straight away.