Get regular updates on AI strategies that work »

Prompt Engineering: Example Frameworks

I’ve written before about prompting here noting that while prompting is important, you shouldn’t overthink it.

I want to always emphasise that when it comes to using AI, experimentation and learning by doing are key.

That said, structured prompts can be very useful, and I came across some interesting examples recently. So today, I want to dive deeper into the craft of prompt engineering.

It’s all about writing very clear instructions to guide the AI.

Why Prompt Engineering Matters

Getting your prompts right can make a big difference. A well-crafted prompt can:

  • Make your request crystal clear
  • Provide context for more relevant answers
  • Guide the AI’s behaviour

Example Frameworks and When to Use Them

1. R-T-F (Role – Task – Format)

R-T-F is particularly useful when you need the AI to adopt a specific perspective or expertise. It helps generate outputs that require specialised knowledge or a particular point of view.

Example: “As a michelin-starred chef (Role), create a vegan menu for a high-end restaurant (Task). Present it as a beautifully formatted tasting menu with wine pairings (Format).” This prompt could help a home cook plan an impressive dinner party without formal culinary training.

2. T-A-G (Task – Action – Goal)

T-A-G excels in breaking down complex problems into manageable steps. It’s ideal when you have a clear objective but are unsure how to achieve it.

Example: “Reduce our company’s carbon footprint (Task) by auditing our current practices and suggesting green alternatives (Action). We want to achieve carbon neutrality within two years (Goal).” This could help an overwhelmed sustainability officer break down a daunting objective into actionable steps.

3. B-A-B (Before – After – Bridge)

B-A-B is excellent for transformation scenarios. It helps articulate the current situation, envision the desired outcome, and generate a plan to get there.

Example: “Our small bookshop is struggling to compete with online retailers (Before). We want to become a beloved community hub that’s financially stable (After). Create a plan to transform our space and business model to achieve this (Bridge).” This could help a local business owner reimagine their enterprise for the digital age.

4. C-A-R-E (Context – Action – Result – Example)

C-A-R-E is comprehensive and works well for complex, nuanced situations. It provides full context and guides the AI to produce well-informed, relevant outputs.

Example: “Our diverse, multigenerational workforce is struggling with communication (Context). Develop a training program (Action) to improve cross-generational understanding and collaboration (Result). Consider successful programs like Procter & Gamble’s reverse mentoring initiative (Example).” This could help an HR manager create a tailored solution for a unique workplace challenge.

5. A-P-E (Action – Purpose – Expectation)

A-P-E is great for focused, specific tasks. It’s particularly useful when you need a precise output and want to ensure the AI stays on track.

Example: “Write a press release (Action) to announce our company’s new AI ethics board (Purpose). It should be one page long, emphasise our commitment to responsible AI development, and include a quote from our CEO (Expectation).” This could help a PR professional quickly draft a sensitive announcement with all the crucial elements included.

6. G-O-A-L (Goal – Output – Additional Context – Look at the Output)

G-O-A-L is a simple but comprehensive framework that guides you through the entire process of crafting and refining prompts. It’s particularly useful for complex queries or when you need highly specific results.

Example: “Create a comprehensive marketing strategy for a new eco-friendly product line (Goal). Present the strategy as a detailed report with sections for target audience, messaging, channels, and budget (Output). Our company is a mid-sized personal care brand entering the sustainable market for the first time. Our main competitors are established eco-brands with loyal customers (Additional Context).”

After receiving the output, you would then review it for accuracy, clarity, and completeness, refining as needed (Look at the Output).

This framework could help a marketing team develop a well-rounded strategy while ensuring all crucial elements are addressed.

Apart from the GOAL framework, which I developed here at AIpowered for use in our training workshops, the above prompts were sourced from Reddit. If you know the original source, please send me a message and I’ll be delighted to attribute them to source.

How to Create Effective Prompts

  1. Be clear: Avoid ambiguity. Define your task and expected outcome precisely.
  2. Give context: This helps the AI understand the background and give more accurate responses.
  3. Refine your approach: Try different prompts and adjust based on the results.
  4. Find the right balance: Make sure your prompts aren’t too simple or too complex.

Mistakes to Watch Out For

  1. Being vague: Unclear prompts can lead to irrelevant answers. Be specific in your instructions.
  2. Information overload: Too much info can confuse the AI. Keep it concise.
  3. Forgetting context: Without background, the AI might misunderstand the task. Always provide necessary information.
  4. Not iterating: Your first prompt might not be perfect. Keep testing and improving for better results.

Getting good at prompt engineering is key to making the most of AI language models. By using frameworks like GOAL, RTF and TAG, you can create clear, contextual, and effective prompts. Remember to keep refining your approach, provide context, and avoid common pitfalls. This will help you get more accurate and useful responses from AI. If you need help, reach out.

Get regular updates on AI strategies that work.

You're almost there!

I turn AI tech & strategy into clear, actionable insights. You’ll discover how to leverage AI, how to integrate it strategically to get a competitive edge, automate tedious tasks, and improve business decision-making.

– Alastair.