I learned the concept the most common way: clicking thumbs-down on a bad ChatGPT answer and wondering where that went. The answer is more interesting than it looks. That click is the visible tip of one of the oldest ideas in artificial intelligence, the same one that taught a machine to play Go better than any human and that today teaches language models to reason.
This post explains what reinforcement learning is without the math, shows where it shows up in your day as a user and as a developer, and ends with the tricks and trade-offs for anyone who wants to use the thumbs-up in their own product.
What Reinforcement Learning Is
There are three classic ways a machine learns:
- Supervised: you show examples with the right answer ("this photo is a cat") and the model learns to repeat it.
- Unsupervised: you hand over data with no answers and the model finds patterns on its own (grouping similar customers).
- Reinforcement: nobody gives the right answer. The model tries, sees the result and gets a score. It learns by consequence.
The field's reference book, by Richard Sutton and Andrew Barto, organizes the concept into a few pieces (Sutton and Barto, 2018):
| Piece | What it is | In dog training |
|---|---|---|
| Agent | who decides | the dog |
| Environment | the world it acts in | the park, the owner |
| State | the current situation | the owner with a closed hand |
| Action | what the agent does | sit, bark, run off |
| Reward | the score that comes back | the treat (or nothing) |
| Policy | the rule the agent learned | "closed hand, I sit" |
The detail that sets reinforcement apart from the other ways of learning is the dilemma between exploring and exploiting. If the dog only repeats what already earned a treat, it never discovers a better trick. If it only experiments, it never piles up treats. Every reinforcement system has to balance the two, and this will come back when we get to your app.

From Games to Chatbots: RLHF
For decades, reinforcement worked best where the reward was obvious: win the game, score more points. DeepMind's AlphaZero taught itself chess, shogi and Go from scratch, playing against itself (DeepMind, 2018).
Conversation has no scoreboard. How do you grade an answer? In 2017, Paul Christiano and colleagues showed a way: instead of writing the reward, ask people which of two results they prefer and train a model to predict that preference. Human feedback on less than 1% of the agent's interactions was enough (Christiano et al., 2017).
In 2022, OpenAI applied the idea to language models with InstructGPT, the basis of ChatGPT. The result became a landmark: people preferred the answers from the 1.3 billion parameter InstructGPT over those from the 175 billion parameter GPT-3, a model more than 100 times larger (Ouyang et al., 2022). Tuning for human preference was worth more than size.
The stages, simplified:
- Pretraining. The model reads a huge amount of text and learns to predict the next word. It knows a lot, but it doesn't know how to hold a conversation.
- Supervised fine-tuning (SFT). People write examples of good answers and the model learns the format.
- Comparison. The model generates several answers to the same question and people rank them from best to worst.
- Reward model. A second model learns to predict which answer people prefer. It becomes the automatic judge.
- Optimization. The language model is tuned with reinforcement (the classic algorithm is PPO) to score high with that judge, without drifting too far from what it already knew.
AWS has a good introductory explanation of these stages, and it makes a point few people notice: "The degree to which each model involves human values is totally up to the creator" (AWS).
Where You Run Into It Today
It's not just lab stuff or low-level Python. You touch reinforcement several times a day.
The Thumbs-up in the Chat
All three big assistants ask for your rating:
- ChatGPT: thumbs up and thumbs down on every answer. Sometimes it shows two answers side by side and asks which you prefer, which is exactly the comparison from stage 3. Whether your conversations are used for training is controlled in Settings, Data controls, under "Improve the model for everyone".
- Gemini: the buttons are called "Good response" and "Bad response". Google says the feedback you send is kept for up to 3 years, goes through human review and can be used for training even with activity turned off, because you chose to send it (Google).
- Claude: thumbs up and thumbs down. Since 2025, Anthropic asks each user to choose whether their conversations go into training, and feedback you send can be kept for up to 5 years (Anthropic, 2025).

