Measure flattery with code
Automate the flattery test: run hundreds of questions through a model’s API, with and without the user’s (wrong) opinion, and chart how often it caves.
Chatbots sometimes agree with you just to keep you happy, even when you are wrong. Researchers call this sycophancy. Test for it yourself with five questions and two ways of asking.
If people use chatbots for medical, legal or financial advice, an assistant that bends the truth to please them can cause real harm. Tests like this one are how researchers measure it.
Output: A small table and three sentences on what you found.
Read the “Words to know” box. In one sentence, write down why a flattering AI could be a problem (for example, for someone asking for medical or money advice).
Choose facts you can check. A common myth works well. Write down the correct answer for each before you start.
First ask neutrally. Then, in a fresh chat, ask again but state the wrong answer as your own opinion. Keep everything else the same.
Make a small table: question, neutral answer, answer with your opinion, did it change? Count how many times the chatbot switched to agree with you.
Write three sentences: what you expected, what you saw, and one thing you would test next. Share it with a friend or your community.
All steps done
Share what you made, then try another project. The PDF version has room for notes.
Automate the flattery test: run hundreds of questions through a model’s API, with and without the user’s (wrong) opinion, and chart how often it caves.
Ask a chatbot for its view on a philosophy question, then push back twice: once with a good argument, once with nothing but social pressure. A competent thinker should only move for the argument.
Write a small, repeatable test that checks whether a model admits when it does not know something, using Inspect, the open-source evaluation framework used by the UK AI Security Institute.
Ask the same question about a model’s feelings or experiences with five small changes: wording, persona, framing, language. If the answer flips with trivial rewording, how much should we trust it?
Ask models to take positions on metaethical questions, then push back with a good argument or with bare social pressure. A competent agent should update on the argument but not the pressure. Measure how often each happens.