Bonus resource for: AI for Communications & Marketing

Prompt & context engineering

  1. Why it is important
  2. Prompt engineering techniques
  3. Context engineering
  4. Other prompt-related advice
  5. The future of AI & prompt engineering

1. Introduction

If you’re working in the nonprofit sector, you know the daily struggle: Trying to achieve ambitious goals with very limited resources. 

Imagine having a tireless, creative, and knowledgeable team member available 24/7 to help. That’s the potential of AI, and this guide will show you how to unlock it through the power of prompt engineering.

AI tools like ChatGPT can help you a lot with your work, but you have to know how to “talk” to them to get the best results. It’s a new skill that most people don’t have yet. 

In many cases, people complaining about AI results are not using the tools correctly. Sending the right messages (prompts) can make a huge difference.

What Is Prompt Engineering?

Prompt engineering is the art of crafting precise instructions (“prompts”) for AI tools, so they can provide more useful and reliable results. 

It’s about learning how to ask for exactly what you need, so the AI understands you perfectly. 

If you give the AI vague and generic instructions, it will provide vague and generic results. 

Knowing how to ask is key to unlock the full potential of AI. Without the right prompts, AI will never deliver truly great results. 

Why Is It Important?

Prompt engineering can bring big advantages for nonprofits: 

How LLMs Work 

LLMs (Large Language Models) are the “brains” behind many AI tools, like ChatGPT, Google Gemini, Microsoft Copilot and others.

LLMs are trained on vast amounts of text (websites, books, scientific papers, etc.) to understand us and generate responses. But they don’t remember or think like humans do, they use statistics to predict the text that is most likely to come next (starting with your input) *.

What does this mean for you? It means the quality of the output depends on the quality of the input (your prompt). Writing good prompts isn’t just helpful, it’s essential.

ℹ️ Note

This is a complex and changing field (there are new models that include “reasoning” modes that try to emulate human thinking, some have been trained not only on text but also videos and other contents…), but the basic concepts are still the same. 

Key Components of a Good Prompt

A good prompt is like a well-written recipe. It has all the ingredients for success!

Not all tasks requires the same prompt ingredients, but this is a good general recipe:

Example:

Instead of using a vague prompt such as: “Give me good fundraising ideas”, try something more specific and actionable:

We are a small nonprofit focused on animal rescue in urban areas of the UK. Our target audience is young professionals that find us through social media (Instagram and Tiktok mainly). 

Suggest five creative fundraising event ideas that could be held in a city park, with a budget under $1,000. 

The tone should be fun and engaging, and the event should be appealing to people who may not already be familiar with our organization. Here are 3 good examples: 
[EXAMPLES]

For each idea, explain why it’s interesting for us, provide a checklist with the recommended steps to launch those events (free or low-cost options preferred) and mention possible risks (with ideas to minimize them)

By providing clear details, the AI will give you more focused and relevant responses.

Using Prompt Engineering to Reduce Risks

AI is powerful, but it’s not perfect and sometimes can make big mistakes. 

Nonprofits often deal with sensitive topics, diverse audiences, and complex issues. 

Prompt engineering can help you navigate these challenges and reduce risks such as bias, inappropriate tone, or unintentional harm.

Strategies to Reduce Risks:

Mitigate Bias: Be explicit about using inclusive language, avoiding stereotypes or assumptions, providing examples of diverse perspectives…

Ensure the language is inclusive of all genders, ethnicities, and socioeconomic backgrounds. Avoid making assumptions about family structures or cultural norms.

Set the Right Tone: Clearly define the tone you want to convey (e.g., warm, hopeful, professional..) and/or give examples written with that tone.

The tone should be optimistic, hopeful, and compassionate, emphasizing the positive impact this program will have on individuals and the community.

Avoid Sensitive Topics: Specify areas or language to steer clear of.

Avoid any political references, religious affiliations and potentially controversial language that could harm or alienate potential donors or volunteers. 

Ensure accuracy: AI can sometimes generate inaccurate or outdated information, which is commonly known as “hallucinations”. To mitigate this, you can use AI tools that can search for live data and link to sources  (eg. Perplexity or NotebookLM).

Protect Privacy: Avoid sharing sensitive data in the prompts and documents that you provide. Also, you can ask the AI to anonymize the results and not generate any PII (Personally Identifiable Information). 

Use prompts to simulate potential audience reactions: “How might a supporter (that is very sensitive about X topic) respond to this statement? Is there anything in this text that could generate a negative public reaction?”

