My sixth grade mental model for prompting LLMs
In sixth grade, my teacher gave us a seemingly simple task: write out the instructions for something you do on a daily basis. The goal was that someone who had never done this task should be able to read the instructions, follow them, and successfully complete the task.
After we were done writing, our teacher collected all of our instructions, then took one randomly. That classmate had picked brushing your teeth as their task. Their instructions read like so:
- Go to your bathroom
- Get your toothbrush and put toothpaste on it
- Brush your teeth
- Rinse your mouth out with water
What followed next was something that has stayed with me. Our teacher mimicked the instructions literally, to prove a point:
- Walked into a bathroom
- Grabbed a toothbrush and put a toothpaste tube on top of it
- Flailed at brushing her teeth with the imaginary toothbrush that had the tube on top of it
- Tried to rinse her mouth out with water, but the toothbrush and toothpaste were getting in the way
We make a lot of assumptions about what other people know. This can come from a good place of not wanting to assume someone doesn’t know something and being condescending. However, in the context of giving instructions to someone who has zero background knowledge or experience, we should strive to be as thorough as possible.
In the example above, that would look something like:
- Go to your bathroom
- Pick up your toothbrush
- Turn on your faucet
- Wet your toothbrush for two seconds
- Turn off your faucet
- Put your toothbrush down
- Pick up your toothpaste
- Unscrew the top of the tube
- Hold the toothpaste with one hand
- With your free hand, pick up your toothbrush
- Gently squeeze enough toothpaste from the tube onto the bristles of the toothbrush, enough to cover it
- Set down your toothbrush
- Screw the top of back onto the toothpaste
- Set down your toothpaste
- Pick up your toothbrush
- Angle it facing your teeth, so the head of the brush with the paste on it is directly in front of your teeth
- Touch the toothbrush to your teeth
- Move the brush back-and-forth, left-to-right to achieve the brushing effect
- Do this until your teeth feel clean
- Spit the toothpaste in your mouth into the sink
- Turn the faucet on
- Use your free hand to cup water from the faucet
- Rinse your mouth using the cupped water. Repeat until mouth is clean
- Rinse off your toothbrush until its clean
- Set your toothbrush down
- Rinse your hands
- Turn off the faucet
I’m sure I missed some details or steps, and dentists would probably have a gripe with how clean your teeth would actually be by completing the above, but this is closer to the level of detail it would take if you want someone who has never brushed their teeth to do it successfully on their first try.
Take this concept and apply it to LLMs. You don’t have to feel badly about being condescending because LLMs don’t have feelings. Whenever I prompt an LLM, this sixth grade exercise resides in the deep recesses of my mind, shaping what I think well-written prompts look like: include plenty of relevant detail, be clear about what a good outcome looks like, and don’t assume too much.
Thanks Mrs. Wade!
Follow me on Twitter