Introduction
What is prompt engineering? In the context of a generative AI large language model (i.e., AI chatbot), it’s a set of techniques for carefully crafting your prompts in such a way as to maximize the quality and concision of the responses. The idea is to guide the AI so that it doesn’t ramble, hallucinate, or create overly complicated output that goes over your head. This post elucidates popular prompt engineering techniques but goes further, to expand beyond just GenAI. After all, why should we assume that only an artificial intelligence would benefit from such guardrails? I’m going to help you understand how you could apply prompt engineering techniques to interpersonal communications as well. (Note: the examples provided concern a hypothetical family, not mine per se.)
Role prompting
Role prompting is giving the AI a specific perspective or identity to shape the tone, assumptions, and level of detail in its response.
GenAI role prompting example:
Tell the AI: Acting as a trained psychologist or social worker accustomed to dealing with people who have deep shame issues and are very vulnerable emotionally, draft some talking points that my kids and I can use when talking to my wife about the juicer she purchased recently. With the extreme tact and light touch of a hostage negotiator, explain that although the juicer she purchased is in fact entirely useless, and its purchase may cause our children to doubt her competence as a parent, this retail goof is really no big deal, and in fact it’s possible that one day we might actually learn to enjoy fresh kale juice. Be very careful not to say anything triggering, since as a juicer-buyer my wife could respond unpredictably, either lashing out or having a complete nervous collapse. Provide evenhanded messaging that well help her come to terms with her mistake so that in her own time, when she’s ready, she can “disappear” the juicer.
Teenager role prompting example:
Tell your 17-year old son: I want you to act not as a snotty, moody teenager who thinks his parents are nothing but an embarrassment, and instead behave as though you are a grateful offspring well aware of all the privileges you have enjoyed throughout your childhood, and of the sacrifices your parents have made for you. Draft an apology letter to your mom and me for letting all our houseplants die during our trip to Greece, and for ramming my Audi into a lamppost when you were supposed to be driving only the old Subaru and only then for necessary trips to the store, not doing joy rides with your friends. Feel free in your apology letter to point out that at least you were responsible enough to recognize the need for a designated driver. Also, write as though you are an educated person with respect for the written word; that is, do not use AI to draft this letter. And if you decide to cheat and use AI on the sly, don’t insult our intelligence with copy/paste, but just read the AI output one time, then close your browser and rewrite the BS boilerplate from memory so it might actually seem slightly authentic.
Few-shot prompting
Few-shot prompting is giving the model concrete examples of the type of output you want, to show it what you’re looking for rather than trying to explain. With these examples in mind, it can do a better job of responding to the actual prompt, so it can provide the right style, format, and level of detail. Your examples can be delimited with brackets [ ] or tags < > to help the model separate them from your instructions.
GenAI few-shot prompting example:
Tell the AI: The president of my HOA emailed me with a complaint about my juniper bush being a fire hazard in our drought-stricken community, and—apparently just to be cheeky—wrote his email in haiku form. I have decided on that basis to communicate with him solely through the superior poetic form of the tanka, from now on. I need you to help me write a response to his latest complaint. Here is an example of the tanka form this response needs to take:
[Noble native plant
Safely placed ten feet away,
It kindles nothing.
Why can’t you just leave me be
And trust my sound strategy.]
Here is another example:
[Cursed clubhouse light
Shining in my face at night
Doesn’t let me sleep.
It’s posted: “Closes at ten.”
Why can’t you enforce this, then?]
And here is a third:
[Dead and yellow lawn
So depressing, sad and wan.
Sprinklers all shut off.
Why did you choose to plant grass?
You guys are a pain in the ass.]
Note how each tanka ends with a rhyming couplet, which is my own contribution to the poetic form.
When possible I like to start with a rhyming couplet, too. With the above examples in mind, help me write a rebuttal to the HOA president’s latest complaint, which is that my friends too frequently use the guest parking spots available, when there is no stated limit or policy around this.
Marital discussion few-shot prompting example:
Tell your wife: We need to discuss something pretty important: with our mortgage winding down and the kids launched, I want to lower the amount of life insurance I’ve traditionally purchased. Since I know this is a hot-button issue for you, I would like to give some examples of how I’d like you to frame your misgivings, dissenting views, and counter-arguments.
For one, please use I-statements, not you-statements.
<Wrong: “You insist on doing this dangerous sport but are too cheap to provide some financial cushion.”>
<Right: “Whenever you come home late from a bike ride, I wonder if something happened, and I feel vulnerable since you’re the main breadwinner. I feel like you need more life insurance than someone with a safer hobby like swimming or curling.>
Also, as needed please use the right discussion framing techniques—such the “8 Phrases to Help Your Relationship Thrive,” explained in the New York Times—to keep the discussion on an even keel.
<Right: “Let’s back up for a moment and consider what this relationship needs from us right now.>
<Wrong: “You selfish bastard, you’re obviously out to bankrupt me in my widowhood.”>
Finally, if you realize that the discussion is getting out of hand, please work to de-escalate it.
<Right: “I think I’m too hangry to have this discussion right now. Can we hit the pause button, reflect on this while we simmer down, and pick it back up after dinner?”>
<Wrong: “Your mom was right about you, all you care about is yourself.”>
Now that I’ve provided these examples of how our dialogue should go, let’s now discuss me lowering the coverage from $3 million down to $1 million, because I’m starting to worry I’m worth more to you dead than alive.
Direct constraint and negative prompting
This is about helping steer the AI’s output, so it doesn’t give responses that are too verbose and/or generic, and/or have the wrong tone. It also tells the model what it should specifically not do, like recommend something you already know you don’t want.
GenAI direct constraint and negative prompting example:
Tell the AI: I want you to help me figure out how to deal with a weirdo who parks his car in front of my house and sits there for hours at a time, and on the last occasion left behind a soda bottle full of his urine. Provide me three steps to take, from most gentle to most firm, to get rid of him, with just one or two sentences in each step. Don’t include legal advice since I’m not planning to pursue that path, and don’t include the response, “If you leave behind your urine again I will find you and I will kill you,” because my wife already made me promise I wouldn’t say that.
Tell your brother: Next time we talk on the phone, I want to strictly avoid the following topics: 1) politics; 2) any culture war matters; 3) what “they” are teaching in our schools; 4) any paraphrasing of a polemic that you got from a podcast; 5) anything that is an “issue”; and 6) anything “important.” I would like you to focus on one of more of the following topics: 1) our pets or children; 2) any wildlife sighting (can include, say, drunken frat boys in their natural habitat); 3) cycling (firsthand accounts or commentary on the pro peloton); 4) fond shared reminiscences; 5) anything that is funny, random, and/or unimportant. Present each topic in five sentences or less, and make sure I have the opportunity to speak as well.
Chain of thought prompting
This is where you ask the LLM to “think out loud” as it creates a step-by-step explanation of the solution to your query. By breaking a complicated response into logical steps, you help the model to avoid errors in reasoning, and should these occur you’ll be better able to check the logic and see where the AI went wrong.
GenAI chain of thought prompting example:
Tell the AI: I want you to help me plan a five-day vacation to Santa Fe, New Mexico for two people for under $3,000. First, make sure there is no hot air balloon festival or other huge tourist draw that will cause National to run out of rental cars without realizing it since their reservation system is obviously primitive and has no real-time inventory check capability. Make sure the rental car company you select can guarantee a traditional car, not an electric one, so I don’t have to charge it in a Walmart parking lot (resulting in the unwise purchase of a plastic gallon jug of vodka that will set the tone for the entire vacation). When selecting a hotel, make sure it doesn’t consume so much of the budget that we can’t afford to eat three times a day. When estimating restaurant costs, assume that the wine will be at least $12 a glass, and beer $9, and modify the food budget accordingly; in general make sure “huge servings” is well represented in user reviews. Make sure not all tourist outings are Georgia-O’Keefe-themed because I have trauma around her art. Should you determine that $3,000 isn’t enough for a five-day vacation in Santa Fe, feel free to suggest alternative destinations, but don’t suggest Florida or anything similarly far away because I’m out of frequent flier miles. Only provide recommendations—do not reserve anything. In the event you’ve already hacked my credit card number, don’t leverage it to do anything agentic; that is, respect that I’ve specifically denied you these entitlements (though honestly, if you’ve already hacked my card, who am I kidding?).
Tell your wife: It’s your turn to decide where we should hike today. When planning this outing, make sure we have a plan ahead of time with a specific destination (i.e., “Sibley Staging Area at 6800 Skyline Blvd” vs. some vague, loosey-goosey notion like “somewhere in Sibley” or “that one trail with all the live oaks, out by Huckleberry” that will have me on my phone searching in vain for trailheads in Google Maps while you drive, so I not only get carsick but am given random dropped-pin coordinates in the middle of nowhere, such that the GPS voice announces “You have arrived” when we’re just in the middle of some road with nowhere to park and not a trail in site. Make sure that the drive time to the trailhead does not exceed the actual hiking time. If there are bridges along the route, determine if they are likely to be clotted with traffic. Present all of the logistical steps sequentially so that I will know in advance if this is going to be a procedural quagmire that adds to the very stress levels that this outing in nature is supposed to reduce.
Caveat
As you apply these prompt engineering techniques to your human interactions, be sure to tread carefully and tactfully, as humans are sensitive in ways an AI could never be. If you spend too much time interacting with a large language model, you may find yourself developing bad habits like prioritizing precision over decorum. This could produce a negative reaction in a human that an AI would never have, such as whacking you upside the head.
Other albertnet posts on A.I.
- I, Chatbot
- Almost Intelligent – Part I
- Almost Intelligent – Part II
- Smartphones & Artificial Stupidity
- A.I. Smackdown – Moto vs. Cortana vs. Siri
- Could Artificial Intelligence Replace Writers? – Part 1
- Could Artificial Intelligence Replace Writers? – Part 2
- Could Artificial Intelligence Replace Writers? – Part 3
- A.I. Smackdown – English Major vs. ChatGPT – Part 1
- A.I. Smackdown – English Major vs. ChatGPT – Part 2
- Schooling ChatGPT
- Will A.I. Steal Our Jobs?
- Tech Check-In - How Good is the Latest A.I.? - Part I
- Tech Check-In - How Good is the Latest A.I.? - Part II
- What is ChatGPT Great At (and Not)?
- Tech Reflection – Two Sides of AI
- AI Smackdown – ChatGPT vs. Copilot vs. Gemini
- New Year’s Resolutions — AI Edition
- Ask an AI Skeptithusiast
- More Advice From an AI Skeptithusiast
Email me here. For a complete index of albertnet posts, click here.


