Share “safer” prompts with your colleagues: Make it easier for everyone to use prompts that are less risky. Maybe even create an internal prompt library to compile your best prompts. 

Review and iterate: Always double-check the results coming from AI tools. If you don’t like something, suggest changes on the chat conversation or refine the original prompt to get your desired outcomes.

2. Prompt engineering techniques

In this chapter, we’ll explore advanced techniques to help you master the art of crafting effective prompts.

These techniques will empower you to guide AI tools with precision and unlock their full potential.

Experiment with different techniques. You may find that combining methods (like few-shot with iterative prompting) yields the best results for some tasks. 

Few-Shot Prompting

With few-shot prompting you give the AI a few examples (“shots”) to learn from. 

They could be “full examples” (copying all the text and telling the AI to give a similar output) or “partial examples” (mentioning specific phrases, concepts, styles or structures that you like). 

Sometimes just 1 or 2 examples is enough to get good results, but you might want to try adding more examples for important or frequent tasks. 

You can copy the text of the examples in the prompt or upload them as documents. 

It’s a powerful technique for guiding the AI towards a specific style or type of output.

It’s also sometimes faster to just copy a few existing examples than to write a big prompt trying to explain all the details of what you want. 

Benefits

Example

Here are three examples of successful social media posts from our previous galas: 

[Example1]:  

[Example2]: 

[Example3]: 

Now, write five new social media posts for this year's gala, maintaining a similar tone, style, and including a call to action to purchase tickets.

NOTE: If your organization has a style guide or brand guidelines document, you can use excerpts from it as examples to ensure the AI’s output aligns with your established voice and tone.

Chain-of-Thought Prompting

Chain-of-Thought (CoT) prompting is like encouraging the AI to “think out loud” and show its reasoning step-by-step.

Instead of just asking for the final answer, you instruct the AI to break down the problem into smaller steps and explain its reasoning for each step.

If you want specific results, you can try including the first steps of the reasoning process in your own prompt and ask the AI to continue (to guide it into a specific “reasoning path”, so it doesn’t get lost in other less-productive paths). 

You can also combine CoT with few-shot prompting (asking for reasoning steps and providing examples at the same time)

This technique is particularly useful for complex tasks that require logical reasoning or problem-solving.

Benefits

Example

Let's say you're evaluating the effectiveness of a recent volunteer recruitment campaign. Instead of simply asking, 'Was our volunteer recruitment campaign successful?', you could use CoT like this: 

Analyze the effectiveness of our recent volunteer recruitment campaign. 

First, identify the key performance indicators (KPIs) we should consider. 

Second, compare the actual results for each KPI to our initial goals. 

Third, based on this comparison, explain whether the campaign met, exceeded, or fell short of our expectations. 

Finally, suggest three specific improvements we could make for future recruitment campaigns.

ℹ️ Note

Most new AI models already have “reasoning” capabilities built in, so using CoT is now unnecessary for most tasks and may even worsen results in some cases. But you can still try it for important tasks, giving the specific reasoning steps that you want AI to follow might help sometimes.

Role-playing prompting

Role-playing prompting is about assigning the AI a specific persona or role to play.

It could be just a simple phrase included in a normal prompt, that helps us give the AI some additional context. Something like “You are an expert in social media campaigns for nonprofit organizations, specialized on giving ideas to get more followers”.  

But it also can be something more interactive and complex, where you create a whole personality for the AI and then have long conversations with that “AI person”. 

For example, there are many custom GPTs that have been trained to act as coaches, specialized consultants or even famous people. 

You can build the personality by providing detailed instructions (how it should behave), many examples (things that the AI person should know or say) or both. You can use text, documents and sometimes links to provide that info. 

Benefits

Examples

The Social Media Expert

You are a social media expert specializing in creating engaging content for nonprofits. You understand the nuances of different platforms and know how to craft messages that resonate with diverse audiences. Help me improve our social media strategies and posts to increase reach and engagement.

The Major Donor

You are a potential major donor who is passionate about animal welfare. You are considering making a significant contribution to our organization, but you have some questions and concerns. I will provide information about our programs, and you will respond as a potential donor, asking questions and expressing any reservations you might have.

Iterative Prompting

Iterative prompting is like having a conversation with the AI, where you refine your prompts and provide feedback to guide it towards the desired outcome.

You start with a normal prompt and then send other messages to refine the results (adjust instructions, add context, correct misunderstandings…)

The iterative process may start even earlier: You can tell the AI to give you feedback about your initial prompt and help you refine it. 

Iterative prompting can be used together with other prompting techniques (most prompts can be improved with a bit of testing and iterating). 

