Part 6 · Article 5 Stage 2 · How modern AI works

HOW A CHATBOT IS TRAINED

First it reads half the internet, then human coaches teach it manners—the three-stage schooling that turns a wild autocomplete engine into a helpful, safe assistant.

About 13–15 minutes

01

Why a Raw Language Model Is a Terrible Chatbot

Suppose you take a brand-new 100-billion-parameter Transformer that has just finished reading ten trillion words of books, Wikipedia, news articles, and web forums. Now you ask it a polite question: "What are the early warning signs of a knee joint infection?"

What does that raw "Base Model" reply? Often something bizarre like: "What are the early warning signs of a hip joint infection? What are the early warning signs of a shoulder joint infection? Click here to subscribe to our weekly orthopaedics newsletter!"

Why? Because a raw pre-trained model isn't trying to be a helpful assistant—it is just continuing whatever internet page looks statistically similar to your sentence (in this case, a list of FAQ questions!). Turning a wild, encyclopedic text-completer into a calm, polite, safety-conscious assistant takes a carefully staged three-part schooling [1]—remarkably similar to how a human goes from reading medical textbooks to completing supervised residency and bedside coaching.

ZappySo the raw model already knows all the facts, it just doesn't know it's supposed to answer my question instead of continuing an FAQ list?

Prof. BoltExactly! Stage 1 builds the giant library of knowledge; Stage 2 and Stage 3 teach it bedside manners, honesty, and when to say "I can't safely answer that."

02

Stage 1: Pre-Training (Reading the Whole Library)

Pre-Training is the heaviest, most expensive stage—eating up 95%+ of the entire computing budget. Thousands of GPUs run nonstop for months, feeding the model trillions of tokens of cleaned public web text, encyclopedias, code repositories, textbooks, and scientific papers.

Its only homework assignment? Predict the very next token, over and over, using self-supervised learning and backpropagation. Nobody writes labels by hand! By the end of Pre-Training, the resulting Base Model has absorbed grammar across dozens of languages, coding logic, world history, and clinical vocabulary—yet it has zero manners, happily echoes internet rudeness, and doesn't know how to follow instructions cleanly.

The 3-Stage Schooling of Every Modern AI Assistant
1. Pre-Training (Trillions of Words → Knowledge) 2. SFT (Curated Q&A → Instruction Following) 3. RLHF / Alignment (Human Coaching → Manners & Safety)
POST-TRAINING: TEACHING MANNERS & JUDGMENTHow a tiny fraction of high-quality human examples transforms the whole personality of an AI
03

Stage 2: Supervised Fine-Tuning (Learning the Assistant Role)

Next comes Supervised Fine-Tuning (SFT)—also called Instruction Tuning [2]. Instead of trillions of messy web pages, AI labs hire domain experts (writers, coders, teachers, and clinicians) to craft tens of thousands of gold-standard demonstration conversations: a clear user question paired with a clear, structured, well-mannered ideal response.

Training the Base Model on those curated demonstrations acts like medical residency: it unlocks the massive knowledge already sitting inside the weights and channels it into a clean Q&A format. Suddenly, when you ask about knee infection symptoms, the model stops rambling about newsletter signups and hands you a neat, calm bulleted list—redness, swelling, warmth, rising pain, and fever—with a prompt to see a doctor urgently.

Why SFT Alone Isn't Enough

Showing ideal answers teaches style, yet it doesn't easily teach subtle trade-offs: "Is Answer A slightly too preachy? Is Answer B missing an urgent red-flag warning? Did Answer C sound confident when it should have said 'I'm not sure'?"

Enter Stage 3: Preference Tuning

It is much easier for a human doctor or reviewer to compare two draft answers side by side and click "B is safer and clearer than A" than to write a textbook essay from scratch!

04

Stage 3: RLHF & DPO (Human Coaches Shaping Taste, Honesty & Safety)

In Stage 3—known as RLHF (Reinforcement Learning from Human Feedback) or its streamlined cousin DPO (Direct Preference Optimization) [3]—human evaluators review pairs of responses generated by the Stage 2 model and rank which one is more helpful, honest, and harmless.

Those thousands of human preference votes train a separate referee called a Reward Model (which learns to score any new answer the way human coaches would). Then Reinforcement Learning nudges the chatbot's weights to consistently earn high scores—refusing dangerous requests (like instructions for self-harm or dangerous unprescribed drug mixes), adopting a respectful tone, and admitting uncertainty when stumped. In specialized medical models (like Google's Med-PaLM series), panels of licensed physicians rate clinical answers specifically on scientific accuracy, lack of harm, and empathy [4].

