Prompt Engineering Simplified

Better inputs to popular AI chatbots (ChatGPT, Claude, Perplexity, Google Gemini, Microsoft Copilot, and so forth) invariably get better results. I usually train people to use CAFE: context, action, format, examples. I have seen another popular acronym, RACEF: role, action, context, examples, format. So what really matters?

WARNING: Wonky post ahead. TLDR: Include a lot of detail, separated into sections.

Some of it comes down to testing and experimentation. Nevertheless, the chatbot large language models (LLMs) all seem recently to have engineered their AI models to respond better to greater specificity. Thus, the prompt “Make an agenda for an upcoming board meeting using my notes below” does not work nearly as well as the following: “You are an expert facilitator with 30 years of experience in nonprofit board governance. Write an agenda based on my notes below for a 60-minute board meeting of a classical music nonprofit that balances inspiration, regular business requiring votes, discussion, new business, and strategic decision-making. Use the attached example board agendas. Format the output as section headers and bullet points.”

But what if you have a more complex project? Here are some guidelines:

Make sure you clearly specify sections of your prompt.

The chatbots tend to perform better if you tell them how to look at your instructions. You can accomplish this goal one of two ways:

  1. Use HTML tags to separate the instructions. This simply means putting the start between carats and the end between carats and a slash, such as the following:

    <role> You are an expert on nonprofit board governance. </role> <action> Write an agenda based on my notes below for a 60-minute board meeting of a classical music nonprofit. </action>

  2. Use hashes to separate the instructions. This approach would look more like the following.

    ##ROLE

    You are an expert on nonprofit board governance.

    ##ACTION

    Write an agenda based on my notes below for a 60-minute board meeting of a classical music nonprofit.

Include as many examples as possible.

Lately, the AI chatbots have responded positively to ingesting large amounts of data. Want an annual report? Include your past annual reports. Want the writing to sound like you? Include lots of examples of your past writing that matches the tone you want in the new writing, and specify, “Match the tone to the attached writing samples.”

You can also use examples of the kind of analysis you want. A consultant with whom I work recently said that she added entire strategy books from the great strategy thinkers (Michael Porter, Gary Hamel, C.K. Prahalad, Peter Drucker, Henry Mintzberg, Clayton Christensen). She then prompted the chatbot to act as a business strategist with all of the knowledge from the attached writing. I haven’t tried this approach, but supposedly it worked shockingly well. Can you smell the end of consulting as we know it?

Use the AI chatbots themselves to help improve your prompt.

Tell your favorite chatbot what you’re trying to do with the AI, and have it craft the best prompt! I often find I need to tweak the output, but it can provide a great starting point. If you want the kind of section dividers I suggest above, make sure to ask for them in your “get a prompt prompt.”

Expand your instructions to include more sections.

I poked around and used my own experience to add to the CAFE or RACEF formats. You’ll need to experiment on your own to see what works best, but here’s a summary of some of the best types of prompt instructions. After each one is a specific prompt you can copy and paste, filling in the part in brackets.

1. Role Assignment & Specialization

Assign a highly specialized role with specific expertise relevant to the task. Be precise about the AI's identity, background, and capabilities.

You are a [specific expert role] with [X years] experience in [domain]. Your expertise includes [key areas].

2. Action Statement with Clear Deliverables

Define the concrete action required and specify exactly what deliverables are expected.

Your task is to [specific action with outputs and deliverables].

3. Context Foundation (Task + Tone)

Establish both the situational context and the appropriate tone/style for the response.

[Provide background on why this task matters.] Your tone should be [specify the tone].

4. Constraints & Scenario Details

Give all relevant constraints, limitations, scenario details, and operating parameters.

Make sure that you [rules, restrictions, requirements]. Consider in your output [special circumstances].

NOTE: Apparently, the chatbots do better was positive language (i.e. “Do this”) than with negative language (i.e., “Do not do this).

5. Background Data

Provide all relevant documents, data, research, or reference materials needed for informed responses.

Use the [documents, data, research] [action, such as “to craft your response” or “as the basis of your analysis”].

6. Output Structure & Standards

Specify the exact structure, quality standards, and formatting requirements for the response.

[Define headers and sections]. [Insert quality criteria, if any]. Structure the output into [structural format, if any].

7. Format & Length Guidelines

Provide precise formatting instructions and length.

Output the results as [word count, format type (bullets, prose, tables), any special formatting needs].

NOTES: You can restucture later as a follow-up prompt, and you can specify outputs like HTML, JSON, python script, or other computing formats. These outputs can be useful if you’re using the results in another program. You can also specify brand standards, such as a specific hex color if you want a design.

8. Illustrative Examples

Include 2-3 high-quality examples that demonstrate the desired output style and quality.

Use the [following/attached] examples to [how the AI should follow the examples].

9. Avoidance Parameters

Explicitly outline what should NOT be included or what approaches to avoid.

Do NOT [list of unwanted elements, styles, or content].

NOTE: As mentioned above, you may be better off trying to state these positively rather than negatively. Also, the all-caps “NOT” is purposeful. Some users have commented that all caps works for the AI models as emphasis.

10. Reasoning & Process Requirements

Request step-by-step thinking, justification for decisions, and transparent reasoning.

Think step by step. OR Explain your reasoning for key decisions. [Other ways you want the AI to think.]

11. Alternative Approaches & Comparisons

When relevant, ask for multiple approaches or comparative analysis of options.

Provide 2-3 alternative approaches. OR Compare the pros/cons of different methods. [Other approaches.]

12. Follow-up Instructions & Iteration Framework

State explicit instructions for clarification, revision, or next steps in the conversation.

Ask for any clarification needed before continuing the analysis. OR Ask the user for examples before completing the final step.

Next
Next

“Don’t Panic”: Hitchhiker’s Guide to AI Policy