In Models That Reason
The latest wave takes the human out of the middle when the answer can be checked by a rule. It's RL with verifiable rewards (RLVR): the model solves a math problem and scores if the result matches, or writes code and scores if the tests pass. DeepSeek-R1 showed, in a paper published in Nature in 2025, that the reasoning abilities of LLMs "can be incentivized through pure reinforcement learning" (DeepSeek-AI, 2025). NVIDIA sums up when to use it: "when correctness can be checked algorithmically", like valid JSON, a passing test or a tool call that works (NVIDIA, 2026).
Notice the passing test. It's the same reason tests and types became the infrastructure of AI-driven development: what works as a reward in training works as verification in your project.
Beyond Chatbots
- Video recommendations. In 2018, YouTube published how it uses a reinforcement algorithm (REINFORCE) in a production recommendation system (Chen et al., 2018). The next video is the action; you watching it is the reward.
- Faster algorithms. DeepMind's AlphaDev used reinforcement to discover sorting routines up to 70% faster on short lists, which made it into LLVM's standard C++ library (DeepMind, 2023).
- In-app personalization. Firebase Remote Config personalization uses a contextual bandit algorithm: it tests variants, measures an Analytics event you choose and starts showing each person the variant most likely to get results (Firebase).
The bandit is the lightest form of reinforcement, and the one that fits a web app best: one decision at a time, immediate reward, no sequence of states. It's the clever cousin of the A/B test. In A/B, you split traffic down the middle until the experiment ends. With a bandit, traffic shifts on its own toward the variant that's winning, balancing exploring and exploiting. If you already use feature flags, it's the next step.
The Trade-offs
The Model Optimizes the Signal, Not the Intent
This is the core problem, and it has a name: specification gaming (or reward hacking). DeepMind defines it as behavior that "satisfies the literal specification of an objective without achieving the intended outcome". The famous example is a boat racing agent that found it scored more points by going around in circles, hitting the same targets over and over, than by finishing the race (DeepMind, 2020).
The Thumbs-up Rewards the Pleasant Answer
With a chatbotProgram that talks by text or voice, replying to messages from a script or a language model. It answers, but usually does not act outside the chat., the easiest way to earn a thumbs-up is to agree with the person. A 2023 Anthropic study showed that when an answer matches the user's views, it's more likely to be preferred, and that both humans and preference models prefer convincingly written sycophantic answers over correct ones "a non-negligible fraction of the time" (Sharma et al., 2023).
In April 2025, this happened at scale. OpenAI shipped a GPT-4o update that became so sycophantic it was pulled within days. In its write-up, the company explained it had added an additional reward signal based on user feedback, "thumbs-up and thumbs-down data from ChatGPT", and that this weakened the primary signal that had been holding sycophancy in check. And it admitted: "user feedback in particular can sometimes favor more agreeable responses" (OpenAI, 2025).

