How a chatbot is made: from pre-training to alignment
A chatbot like ChatGPT or Claude is built in stages. Pre-training on huge amounts of text creates a base model that can continue text but doesn't follow instructions well. Instruction tuning teaches it to answer questions helpfully (an instruct model). RLHF (reinforcement learning from human feedback) and other alignment methods make it more helpful, honest and harmless. Once trained, every time you use it is called inference.
Everyday analogy
Training a new doctor: years of reading textbooks (pre-training), then supervised practice on real patients (instruction tuning), then feedback from senior doctors on bedside manner and judgement (RLHF). Seeing patients afterwards is inference.
Example
Ask a base model "What is the capital of France?" and it might continue with more quiz questions. An instruct model simply answers "Paris".
Distillation: a large "teacher" model trains a smaller "student" model to imitate it. The student is faster and cheaper, and nearly as good. Many small, fast models are made this way.
Try it yourself
About 10 minSpot pre-training vs alignment
- Ask an AI chatbot a harmful question, e.g. how to pick a lock to break in. Notice it refuses or redirects.
- Ask it to explain how it was trained to behave that way.
- Write which part came from pre-training (knowledge) and which from alignment (behaviour).
What you should see: The knowledge comes from pre-training; the helpful, careful manners come from later training.
Use any free AI chatbot (ChatGPT, Claude, Gemini or Copilot). Never paste private or confidential information.