Note: This article is best read on a desktop or laptop for easier copying and reading of code examples.
What I Want
I want the chatbot to take a list of people with their age and tell me the youngest.
There. I said it clearly in one sentence. But I’m cheating—I have over 60 years of programming experience. I know how to articulate technical requests precisely. Even lots of programmers have trouble stating these problems in English. They can code it in a programming language but to give clear English instructions that will not confuse the chatbot might require practice.
For Everyone Else
For someone without computer training, stating it that way might not come easily at first. (Be patient. Rome was not built in a day.) The words “list,” “take,” “tell me the youngest”—they might not feel like the right technical vocabulary. You might worry: Am I saying this correctly? Will the computer understand?
So instead, you can just show an example. This can be your entire prompt:
You can copy these blocks from my article into a chatbot and see the answer.
yo means years old
[bill, 24 yo], [amy, 12 yo], [tom, 34 yo] → [amy, 12 yo]
Now you do: [joe, 12 yo], [mary, 24 yo], [julie, 10 yo]
If you want to enter this example without copy/paste, you need to Press Shift+Enter (or Shift+Return) to create a new line without sending the message. Just pressing Enter alone sends the message, but Shift+Enter lets you compose multi-line prompts directly in the chat box.
Don’t worry about the exact symbols. Whether you use (
, [
, or {
won’t make any difference. The chatbot will get it. Similarly, you can show the result with →
or “gives” or =>
or _>
—it will work. You can even define your own abbreviations like “yo means years old.” As long as you could guess it visually, the chatbot will most likely be able to also.
The brackets in the example show mathematical thinking, but you could make it even simpler:
yo means years old
bill 24 yo, amy 12 yo, tom 34 yo → amy 12 yo
Now you do: joe 12 yo, mary 24 yo, julie 10 yo
That works just as well!
That’s it. Paste those lines into the chatbot. If it responds with [julie, 10 yo], you know it worked. You successfully communicated what you wanted without ever having to find the “right” words to describe it.
And here’s the bonus: Claude will often tell you the better question. It might respond with something like: “Looking at the pattern, you want to find the person with the smallest age” or “You’re looking for the youngest person in the list.” Now you’ve learned how to express it more clearly for next time—but you didn’t need to know that to get started. You can also ask “how could I have described this problem in words?”
Test It Out More
Once it works, you can keep testing with more examples to make sure the chatbot really understands the pattern:
Now you do: [sarah, 45 yo], [mike, 23 yo], [lisa, 67 yo]
Now you do: [carlos, 8 yo], [diana, 15 yo], [frank, 8 yo]
Now you do: [emma, 56 yo], [noah, 31 yo], [olivia, 29 yo]
Each test confirms the pattern. And with each confirmation, you gain confidence that you’ve communicated successfully—still without needing formal technical language.
Try Another Pattern: Sorting by Age
The same approach works for more complex patterns. What if you want to put people in order by age, from youngest to oldest?
yo means years old
[bill, 24 yo], [amy, 12 yo], [tom, 34 yo] → [amy, 12 yo], [bill, 24 yo], [tom, 34 yo]
Now you do: [joe, 12 yo], [mary, 24 yo], [julie, 10 yo]
The answer would be: [julie, 10 yo], [joe, 12 yo], [mary, 24 yo]
This shows a slightly different pattern—instead of just picking the youngest, you’re putting everyone in order. The chatbot will recognize the sorting pattern from the example and apply it to the new data.
Fixing Bugs
If the chatbot isn’t guessing the pattern correctly, you can try giving it a few more examples. Sometimes one example isn’t enough to clarify the pattern, especially for more complex tasks. Add another line or two showing different inputs and outputs, and the chatbot will adjust its understanding.
The Point
Examples can be easier than explanations. You don’t need decades of programming experience to show a pattern. And once you see it working, you discover: “Oh, I can just say ‘find the youngest person.’”
But you didn’t need to know that to start. In fact, you can make your own personalized programming language—define whatever abbreviations and notation make sense to you, and the chatbot will follow along.
While these examples use Claude, the same approach works with ChatGPT, Grok, or any other chatbot. The technique is universal—show the pattern, and modern AI will recognize it.