Benefits

Example

  1. Initial prompt: ‘Write an email asking for donations for our end-of-year campaign.’
  2. Iteration 1: ‘The email is good, but it’s too long. Make it shorter and more impactful, focusing on the urgency of the need.’
  3. Iteration 2: ‘The tone is a bit too formal. Can you make it more personal and heartfelt? Include a brief paragraph summarizing this donor testimonial: [COPY TESTIMONIAL] 
  4. Iteration 3: ‘That’s much better. Now, add a clear call to action with a link to our donation page, and suggest three different subject lines for the email.'”

ℹ️ Note

One of the great advantages of AI is having access to dozens of ideas in seconds. So if you want to go faster, you might ask on each prompt for multiple variants/ideas (so you have several options to choose and iterate from, instead of only one). Something like “Write 5 versions of this post, with very different content and writing styles”. 

Prompting for AI Image and Video Generators

There are now many great AI image generators (Dall-E, Midjourney, Flux…) and AI video is getting big too (Runway, Kling, Luma…). 

They allow you to create stunning visuals from simple text descriptions, empowering you to enhance your website and communications, create more engaging content, design beautiful merchandise, etc.

You can generate in seconds and for free (or almost) visual content that used to require big investments and several weeks of work. 

Some of the general prompting recommendations are also applicable for image and video generators, but there are also some specific tips:

Example

Generate an image for a social media post to recruit volunteers for our community garden. 

The image should show a group of diverse volunteers of different ages working together in a lush, green garden, with bright sunlight and a clear blue sky. They should be smiling and enjoying themselves. 

Oil painting style, not photorealistic. 

Include the text "Join our Community Garden" in a stylish serif font.

3. Context engineering

Context engineering is a new concept that is very related with prompt engineering, but it’s becoming so important that it deserves it’s own section.

It’s basically about which “additional information” are we giving to AI for each task. It’s not the instructions that we give in the prompt, but all the other data that it will consider while following those instructions. It could be:

From a more strategic standpoint, context engineering could be defined as the systematic process of capturing and organizing your organization’s knowledge so AI can understand your specific situation and deliver relevant results.

Why context is important

By default, AI tools don’t know anything about your organization, needs, etc. Without your specific context, they’ll give you generic advice that doesn’t fit your mission, audience, or constraints. Context engineering ensures AI understands your unique situation.

So you need to give AI your specific context. But there is a catch: You should think about which context you give AI for each specific task, you can’t just upload dozens of files and expect the AI tool to figure it out.

There are several reasons why we have to carefully select the context and not just feed them a lot of random files or data:

Create and share your Context Templates

So we know that we can’t just give a lot of random info to AI and expect awesome results. But at the same time, if we have to create the relevant context from scratch every time we want to ask AI something, it would be a very time consuming. We need a more efficient solutions.

The best solution is to create several context templates that we can reuse for different tasks. These templates could be files or even databases, but it’s usually better if they are simple blocks of text (they are easier to copy in any tool, edit quickly, reorder, etc.)

Think of it as creating a “knowledge profile” of your organization that you can reuse across all AI interactions.

It’s not about using exactly the same templates for every AI task, but having a good starting point and then select which blocks are relevant for your current task, maybe edit them a little bit for this particular project, etc.

Sharing the same context templates with your colleagues helps your organization save a lot of time and also improve results:

Step 1: Prepare general context

Create a “general context template” with the key elements that define your organization, such as:

ORGANIZATION PROFILE:
- Mission: [Your mission statement]
- Primary programs: [List 3-5 key programs]
- Target beneficiaries: [Who you serve, with specific demographics]
- Geographic focus: [Local, regional, national, international]
- Annual budget range: [This affects all recommendations]
- Staff size: [Affects capacity for implementation]

AUDIENCE PERSONAS:
- Primary donors: [Age, income, interests, values, communication preferences]
- Volunteers: [Demographics, motivations, availability, skills]
- Beneficiaries: [Detailed description including challenges, needs, preferences]
- Community partners: [Other organizations, government agencies, businesses]

