UPE03 - Creating Structured Prompts to Share with Your Team
In this learning unit, we explore how to write structured prompts that are easy to read, maintain, and share with your teammates.
🚀 Learning Objectives
Examine sample structured prompts and understand the benefits they provide for guiding AI assistants to deliver tailored outputs.
Discover the COSTAR prompt structure, a proven framework used by award-winning AI.
Discover role-based prompt formulation.
See how structured prompts help teams maintain a neat library of prompts, and understand the importance of building and managing a prompt library.
Writing Structured Prompts with Delimiters
Some people write prompts like writing code. Here's an example.
-- Prompt Starts ---
### Task Description ###
You are tasked with writing a product description for a new line of organic
skincare products. Your description should highlight key benefits,
ingredients, and unique selling points to attract potential customers.
### Product Line ###
[Insert product line here]
### Required Sections ###
Please include the following sections in your product description:
1. Introduction: Provide an enticing introduction to capture the reader's attention.
2. Key Benefits: List and describe the main benefits and advantages of using the skincare products.
3. Ingredients: Provide detailed information about the key ingredients and their benefits.
4. Unique Selling Points: Highlight what makes these products stand out from competitors.
5. Conclusion: Conclude with a compelling call-to-action encouraging readers to try the products.
### Formatting Instructions ###
- Use bullet points or numbered lists for easy readability.
- Ensure proper grammar, punctuation, and spelling throughout the description.
- Keep the tone engaging and persuasive to appeal to potential customers.
--- Prompt Ends ---
Why?
Segment the Prompt: divide the prompt into distinct sections. This segmentation helps the model understand the different components of the task better.
Specify Input Fields: define fields or placeholders within the prompt where specific information or variables should be inserted by prompt user.
Reusability: By using a consistent format for your prompts, you can more easily reuse or share the prompt, or adapt them for different scenarios.
COSTAR Prompt Structure
COSTAR stands for:
(C) Context
Establishing the background information is crucial for AI to understand the specific scenario being discussed.
(O) Objective
Clearly defining the task or goal you want AI to perform helps it focus its response on meeting that specific requirement.
(S) Style
Specifying the desired writing style guides AI to respond in a manner and choice of words aligned with your needs.
(T) Tone
Setting the intended attitude or emotional context of the response ensures AI's output resonates with the required sentiment.
(A) Audience
Identifying the intended audience for the response allows AI to tailor its output to be appropriate and understandable in the given context.
(R) Response
Providing the desired response format ensures the language model outputs the information in a format that can be easily used for downstream tasks or manipulations.
This is the author's example (not mine!)
# CONTEXT #
I want to advertise my company’s new product. My company’s name is Alpha and the product is called Beta, which is a new ultra-fast hairdryer.
# OBJECTIVE #
Create a Facebook post for me, which aims to get people to click on the product link to purchase it.
# STYLE #
Follow the writing style of successful companies that advertise similar products, such as Dyson.
# TONE #
Persuasive
# AUDIENCE #
My company’s audience profile on Facebook is typically the older generation. Tailor your post to target what this audience typically looks out for in hair products.
# RESPONSE #
The Facebook post, kept concise yet impactful.
While the COSTAR framework provides a solid foundation for structuring prompts for writing assistant, there are other alternative structures that may better suit your team's needs.
The following structure is a well-established in prompt engineering community (though the origin is unknown). It is designed to fit scenarios where you want the AI to play a specific role, such as a customer service representative, subject matter expert, or creative writer, and provide detailed guidance to ensure the AI's output aligns with your unique requirements.
Here's the prompt structure:
Role: Establish the persona or identity the AI should adopt when generating the response.
Context: Provide background information about the situation, scenario, or business need you're addressing.
Instructions: Clearly define the task, objective, or actions you want the AI to perform.
Format: Specify the desired output format, such as a report, email, or bullet-point list.
Examples: Include sample text or outputs that illustrate the expected quality and style.
Constraints: Outline any limitations or guidelines the AI should follow, such as avoiding sensitive topics or maintaining a professional tone.
Example:
Role: You are a Marketing Specialist at XYZ Company, tasked with creating a product launch plan.
Context: XYZ Company is preparing to launch a new eco-friendly cleaning product line. The launch is scheduled for next month, and we need to ensure that the product is introduced effectively to our target market. The product line includes an all-purpose cleaner, glass cleaner, and bathroom cleaner, all of which are designed to be environmentally friendly and highly effective.
Instructions: Prepare a comprehensive product launch plan that covers the following:
- Marketing Strategy: Outline strategies for promoting the new product line, including digital marketing, social media campaigns, and influencer partnerships.
- Sales Channels: Identify and describe the sales channels where the products will be available, such as online stores, retail partners, and direct-to-consumer sales.
- Target Audience: Define the target audience for the product line and explain how the marketing plan will address their needs and preferences.
- Launch Timeline: Create a timeline for key milestones leading up to the product launch, including pre-launch promotions, the official launch date, and post-launch follow-up.
- Key Performance Indicators (KPIs): Specify the KPIs that will be used to measure the success of the product launch, such as sales targets, website traffic, and social media engagement.
Format: Provide the launch plan in a clear, easy-to-follow bullet-point format or structured report.
Examples: [Include sample product launch plans or marketing strategies from previous launches]
Constraints: Keep the tone professional and engaging, avoiding overly technical jargon. Ensure all strategies are feasible and aligned with company goals.
Response I got from ChatGPT-Eng
Product Launch Plan for XYZ Company's Eco-Friendly Cleaning Product Line
1. Marketing Strategy
Digital Marketing:
SEO Optimization: Enhance website content with targeted keywords related to eco-friendly cleaning products to improve search engine rankings.
Email Marketing: Send out newsletters and promotional emails to our subscriber list, highlighting the benefits and features of the new product line.
Content Marketing: Publish blog posts, how-to guides, and videos on our website and social media platforms that demonstrate the effectiveness and eco-friendliness of our products.
Social Media Campaigns:
Teaser Campaign: Start a teaser campaign two weeks before the launch to build anticipation, using hashtags like #EcoCleanXYZ and #GreenCleaning.
Product Demos: Post videos and images showcasing the product in use, highlighting its effectiveness and environmental benefits.
User-Generated Content: Encourage customers to share their own experiences with the products by hosting a contest or giveaway.
Influencer Partnerships:
Identify Eco-Influencers: Partner with influencers in the eco-friendly and sustainable living niche to review and promote the products.
Sponsored Posts: Collaborate with influencers for sponsored posts and stories on platforms like Instagram, TikTok, and YouTube.
Affiliate Programs: Set up an affiliate program to incentivize influencers to drive sales through their unique referral links.
2. Sales Channels
Online Stores:
Company Website: Ensure the products are prominently featured on the homepage and in the eco-friendly products section.
E-commerce Platforms: List the products on popular e-commerce sites like Amazon, Etsy, and eco-friendly specific platforms like EarthHero.
Retail Partners:
Green Retailers: Partner with stores known for carrying eco-friendly products, such as Whole Foods, Trader Joe's, and local organic shops.
Supermarkets: Negotiate shelf space in major supermarket chains, emphasizing the growing demand for sustainable products.
Direct-to-Consumer Sales:
Pop-Up Shops: Organize pop-up shops in high-traffic areas to give potential customers a chance to experience the products firsthand.
Farmers Markets: Set up stalls at local farmers markets to reach environmentally conscious consumers.
3. Target Audience
Demographics:
Age: 25-45 years old
Gender: Primarily female, but inclusive of all genders
Income Level: Middle to high income
Location: Urban and suburban areas with a focus on environmentally conscious communities
Psychographics:
Values: Sustainability, health, and wellness
Lifestyle: Busy professionals and families looking for effective, eco-friendly cleaning solutions
Shopping Behavior: Preference for high-quality, sustainable products even at a premium price
Addressing Needs and Preferences:
Educational Content: Provide information on the environmental impact and health benefits of using eco-friendly cleaning products.
Convenience: Highlight the ease of use and effectiveness of the products.
Transparency: Emphasize the natural ingredients and eco-friendly packaging used in the products.
4. Launch Timeline
Pre-Launch (4 Weeks Before Launch):
Week 1: Finalize marketing materials, secure influencer partnerships, and start the teaser campaign.
Week 2: Begin email marketing campaign and publish initial blog posts and social media content.
Week 3: Distribute product samples to influencers and prepare press releases.
Week 4: Host a virtual launch event and release detailed product demos.
Launch Week:
Day 1: Official product launch on the website and e-commerce platforms.
Day 2: Launch pop-up shops and in-store promotions with retail partners.
Day 3-7: Continue social media blitz, influencer posts, and monitor customer feedback.
Post-Launch (4 Weeks After Launch):
Week 1: Analyze initial sales data, website traffic, and social media engagement.
Week 2: Adjust marketing strategies based on performance data.
Week 3: Launch a customer feedback survey and offer incentives for reviews.
Week 4: Plan follow-up promotions and seasonal marketing campaigns.
5. Key Performance Indicators (KPIs)
Sales Targets: Achieve a sales target of 10,000 units in the first month.
Website Traffic: Increase website traffic by 50% during the launch month.
Social Media Engagement: Reach a minimum of 100,000 impressions and 10,000 engagements (likes, comments, shares) across social media platforms.
Customer Reviews: Collect at least 500 positive reviews on e-commerce platforms and the company website.
Influencer Metrics: Track the number of influencer posts, reach, and engagement rates.
Example of Previous Launch Strategy
Product: XYZ Organic Snack Bar
Marketing Strategy: Focused on health benefits, organic ingredients, and convenience for on-the-go consumers.
Sales Channels: Sold through health food stores, gyms, and online platforms.
Launch Timeline: Included influencer partnerships, in-store sampling events, and social media challenges.
KPIs: Exceeded sales targets, high social media engagement, and positive customer feedback.
This comprehensive product launch plan for XYZ Company's eco-friendly cleaning product line is designed to effectively introduce the products to the target market, drive sales, and build brand loyalty.
Response I got from ChatGPT-Thai
แผนการเปิดตัวผลิตภัณฑ์สำหรับสายผลิตภัณฑ์ทำความสะอาดที่เป็นมิตรกับสิ่งแวดล้อมของ XYZ Company
Note: for both COSTAR and role-based prompts, you don’t need to include every component. Sometimes ‘audience’ won’t be relevant or you won’t have any ‘constraints’ in mind. Use only the ones you think make sense.
Building a Prompt Library for Your Team
Creating a centralized prompt library is a game-changer for teams to level up with Generative AI. You maximize each others' productivity.
This can be as simple as sharing an Excel spreadsheet or a shared document containing prompts from all team members, categorized by use cases or any other relevant criteria to make them easy to browse and retrieve. Maybe include sample outputs alongside each prompt to illustrate the expected results.
Encourage your team members to do it with you.
Example:
Marketing team: prompts for crafting social media posts, email newsletters, and website copy
IT department: prompts for generating technical documentation, troubleshooting guides, and user onboarding materials
Legal team: prompts for drafting contracts, policy statements, and regulatory reports
Key Lessons Learned
Structured prompts, such as the COSTAR and role-based frameworks, provide a powerful means of guiding AI assistants to deliver tailored, high-quality outputs that meet specific needs.
Writing structured prompts help you and AI understand tasks at hands better.
Maintaining a centralized prompt library, with prompts categorized by department and use case, helps teams streamline AI-powered workflows, ensure consistency.
There's really no fixed convention in what delimiters you should use or how to structure the prompt. (Though, OpenAI tried to provide some ). You can define your own convention.
This tip comes from someone who won Singapore’s GPT-4 Prompt Engineering Competition in 2023 []. The COSTAR framework is a proven approach to crafting structured prompts that guide AI assistants to deliver tailored, high-quality outputs. It's perfect for asking an AI assistant to write something for you.