In this post, I want to share a recent worksheet I wrote for Machine Learning for Kids. It is a hands-on project to give students an insight into an aspect of prompt engineering with language models.
Students create a Scratch project that lets them have a conversation with a small language model. They try to have the same conversation multiple times, and they set up the Scratch project so that adds a short role instruction to the context at the start (e.g. “Answer like a pirate”).
The instruction changes how the model answers, and students have to try and work out from the responses they get from the model which persona has been selected.
screen recording of the Scratch project on YouTube
By repeating the activity several times, they should notice something important: the same language model gives very different answers to the same questions, just because of a small change in the instructions. This observation is the key lesson here.
