The WWWH Framework for Highly Effective AI Prompts

The quality of the responses you get from AI chatbots is largely a function of the quality of your prompts. The Who-What-Why-How Framework is carefully designed to help you provide all the information the chatbot needs, and in the format it'll best comprehend:

Let's unpack it.

The Goal of AI Prompting

Think of AI chatbots as spheres containing information. To respond to your prompt, they can take any direction within that sphere across four dimensions.

The goal of prompting is to guide the AI to the location within the sphere of the most useful response.

By providing plenty of context, you point it in the right direction. By specifying constraints, you keep it from veering off course. The more abundant and specific your instruction, the closer the chatbot will land to your ideal outcome. That's why you want to provide the Who, What, Why, and How.

Not every rule applies to every prompt, but the more boxes you can check, the better the chatbot will serve your needs.

Holistic Strategies

First, let's cover a few general strategies that apply throughout your prompt.

Define your objective

Before you can guide the AI to your destination, it's important to articulate that destination for yourself. Consider your ideal output, then keep it in mind as you compose your prompt.

Example Outcomes

Instruct, don't ask.

I know it can feel like you're being rude, but because large language models essentially pick the most likely next word after your prompt, it's better to frame your prompt as instructions rather than questions.

Create sections with XML.

AIs will also understand your prompts better if you break them into labeled sections. The best way to do that is using the XML syntax:

It's especially important when providing material for the bot to reference, like the content it's correcting or examples to follow.

Now, let's get into the Who-Why-What-How.

Who — Assign roles.

For the who, you assign roles to the bot, yourself, and possibly the audience of the generated content.

The Bot's Role

The bot's role is most important. You should begin almost every prompt by assigning the bot a role. Be specific and include qualifiers for the context within the role.

Example Chatbot Roles

Your Role

In many cases, it's also helpful to give yourself a role. The chatbot is your assistant. Explain the context in which it's assisting you.

Example Roles for You

The Audience

If the chatbot's generated content is intended for an audience other than yourself, describe that audience.

Example Audiences

Why — Identify the objective.

The why is your ultimate objective.

The Problem

You can add helpful context by first explaining the problem you need to resolve. Why are you seeking support from the bot? Build on the role you assigned yourself.

Example Problems

Ideal Outcome

Share that ideal outcome you defined before beginning your prompt.

Example Outcomes

What — Specify the format.

Tell the bot what it will be generating in terms of its format and composition. Describe the look and feel of the response, like its length, layout, and tone.

Here, it's especially helpful to include examples. You can attach files or use that XML syntax.

Length Examples
Tone Examples
Layout Examples

How — Supply a method and resources.

Lastly, tell the bot how to approach your request. Prescribe it a method and supply resources for it to reference.

Step-by-Step

Chatbots will interpret your requests more accurately if you break them into a sequence of steps.

Sample Steps: Decision-Making
  1. Clearly state the decision to be made.
  2. List the options or choices available.
  3. Outline the criteria for evaluating each option (e.g., cost, time, benefits).
  4. Compare the options against the criteria using a table format.
  5. Select the best option and explain the reasoning behind the choice.
Sample Steps: Teaching
  1. State the topic or concept to be explained.
  2. Provide a high-level overview of the topic, using simple language.
  3. Break the topic into its core components or subtopics.
  4. Use analogies or relatable examples to clarify each component.
  5. Summarize the explanation in one or two sentences, ensuring clarity.

Search the Web

Depending on the nature of your prompt, you may need up-to-date information. Remember, the data that AI is trained on cuts off at a certain point in the past. But increasingly, the chatbots are gaining access to the live web. Sometimes they'll search automatically, but if you know you need it, it's helpful to request it explicitly in your prompt.

Referential Resources

Lastly, provide the resources you've asked your chatbot to reference. That could be the content it's analyzing or examples to inspire the composition of the output.

You can attach the resources or paste them within XML tags.

Follow-Up

After the bot's initial response, you'll almost always want to refine it through follow-up requests.

Self-Correction

If you ask the bot to review its response to identify and correct any mistakes on its own, in many cases, it'll make corrections.

Specified Corrections

Many times, you'll spot errors yourself or want to make a correction or qualification to your request.

Edit the Original Prompt

In some cases, it's better to edit the original prompt with your qualified instruction, then have the bot regenerate its response. That keeps the unwanted response out of the conversation history.

Put It All Together

To come up with example prompts that use this framework, I fed it to ChatGPT, Gemini, and Claude. Their responses were spot-on, so I've included one from each for your inspiration.

ChatGPT: Decision-Making Matrix

Who

You are a business consultant specializing in strategic decision-making for mid-level managers. I am a marketing manager evaluating which new software tool to adopt for automating our social media content scheduling. The output will be shared with my department to guide our decision.

Why

The problem is that we have three software options (Tool A, Tool B, Tool C), and I need to ensure we choose the one that best meets our needs within budget and time constraints. Your goal is to create a comparison table that evaluates each tool based on specific criteria.

What

Provide a table comparing the three tools with the following columns:

Write a 2–3 sentence summary at the end recommending the best option based on the data.

How

Follow these steps:

  1. Use a table format with all data points clearly filled in.
  2. Assume hypothetical but realistic data for any missing details.
  3. Summarize the key factors and explain your recommendation succinctly.

Gemini: Competitive Analysis

Who

You are a market research analyst with expertise in creating detailed competitive analyses. You are proficient in gathering and organizing data into easily understandable formats.

I am a business owner preparing to launch a new service. I need to understand my competitors strengths and weaknesses.

The audience is me and my team, in order to understand the competitive landscape.

Why

I need to quickly understand the competitive landscape for a specific service I'm launching, including key competitors, their strengths, and weaknesses.

You will create a comparison table that outlines key competitors in the specific market, evaluating their strengths, weaknesses, pricing, and key features. You will focus on a clear view of their overall positioning.

What

The response will be a table with the following columns: "Competitor Name," "Strengths," "Weaknesses," "Pricing Model," and "Key Features." There should be at least 3 listed competitors, and a summary in paragraph format after the table outlining any clear patterns or opportunities.

How
  1. Research leading competitors in my industry using web search.
  2. Gather and note each competitor’s key strengths, weaknesses, and value proposition.
  3. Organize the information into a table format.

Claude: Process Documentation

Who

You are a technical documentation specialist who excels at creating clear, actionable standard operating procedures (SOPs) that are easy to follow and implement.

I am an operations manager implementing a new customer onboarding process.

The audience is customer success team members who will be executing the onboarding process. They have varying levels of experience with our product.

Why

Our current onboarding process is inconsistent and lacks documentation, leading to varying customer experiences and longer time-to-value.

Create a detailed SOP document that standardizes our customer onboarding process.

What
How
  1. Outline the process phases
  2. Detail each step within phases
  3. Include screenshots or diagrams
  4. Add troubleshooting guides
  5. Create checklists for each phase
  6. Include success metrics

<Current Process>
[Insert current workflow details]
</Current Process>