The Elusive Art of Prompt Writing
Crafting High-Quality Prompts: A Comprehensive Guide
The quality of your prompts determines the success of your interactions with AI systems. Whether you're a product manager leveraging AI for ideation or a developer using it to build tools, writing effective prompts is both an art and a science. This guide will walk you through the principles of crafting high-quality prompts, with real-world examples and actionable tips to ensure you achieve the results you need.
I’ve been training PMs on how to leverage Generative AI for about a year now. These sessions are usually highly practical and hands-on, and one very important part of these sessions is making LLMs do your bidding through prompts. I was writing a prompt as part of a practical session (yes, entirely live action) a couple weeks ago when one of the PMs in the room said:
“You see that prompt you just typed - I would never have thought of that, it’s like you are using a very specific language.”
I’ve never actively thought of how exactly I write prompts until then - I just know that when I write a prompt, it works. I’ve since thought quite a bit and deconstructed how I write prompts, what works for me, what doesn’t, and what makes a high quality prompt.
Why Do Prompts Matter?
Prompts are the bridge between your goals and the LLM’s output. They guide the model to produce actionable, relevant, and high-quality responses. A well-crafted prompt provides context, defines the objective, and sets clear boundaries, ensuring that the LLM understands and delivers precisely what is needed.
Success vs. Failure: Real-World Examples
Example of Failure:
Prompt: "write some good google adwords for getting more users on my Etsy page"
Outcome:
Headline 1: Unique Handmade Treasures
Headline 2: Shop Artisan Creations Today!
Description: Discover one-of-a-kind, handcrafted items perfect for gifts or your home. Support small businesses and shop now!
If you’ve ever bid on a keyword, you know the output above is going to be expensive and drive very little traffic home.
Example of Success:
Prompt:I have a store on Etsy that sells handmade artisnal gifts targeted at friends and family. The collection includes personalised cards and video messages, where one can record a custom message on a painted hand made card. I have a small advertising budget and want to optimise for rare but high converting keywords. I want to get to a cpc on $0.55. Design the output Ad Copy.
Format:
Headline 1:
Headline 2:
Description:
Outcome:
Headline 1: Record Your Message on a Card
Headline 2: Unique Handmade Gifts for Loved Ones
Description: Shop custom-painted cards with video messages. Thoughtful gifts for friends and family. Personalize yours today!
The contrast illustrates the importance of specificity, structure, and context in prompt design.
Principles of Writing High-Quality Prompts
1. Start with Context
Context provides the AI with the background it needs to generate relevant responses. This includes the problem you’re addressing, the audience, and any constraints.
Example:
Context: "You are designing a go-to-market strategy for a subscription-based fitness app that integrates with wearable devices and targets millennials."
2. Define Clear Objectives
Clearly articulate the outcome you expect. This prevents ambiguity and ensures the AI focuses on delivering actionable results.
Example:
Objective: "Provide a go-to-market plan with three key activities, target audience details, and success metrics."
3. Use Examples to Guide Outputs
Examples clarify expectations and inspire relevant responses. By showcasing similar outputs, you help the AI better understand your goals.
Example:
"Example 1: A marketing plan for a mindfulness app using Instagram ads and influencer partnerships."
"Example 2: A roadmap for launching a direct-to-consumer e-commerce platform."
4. Include Dos and Don’ts
Highlight what to include and avoid to refine the AI’s focus.
Do:
"Include measurable success metrics."
"Align activities with millennial preferences."
Don’t:
"Avoid generic advice like 'use social media.'"
5. Set Word Count Limits
Word limits ensure responses are concise and focused while maintaining depth. Specify a range that suits the task.
Example:
"Limit the response to 200-300 words."
6. Tailor the Audience
Clearly define who the output is for. This helps align tone, depth, and content with the intended users.
Example:
Audience: "Product managers and marketing teams planning a product launch."
7. Specify the Format
Formatting ensures usability. Request tables, bullet points, prose, or other structures depending on your needs.
Example:
"Provide the output in the following format:
Target Audience: [Description]
Key Activities: [List]
Success Metrics: [List]"
Common Prompt Mistakes to Avoid
1. Being Too Vague
Bad Prompt: "Write about AI."
Why It Fails: Lacks direction, leading to generic responses that fail to address specific needs or objectives. Without additional context, the AI has no guidance on what to focus on, resulting in overly broad outputs that lack actionable insights.
How to Fix It: Add specific details about the topic, audience, and purpose of the response. For example:
Improved Prompt: "Write a 200-word article explaining how AI is transforming customer support, including examples of chatbots and sentiment analysis."
2. Overloading the Prompt
Bad Prompt: "Write a product roadmap, including financial projections, competitor analysis, and technical implementation details."
Why It Fails: Overly complex prompts confuse the AI and lead to scattered or incomplete outputs. By cramming multiple tasks into one prompt, you dilute the AI's focus, making it harder to produce coherent results.
How to Fix It: Break the task into smaller, focused prompts. For example:
Improved Prompts:
"Draft a 6-month product roadmap for a mobile app, including key milestones and features."
"Provide a financial projection template for the app's first year."
"Analyze three competitors for the app, comparing their features and pricing."
3. Skipping Context
Bad Prompt: "Analyze customer feedback."
Why It Fails: Without context, the LLM doesn’t know which themes to focus on or what actionable insights to extract. This often results in generic or irrelevant observations.
How to Fix It: Provide context about the feedback's source, goals, and desired outcomes. For example:
Improved Prompt: "Analyze customer feedback from a survey about our mobile app's new budgeting feature. Identify recurring themes in user comments and suggest three improvements to enhance the user experience."
Iterative Improvements
Prompts are not static; they are dynamic tools that can evolve to refine and improve outputs. Iteration enables you to progressively enhance the quality of the AI's response by incorporating feedback and adjusting the parameters. Here's how you can approach iterative improvement:
1. Refine the Prompt
After receiving an initial response, evaluate the output to identify areas that need improvement. Adjust the following elements to refine the prompt:
Context: Add missing details or clarify ambiguous instructions to ensure the AI understands the task.
Objectives: Narrow or expand the scope to align the response with your expectations.
Format: Specify a different structure if the initial format isn’t optimal.
Example:
Initial Prompt: “Write a product roadmap for a fitness app.”
Refined Prompt: “Draft a 6-month product roadmap for a fitness app targeting millennials. Include milestones, features, and success metrics in a table format.”
2. Request Clarifications
If certain sections of the output are unclear or incomplete, ask the AI to elaborate or provide more detail. Use targeted follow-up questions to address specific gaps in the response.
Example:
Initial Output: “The roadmap includes feature A and feature B.”
Clarification Request: “Explain how feature A will address user pain points and provide an example of its implementation.”
3. Combine Outputs
For complex tasks, use multiple iterations to gather comprehensive results. Generate different sections of the task in separate prompts, then integrate them into a cohesive final output.
Example:
Prompt 1: “List key milestones for a 6-month fitness app roadmap.”
Prompt 2: “Define success metrics for each milestone in the roadmap.”
Combined Output: Merge milestones and metrics into a detailed roadmap document.
4. Experiment with Variations
Test different phrasings or frameworks to explore alternative perspectives or solutions. This is particularly useful for creative or open-ended tasks.
Example:
Variation 1: “Provide a roadmap emphasizing user engagement strategies.”
Variation 2: “Focus on technical improvements in the roadmap.”
5. Use Feedback to Iterate
Leverage feedback from team members, stakeholders, or your own critical review to refine the prompt further. This ensures the output meets the needs of all intended audiences.
Example Workflow:
Step 1: Generate an initial draft of a go-to-market strategy.
Step 2: Analyse the draft and share feedback with the LLM (yup, this works!).
Step 3: Refine the prompt to address their input, such as emphasizing specific marketing channels or metrics.
High-quality prompts are essential for unlocking the full potential of LLM systems. By providing clear context, objectives, examples, and guidelines, you ensure precise and actionable outputs. Whether you’re crafting a product roadmap, analyzing competitors, or brainstorming new features, mastering the art of prompt design will save time, improve results, and drive success in your projects.
If you’ve stuck around for so long, consider subscribing for more of this!
Universal Prompt Template
Here’s a reusable structure for creating high-quality prompts:
1. Context
Provide background on the task or problem.
Include relevant details like audience, constraints, or goals.
2. Objective
Clearly state what you want the LLM to produce.
3. Examples
Provide real-world or hypothetical examples to guide the output.
4. Do
Highlight essential elements the response should include.
5. Don’t
Specify what to avoid to reduce irrelevant or unhelpful outputs.
6. Word Count
Set a range to ensure concise and relevant responses.
7. Audience
Define who will use or review the output.
8. Format
Specify the desired structure (e.g., tables, bullet points, prose).
Example Prompt Using the Template (Add much more detail than in this illustration):
Context: You are creating a product requirements document (PRD) for a mobile app that tracks fitness goals and integrates with wearables.
Objective: Draft a PRD with key features, success metrics, and milestones.
Examples:
Example 1: "A PRD for a task management app with calendar integration."
Example 2: "A PRD for an e-commerce platform with personalized recommendations."
Do: Include a detailed timeline and feature list
Don’t: Avoid technical implementation details.
Word Count: 500-700 words.
Audience: Engineers, designers, and product managers.
Format:
Overview: Brief project description.
Requirements: Table of functional and non-functional requirements.
Metrics: Success criteria for each feature.
Super helpful, thank you!