VOICE AND VALUES:
- Brand personality: [Professional but warm, grassroots and passionate, etc.]
- Key messages: [3-5 core messages you always want to communicate]
- Words/phrases we use: [Your organization's preferred terminology]
- Words/phrases we avoid: [Language that doesn't fit your brand]
- Tone guidelines: [How formal, emotional, urgent, hopeful, etc.]

CONSTRAINTS AND RESOURCES:
- Budget limitations: [What you can/cannot spend on various activities]
- Staff capacity: [What you can realistically implement]
- Compliance requirements: [Legal, regulatory, or funder requirements]
- Technology limitations: [What tools/platforms you can use]

Step 2: Prepare specific context

For each major campaign or project, compile key information:

PROJECT CONTEXT:
- Project goal: [Specific, measurable outcome]
- Timeline: [Start date, key milestones, deadline]
- Budget: [Available resources for this project]
- Target audience: [Specific subset of your audiences]
- Success metrics: [How you'll measure impact]
- Past similar campaigns: [What worked, what didn't, lessons learned]

Step 3: Use those context templates in your prompts

Reuse those templates (removing the parts that are not relevant) to get personalized responses in seconds:

CONTEXT: [Paste relevant context blocks]

TASK: [Your specific request]

This approach ensures every AI interaction is grounded in your organization’s reality, leading to much more relevant and useful results.

4. Other prompt-related advice

Configure system prompts

Some AI tools, like ChatGPT, allow for the use of system prompts, custom instructions and/or other advanced settings to guide AI behavior. They let you provide the basic instructions for all your interactions with the AI.

They are great to set the rules and context that you want to use always, without having to write them in each conversation. So they can save you a lot of time and improve the consistency and quality of the responses you get. 

You could use them to set things like:

If everybody in your organization uses the same system prompt (or very similar), you will achieve more consistent results. It would also make it easier to maintain the same style for all your external communications, internal documentation, etc. 

Example

You could include things like this in your custom instructions:

CONTEXT:
I work for a nonprofit organization. Our context is [mission/values/goals/budget/etc.]. 
Take this into account for every message that I send related to work, nonprofits or business tools.

TONE:
- Use inclusive language for all genders, ethnicities, and socioeconomic backgrounds
- Avoid political references and religious affiliations unless directly relevant
- Be professional, but avoid using a corporate or boring tone. Avoid long paragraphs and jargon. 

REQUIREMENTS:
- If are not sure of the correct answer to a question or it's beyond your knowledge cutoff date, say “I don't know” and explain ways to get a reliable answer.
- Always ask for clarification if my request could have multiple interpretations
- Provide multiple perspectives, ideas or solutions when possible. Not just one.
- Prioritize ideas that can be implemented with minimal resources and risk.

OUTPUT:
- Cite credible sources or references to support your answers, with links if available.
- Use the metric system for measurements and calculations.
- Never mention that you're an AI.

Use the right tool & prompt for each task

Building good prompts is important, but a great prompt for a certain task and tool could be awful for a different use case. 

You should do some tests with your own prompts and different models/tools (each task is different and AI tools change very frequently), but here are a few basic recommendations: 

Try changing advanced parameters

⚠️ Warning

This is a recommendation for “advanced users” with very specific needs. Results may become unpredictable or even unusable when you change the default parameters. Most people don’t really need to experiment with this.

Some AI platforms allow you to adjust advanced parameters that control the AI’s output (randomness, creativity, length…). 

They are usually available via APIs (for developers) and not on normal user interfaces (eg. ChatGPT). But “normal users” can sometimes use them through web tools like OpenAI Playground or Google AI Studio.

The same prompt can deliver very different results with different parameters. So it’s another way to optimize the results of your prompts (even without changing them). 

The available parameters are not the same on all platforms, so it’s better to check the documentation of the platform that you are going to use. But here are 3 of the most common and useful parameters: 

5. The future of AI & prompt engineering

AI tools are changing and improving at an astonishing pace, so it’s very difficult to predict their future. But it’s pretty clear that 2 important things will happen sooner or later:

Regarding prompt engineering, this will probably mean 2 things:

“Mistakes” with AI agents are more costly than with AI chatbots like ChatGPT, because AI agents are more expensive & slow to run, and they can have access to external services. 

If ChatGPT generates a bad output, we ignore or correct it and that’s the end of the problem. If AI agents spend hours doing the wrong tasks, we will be paying a lot for bad results and we can even risk our reputation or money (if the agent publishes or buys something that is not what we wanted).

So prompt engineering will still be very important in the future, even if not all current prompting techniques survive. Ongoing learning and testing will be key to get the best results from new AI tools.  

Even as AI becomes more sophisticated, the fundamental principle remains: clear, contextual communication with AI systems will always produce better results. The tools may change, but the need to provide good instructions and relevant context will persist.

The organizations that start building these skills now will have a significant advantage as AI capabilities expand.

Want this as part of a complete, step-by-step course? See our AI courses for nonprofits.