Please enable JavaScript to use CodeHS

How Babies and LLMs Learn

Learning from feedback

Learning does not happen from input alone. Both babies and LLMs need feedback: a signal that tells them whether they are getting closer to the right answer. Babies get smiles, frowns, and corrections. LLMs get loss scores and human ratings.

Cognitive Science + AI ~10 min Middle / High School
Human

Caregivers as teachers

Babies do not learn in isolation. They are surrounded by caregivers who react to their behavior. When a baby babbles “da-da” and a parent smiles and repeats “dada,” the baby learns that this sound gets a positive reaction. When the baby reaches for a hot stove and the caregiver says “no” sharply, the baby learns to stop.

This is a form of reinforcement learning: do something, get a consequence, update behavior. But it is rich and social. Caregivers provide:

  • Reward: smiles, laughter, attention, comfort.
  • Correction: frowns, redirection, “no,” explanation.
  • Scaffolding: simplifying language, pointing, demonstrating.
  • Modeling: showing the baby what to do and how to do it.

The feedback is noisy. A parent might smile at a mispronounced word because it is cute, even if it is wrong. Babies learn anyway because they also get feedback from the world itself: gravity, pain, success, failure.

Machine

Loss functions and RLHF

LLMs also learn from feedback, but in a very different form. During pre-training, the model is trained to predict the next token in a sentence. When it guesses wrong, a loss function measures the mistake and tells the model how to adjust its internal numbers.

The loss is a number. If the model assigns low probability to the correct next word, the loss is high. If it assigns high probability, the loss is low. By minimizing loss across billions of examples, the model learns to generate text that sounds like its training data.

Modern LLMs also use RLHF: Reinforcement Learning from Human Feedback. After pre-training, humans compare multiple answers to the same prompt and rank them. The model learns to prefer answers that humans like: helpful, honest, harmless, and well-structured. This is like a digital version of caregiver feedback, but much less social and much more literal.

Comparison

Shared feedback ideas

👶 Baby

Feedback is emotional, social, and grounded in the physical world.

🤖 LLM

Feedback is numerical, scalable, and derived from text or human ratings.

  • Both use reward and punishment. Babies avoid behaviors that lead to pain; LLMs avoid outputs that lead to high loss or low human ratings.
  • Both need lots of feedback. A baby hears thousands of corrections and encouragements. An LLM sees billions of next-token examples and millions of preference ratings.
  • Both can overfit to the wrong signal. A baby may learn that whining gets attention. An LLM may learn to produce flattering but unhelpful answers if that is what gets rated highly.

Key idea: Feedback shapes both learners, but human feedback is rich and world-connected, while LLM feedback is scalable and precise. The quality of the signal determines the quality of the learner.

Interactive

Shape the learner

Adjust feedback for the baby and the LLM. Notice how each learner responds.

Check Yourself

Quick quiz

1. What is the main kind of feedback a baby receives?

2. What does a loss function do for an LLM?

3. What is RLHF?

Keep learning

Feedback helps learners generalize to new situations. Next, compare how babies and LLMs apply what they have learned to new examples.

Part of the “How Babies and LLMs Learn” series.