5 quick wins for your daily AI prompts

Amelia Woodward
Amelia’s blog
Published in
6 min readAug 5, 2024
Photo by Solen Feyissa on Unsplash

Like many of you reading this, I am now a daily active user of ChatGPT and multiple AI chatbot tools built on the foundation of LLMs.

A little bit of prompting improvement can reduce a lot of model hallucination and save you time in generating the content you’re looking for. (Even if it only adds <30 seconds to your prompt writing set up.)

Here’s five “quick win” ways I find myself returning to for regular use which I wanted to document. These may be familiar, but maybe there’s something new in here.

Of course, their efficacy depends on the model you are using itself, and different models will behave differently with these responses. In general the following works well with GPT-3.5, 4, 4o and may work well with Claude, Gemini, etc, though some are geared towards Retrieval-enabled models. Starting off with the simple… and what you may have already tried:

#1 — Context, tone, style setting

Take the time to provide 1–2 sentences on the context of the ask, tone and any style preferences. This is particularly helpful in a couple of common scenarios:

  • (1) When I am writing a draft of something to be shared with others, in which case the style of the writing matters immensely, or,
  • (2) When I am trying to understand a concept and I need a very simple explanation / more detail than would otherwise be generated.

Creating a job title is often effective because it implicitly carries a lot of context on objectives, content and tone. Explicitly specifying a tone can be helpful to tone up or down how casual the response is.

Example — Here’s an example for a thank you email — if this is something you do often you could also save the prompt template so you don’t need to retype this every time or create a custom GPT with this in the prompt line.

## EXAMPLE PROMPT FOR A THANK YOU EMAIL ##
You are a business manager skilled at writing effective emails.
Your objective is to writh a thank you to a colleague for a recent coffee chat in which
they provided invaluable career advice. Your tone is warm and professional, your writing is succinct
and you sign off with "Best, Amelia". Specifically make sure to cover the following 3 points:(1) X, (2) Y, (3) Z.

#2 — Set the ground rules

Do you you want your model to only reference certain information (applicable when you are using RAG)? Do you want your model to avoid certain topics or styles? Don’t be afraid to tell the model what it should and shouldn’t do.

I find myself returning to this approach in a couple of instances:

  • (1) When accuracy of output is particularly important (and in this case, you should always always additionally sense check yourself with other sources to ensure correctness);
  • (2) When generating anything subjective that needs to have a particular tone or avoid topics (e.g., if writing for a customer support bot, you’d want to make sure the AI model is perpetually using a patient tone, or doesn’t unnecessarily go off-topic).

Example — Here’s an example which works with the retrieval capabilities on for GPT 4:

## EXAMPLE PROMPT TO LEARN ABOUT THE OLYMPICS##
- What year was the first modern Olympics?
- What instigated the first modern Olympics?
- Why is the Olympics only held once every 4 years?
Please provide 1 concise bullet for each of the questions above.
Only reference reputable sources to generate your answer.
Do not attempt to generate an answer without explicitly quoting an
external source. Provide the link to the external source and a quote from the text.

#3 — Few shot prompting

Many top generative AI models perform extremely well with only zero-shot prompting. “Zero-shot prompting” is the ability for a model to produce decent outputs despite not having seen a very similar example of an input-output combination in training.

Saying this, the chance that a model performs the way you’d like it to on a task typically improves given some examples (i.e., with “few shot prompting”). I find myself providing 1–2 examples in my prompt when I have a ‘vision’ in mind for a replicable output format or type of answer.

Example — Imagine you are trying to summarize some raw review data and would like to quantitatively judge sentiment for multiple movies. You are more likely to get the level of granularity desired by specifying an example output as well as providing a format. You can see how this could be used to replicate for much higher volume of reviews too.

## EXAMPLE FEW SHOT PROMPT TO SUMMARIZE MOVIE REVIEWS##
Review 1: "Casino Royale offers a fresh take on the Bond franchise with Daniel Craig's first outing as 007. The film combines intense action sequences with a darker, more realistic portrayal of the iconic spy. While some may miss the charm of previous Bonds, others will appreciate the new direction and grittier tone."
Likely review rating out of 5: 4 / 5
Justification: Reviewee thinks Casino Royale is a fresh and realistic take though also suggests appreciation for previous renditions which focus more on charm.
Now rate the following review/s:
Review 2: "Sweet Home Alabama is a charming romantic comedy that captures the essence of Southern hospitality. Reese Witherspoon shines as the lead, delivering a performance full of wit and warmth. The film balances humor and heart, making it a delightful watch for anyone looking for a feel-good story about love and second chances."
Output format:
- Put the output in a table with 3 columns: Original review quote, Review rating, Justification.
- Make sure to selectively bold key points in columns 2 and 3.

#4 — Tree of thoughts prompting

Tree of thoughts prompting refers to to generating several scenarios or paths for a generative AI model.

While the intent of much AI research in this space is to use this for coded, multi-call prompting rather than one-off prompts, you can still use tree of thoughts for some quick wins. I like to use tree of thoughts when I am:

(1) brainstorming creative ideas and want to get even more ideas; and/or

(2) am trying to quickly understand multiple points of views (either as an early critic of my own work or to push my thinking on a topic).

Example — Consider this example to help brainstorm plot points for a mystery story.

## EXAMPLE TREE OF THOUGHTS - INSPIRED BRAINSTORM FOR NARRATIVE IDEAS##
Create three different potential plot arcs for a mystery novel set in a rural
Australian town.
Each plot should have a unique twist and a different set of main characters.
Once you've created a scenario for each, imagine 2 possible secondary plot twists
based on the first scenario.

#5 — ReAct prompting

The idea behind ReAct prompting is to disaggregate Reasoning tasks from Action tasks. This is particularly helpful in retrieval contexts or contexts where there are many steps required to solve a problem.

In their paper introducing ReAct prompting, Yao et al explain that humans intuitively link context they gain with next steps. For instance, sharing the example of how humans would likely reason a next step, e.g., “I don’t have salt, so let me use soy sauce and pepper instead”. By providing “few shot” examples of successful reasoning and actions in prompts, they were able to see strong improvements on multi-step reasoning tasks.

Taking broad inspiration from this approach, I have used this before for providing greater prompt specificity for more granular secondary data pulls where initial searches / retrieval steps may face roadblocks.

Example — Imagine you wanted to find and synthesize publicly available statistics about US CPI where depths of insight may live across multiple pages of the US Bureau of Labor Statistics.

Reasoning:
- Using the US Bureau of Labor Statistics website identify the major sections of the homepage and identifiy major tabs related to CPI.
- Summarize trends in CPI in the last few years as well as any very recent data and commentary on causes.
Actions:
- Go to the US Bureau of Labor Statistics website.
- Go to the tabs related to CPI.
- Click on further relevant links that may provide additional info on either
(a) any aggregated information on CPI in the last year
(b) any recent announcements about trends in CPI.
Output format for reasoning:
- Please succinctly write in bullet points.
- Include quantitative annualized CPI outputs for each year in question.

Which of these prompt techniques do you already use? Which are helpful? What tips would you add to this list? Would love to crowdsource additional top prompting techniques you use regularly.

All opinions expressed are my own and not of my employer or any other affiliations.

--

--