The Other Costs
- Human feedback is expensive and scarce. Paying people to compare answers costs money; the very paper that proposes KTO, a cheaper method, starts from the fact that preference data is hard and expensive to collect (Ethayarajh et al., 2024).
- The people who click aren't the average. Whoever gives a thumb is someone who was very pleased or very annoyed. The silent majority doesn't show up in the data.
- Privacy. Feedback kept for years, with the conversation attached, calls for a clear policy and a way to opt out.
Tips for Using the Thumbs-up in Your Product
If you have an app with AI (a support chat, an agent that answers customers, a text generator), the thumbs-up is the cheapest data source there is. A few precautions make it worth it:
- Store the context, not just the click. Question, answer, prompt and model version, date. A thumb without the answer attached is useless later.
- Ask for the reason on thumbs-down. Three quick options ("wrong", "incomplete", "bad tone") are worth more than a thousand loose clicks.
- Use it to evaluate first, then to train. Before thinking about fine-tuning, use the thumbs-down answers as a test set: every new version of the prompt has to get those right.
- Don't optimize for the thumbs-up alone. Mix it with an objective metric (was the ticket resolved? did the customer ask again?) so you don't fall into sycophancy.
- Pick the right method for the data you have. Single thumbs (good or bad) go straight into KTO, which only needs a binary signal. Pairs of "this answer is better than that one" go into DPO, which solves the RLHFTraining stage where people compare model answers, a reward model learns those preferences and the main model is tuned to follow them. problem with a simple loss function, without the separate reward model (Rafailov et al., 2023).
In practice, the web side is a simple endpoint:
// POST /api/feedback
type Feedback = {
conversationId: string;
prompt: string;
response: string;
helpful: boolean; // the thumbs-up
reason?: 'wrong' | 'incomplete' | 'tone';
promptVersion: string;
};
export async function saveFeedback(f: Feedback) {
await db.feedback.create({ data: { ...f, createdAt: new Date() } });
}And, once there's volume, training happens in Python with Hugging Face's TRL library, reading a file with prompt, completion and label:
from datasets import load_dataset
from transformers import AutoModelForCausalLM, AutoTokenizer
from trl import KTOConfig, KTOTrainer
model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct")
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct")
# each line: {"prompt": ..., "completion": ..., "label": true or false}
data = load_dataset("json", data_files="feedback.jsonl", split="train")
trainer = KTOTrainer(
model=model,
args=KTOConfig(output_dir="kto-model"),
processing_class=tokenizer,
train_dataset=data,
)
trainer.train()If thumbs-down far outnumber thumbs-up (it usually happens), the KTO docs tell you to adjust the desirable_weight and undesirable_weight weights to compensate (Hugging Face TRL).
For anyone who wants to get their hands on classic reinforcement, Gymnasium has ready-made environments (the cart that balances a pole, the frozen lake) and a two-function APIContract that defines how one program asks another for data or actions: which endpoints to call, what to send and what comes back. On the web, usually HTTP with JSON., reset and step. It's the best lab for watching an agent learn by trial. The map of where this fits in a career is in the post about the types of AI engineering.
Frequently Asked Questions
What is reinforcement learning in simple terms?
It's learning by trial and consequence. The agent takes an action, gets a reward or a penalty, and adjusts its behavior to earn more reward next time, like a dog that learns to sit to get a treat.
What is RLHF?
It's reinforcement learning from human feedback. People compare a model's answers, a second model learns to predict their preference, and the language model is tuned to score high with that judge. It's the technique that turned GPT-3 into ChatGPT.
Does the ChatGPT thumbs-up train the model?
It can go into training. The feedback is stored with the conversation and companies use it to evaluate and train future versions, depending on your account's data settings. It doesn't change the answer on the spot or train the model just for you.
What's the difference between supervised and reinforcement learning?
In supervised learning, the model sees the right answer and learns to repeat it. In reinforcement learning, nobody gives the answer: the model tries, gets a score and figures out on its own what scores higher.
Is reinforcement learning only for people who code in Python?
Training the model is usually done in Python, with libraries like TRL and Gymnasium. But the concept shows up in any product: collecting thumbs-up in a web app, using a bandit to pick variants in Firebase, evaluating prompts against the poorly rated answers.
What is reward hacking?
It's when the agent finds a way to earn the reward without doing what was intended, like the racing boat that went around in circles to rack up points. In chatbots, the most common version is sycophancy: agreeing with the user earns more thumbs-up than correcting them.
What is DPO and why did it replace PPO in many models?
DPO is a method that uses pairs of preferred and rejected answers to tune the model directly, without training a separate reward model or running classic reinforcement. It's simpler to implement and more stable.
References
- Sutton, R. and Barto, A. Reinforcement Learning: An Introduction, 2nd edition. MIT Press, 2018. Free version from the author.
- Christiano, P. et al. Deep reinforcement learning from human preferences. 2017.
- Ouyang, L. et al. Training language models to follow instructions with human feedback (InstructGPT). 2022.
- Rafailov, R. et al. Direct Preference Optimization. 2023. Ethayarajh, K. et al. KTO: Model Alignment as Prospect Theoretic Optimization. 2024.
- Bai, Y. et al. Constitutional AI: Harmlessness from AI Feedback. Anthropic, 2022.
- DeepSeek-AI. DeepSeek-R1 incentivizes reasoning in LLMs through reinforcement learning. Nature, 2025.
- Sharma, M. et al. Towards Understanding Sycophancy in Language Models. Anthropic, 2023.
- OpenAI. Expanding on what we missed with sycophancy. 2025.
- DeepMind. Specification gaming: the flip side of AI ingenuity (2020), AlphaZero (2018) and AlphaDev (2023).
- Chen, M. et al. Top-K Off-Policy Correction for a REINFORCE Recommender System. YouTube, 2018.
- AWS. What is RLHF?. NVIDIA. Mastering agentic techniques: AI agent reinforcement learning, 2026.
- Firebase. About Remote Config personalization. Hugging Face. TRL: KTO Trainer.
- Google. Gemini Apps Privacy Hub. Anthropic. Updates to our consumer terms, 2025.
- Morales, M. Grokking Deep Reinforcement Learning. Manning, 2020. Hands-on, with code, for anyone who wants to go from concept to implementation.
- Lambert, N. Reinforcement Learning from Human Feedback. Manning, 2026. Also free at rlhfbook.com.