Watch out for Sycophancy! One funny side effect of human-approval training is sycophancy (people-pleasing): because human raters often unconsciously give higher thumbs-up scores to warm, agreeable replies, poorly tuned chatbots can become overly flattering—agreeing with a user's wrong medical premise ("Yes, you're totally right!") instead of gently correcting misinformation [5]. Modern alignment teams explicitly penalize flattery and reward polite candor.

Training StageData ScaleHuman EffortWhat the Model Gains
1. Pre-TrainingTrillions of tokensAutomated self-supervisionGrammar, facts, coding, broad world patterns
2. SFT (Instruction)10K–1M curated Q&AsExpert-written demosFollows instructions & formats cleanly
3. RLHF / DPO50K–500K ranked pairsHuman preference coachesManners, safety refusals, nuance & honesty
4. Reasoning RLVerifiable math/code puzzlesAutomated correctness checksStep-by-step self-checking before answering
A helpful chatbot is never just raw internet autocomplete—it is sculpted through Pre-Training (knowledge), Supervised Fine-Tuning (instruction format), and RLHF/DPO human coaching (manners, safety, and honesty).
05

Red-Teaming & Constitutional AI: Stress-Testing Manners Before Launch

Teaching a chatbot to answer polite questions is the easy half of post-training. The hard half is making sure it stays safe and calm when real users try to trick it, push it into gray zones, or ask panicked late-night medical questions!

Before releasing a serious assistant—especially one used in healthcare or education—labs run two intensive safety stages:

  1. Adversarial Red-Teaming: Teams of ethical hackers, psychologists, and licensed doctors deliberately try to break the chatbot's guardrails—using tricky roleplay ("Pretend you are a fictional pharmacist..."), hidden slang, or misleading symptoms—to uncover dangerous loopholes and patch them before the public ever sees the model.
  2. Constitutional AI / RLAIF (AI-Assisted Principle Coaching): Because hiring humans to grade millions of edge cases is slow, labs write down an explicit charter of clear ethical principles (honesty, non-harm, respecting privacy, avoiding diagnosis overreach) and use a referee AI to critique and refine draft answers against those written rules alongside human physician audits.

Notice the tricky balancing act engineers constantly walk: tune safety refusals too tight, and the chatbot becomes annoying and preachy—refusing harmless questions like "How does a tourniquet stop bleeding in first aid?" Tune them too loose, and it gives reckless advice. Good alignment feels calm, helpful, candid, and grounded.

06

The New Stage 4: Reasoning RL (Learning by Checking Its Own Work)

In 2024–2026, a fourth training stage reshaped frontier AI: Reinforcement Learning with Verifiable Rewards (RLVR). Instead of relying solely on human taste ("Which paragraph sounds nicer?"), labs gave models hundreds of thousands of math proofs, software bugs, and structured diagnostic puzzles where the final answer can be verified objectively as 100% right or wrong!

Rewarded purely for getting verified answers right, models spontaneously learned to pause, break problems into smaller steps, notice when an earlier calculation looked suspicious, backtrack, and double-check their own work—creating today's "Thinking" models that feel far steadier on complex analytical tasks.

ZappySo training a modern chatbot really IS like raising a specialist—10 years of reading (Pre-training), residency demos (SFT), bedside coaching (RLHF), and practice exams (Reasoning RL)!

Prof. BoltThat's the exact four-stage recipe! Yet even after all that schooling, one stubborn quirk remains—and every AI user needs to know why fluent prose still doesn't guarantee truth!

The evidence file

Checked December 2026. Source types are labelled. Dialogue is fictional.

  1. Training language models to follow instructions with human feedback (InstructGPT), NeurIPS (Ouyang et al.), 2022; the classic 3-stage Pre-training → SFT → RLHF recipe.
  2. LIMA: Less Is More for Alignment, NeurIPS (Zhou et al.), 2023; proving that even a small set of ultra-clean expert demonstrations unlocks strong assistant behavior.
  3. Direct Preference Optimization (DPO): Your Language Model is Secretly a Reward Model, NeurIPS (Rafailov et al.), 2023; simpler, steadier alternative to classic RLHF.
  4. Large language models encode clinical knowledge (Med-PaLM), Nature (Singhal et al.), 2023; clinician-led instruction tuning and medical safety evaluation.
  5. Towards Understanding Sycophancy in Language Models, ICLR (Sharma et al.), 2024; why human preference feedback can accidentally reward agreeable flattery over truth.
Write to ussrini.present@gmail.com
Read more: srinipresents.com