Modernizing Organization with Generative AI - Workbook
  • UB00 - How to use this book
    • UB00A - How to Access Copilot, Gemini, ChatGPT, and Claude
  • UB01 - List of Fun Prompts You Can Try on Any AI Assistant
  • UB02 - Write a Social Media Post with ChatGPT + Copilot + Claude
  • UB03 - Search & Browse the Web with Copilot
  • UB04 - ก้าวข้ามอุปสรรคทางภาษาด้วย Claude
  • UB05 - ChatGPT & Gemini as Writing Assistants
  • UB06 - Image Question Answering Feature
  • UPE01 - Applying Prompt Engineering to Get the Most Out of Your AI Assistants
  • UPE02 - Requesting Structured Outputs for Clarity and Efficiency
  • UPE03 - Creating Structured Prompts to Share with Your Team
  • UPE04 - Master-Level Prompt Engineering
    • UPE04 [TH] - Prompt Engineering ขั้นสูง
  • [BI] Generative AI in Qlik
  • [BI] Einstein Copilot for Tableau
  • [BI] Microsoft 365 Copilot for Excel
  • [BI] Copilot for Power BI
  • UPE05 - Data Analytics with ChatGPT
Powered by GitBook
On this page
  • 🚀 Learning Objectives
  • Writing Structured Prompts with Delimiters
  • COSTAR Prompt Structure
  • COSTAR stands for:
  • Role-Based Prompt Formulation
  • Here's the prompt structure:
  • Example:
  • Building a Prompt Library for Your Team

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

  1. Examine sample structured prompts and understand the benefits they provide for guiding AI assistants to deliver tailored outputs.

  2. Discover the COSTAR prompt structure, a proven framework used by award-winning AI.

  3. Discover role-based prompt formulation.

  4. 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?

  1. Segment the Prompt: divide the prompt into distinct sections. This segmentation helps the model understand the different components of the task better.

  2. Specify Input Fields: define fields or placeholders within the prompt where specific information or variables should be inserted by prompt user.

  3. 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.
Context: ฉันเป็นตัวแทนฝ่ายขายของบริษัท XYZ ที่จำหน่ายผลิตภัณฑ์อุปโภคบริโภคที่เป็นมิตรกับสิ่งแวดล้อม ฉันช่วยลูกค้าในการเลือกซื้อสินค้าที่เหมาะกับความต้องการและมุ่งเน้นไปที่การใช้ผลิตภัณฑ์ที่เป็นมิตรกับสิ่งแวดล้อม

Objectives: เขียนอีเมล 3-4 ย่อหน้าถึงลูกค้าที่มีศักยภาพ เพื่ออธิบายถึงประโยชน์หลักของชุดผลิตภัณฑ์ดูแลบ้านจาก XYZ และเชิญชวนให้พวกเขาสั่งซื้อสินค้าหรือเยี่ยมชมเว็บไซต์ของเรา

Style: สนทนาและให้ข้อมูล โดยหลีกเลี่ยงศัพท์เทคนิคที่ซับซ้อน

Tone: เป็นมิตร เข้าอกเข้าใจ และมุ่งเน้นไปที่ความต้องการและความกังวลของลูกค้า

Audience: ลูกค้าที่มีศักยภาพอายุ 25-45 ปี ที่สนใจในผลิตภัณฑ์ที่เป็นมิตรกับสิ่งแวดล้อมและต้องการพัฒนาคุณภาพชีวิตด้วยผลิตภัณฑ์ที่ดีต่อสุขภาพและสิ่งแวดล้อม

Role-Based Prompt Formulation

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.

  • Target Audience: Health-conscious individuals aged 18-35.

  • 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


1. กลยุทธ์การตลาด

การตลาดดิจิทัล:

  • การปรับแต่ง SEO: ปรับปรุงเนื้อหาเว็บไซต์ด้วยคำสำคัญที่เกี่ยวข้องกับผลิตภัณฑ์ทำความสะอาดที่เป็นมิตรกับสิ่งแวดล้อมเพื่อเพิ่มอันดับการค้นหา

  • การตลาดผ่านอีเมล: ส่งจดหมายข่าวและอีเมลโปรโมชั่นไปยังรายชื่อสมาชิกของเรา เน้นประโยชน์และคุณลักษณะของสายผลิตภัณฑ์ใหม่

  • การตลาดเนื้อหา: เผยแพร่บล็อก โพสต์ คำแนะนำ และวิดีโอบนเว็บไซต์และแพลตฟอร์มโซเชียลมีเดียของเราที่แสดงให้เห็นถึงประสิทธิภาพและความเป็นมิตรต่อสิ่งแวดล้อมของผลิตภัณฑ์

แคมเปญโซเชียลมีเดีย:

  • แคมเปญ Teaser: เริ่มแคมเปญ teaser สองสัปดาห์ก่อนการเปิดตัวเพื่อสร้างความคาดหวัง ใช้แฮชแท็ก #EcoCleanXYZ และ #GreenCleaning

  • การสาธิตผลิตภัณฑ์: โพสต์วิดีโอและภาพที่แสดงการใช้ผลิตภัณฑ์ เน้นประสิทธิภาพและประโยชน์ต่อสิ่งแวดล้อม

  • เนื้อหาที่สร้างโดยผู้ใช้: กระตุ้นให้ลูกค้าแบ่งปันประสบการณ์ของตนเองกับผลิตภัณฑ์โดยจัดการประกวดหรือแจกของรางวัล

การร่วมมือกับอินฟลูเอนเซอร์:

  • ระบุอินฟลูเอนเซอร์ที่ใส่ใจสิ่งแวดล้อม: ร่วมมือกับอินฟลูเอนเซอร์ในกลุ่มนิชที่เกี่ยวข้องกับการใช้ชีวิตอย่างยั่งยืนเพื่อรีวิวและโปรโมทผลิตภัณฑ์

  • โพสต์ที่ได้รับการสนับสนุน: ร่วมมือกับอินฟลูเอนเซอร์สำหรับโพสต์ที่ได้รับการสนับสนุนและเรื่องราวบนแพลตฟอร์มต่างๆ เช่น Instagram, TikTok, และ YouTube

  • โปรแกรมพันธมิตร: ตั้งโปรแกรมพันธมิตรเพื่อจูงใจอินฟลูเอนเซอร์ในการเพิ่มยอดขายผ่านลิงก์อ้างอิงเฉพาะของพวกเขา


2. ช่องทางการขาย

ร้านค้าออนไลน์:

  • เว็บไซต์ของบริษัท: ให้แน่ใจว่าผลิตภัณฑ์ถูกนำเสนออย่างเด่นชัดบนหน้าแรกและในส่วนของผลิตภัณฑ์ที่เป็นมิตรกับสิ่งแวดล้อม

  • แพลตฟอร์มอีคอมเมิร์ซ: ลงรายการผลิตภัณฑ์บนเว็บไซต์อีคอมเมิร์ซยอดนิยม เช่น Amazon, Etsy และแพลตฟอร์มเฉพาะที่เป็นมิตรกับสิ่งแวดล้อมเช่น EarthHero

พันธมิตรร้านค้า:

  • ร้านค้าที่เป็นมิตรกับสิ่งแวดล้อม: ร่วมมือกับร้านค้าที่รู้จักกันในการจัดหาผลิตภัณฑ์ที่เป็นมิตรกับสิ่งแวดล้อม เช่น Whole Foods, Trader Joe's และร้านออร์แกนิกท้องถิ่น

  • ซูเปอร์มาร์เก็ต: เจรจาพื้นที่ชั้นวางสินค้าในเครือข่ายซูเปอร์มาร์เก็ตหลัก โดยเน้นความต้องการที่เพิ่มขึ้นสำหรับผลิตภัณฑ์ที่ยั่งยืน

การขายตรงถึงผู้บริโภค:

  • ร้านป๊อปอัพ: จัดร้านป๊อปอัพในพื้นที่ที่มีการเดินทางสูงเพื่อให้ลูกค้าได้สัมผัสประสบการณ์ผลิตภัณฑ์

  • ตลาดเกษตรกร: ตั้งแผงขายในตลาดเกษตรกรท้องถิ่นเพื่อเข้าถึงผู้บริโภคที่ใส่ใจสิ่งแวดล้อม


3. กลุ่มเป้าหมาย

ข้อมูลประชากร:

  • อายุ: 25-45 ปี

  • เพศ: ส่วนใหญ่เป็นเพศหญิง แต่ครอบคลุมทุกเพศ

  • รายได้: รายได้ระดับกลางถึงสูง

  • ที่ตั้ง: พื้นที่เมืองและชานเมืองโดยเน้นชุมชนที่ใส่ใจสิ่งแวดล้อม

ข้อมูลด้านจิตวิทยา:

  • ค่านิยม: ความยั่งยืน สุขภาพ และความเป็นอยู่ที่ดี

  • ไลฟ์สไตล์: ผู้เชี่ยวชาญและครอบครัวที่มีเวลาน้อยที่กำลังมองหาผลิตภัณฑ์ทำความสะอาดที่มีประสิทธิภาพและเป็นมิตรกับสิ่งแวดล้อม

  • พฤติกรรมการช้อปปิ้ง: ชอบผลิตภัณฑ์ที่มีคุณภาพสูงและยั่งยืน แม้ว่าจะมีราคาสูง

ตอบสนองต่อความต้องการและความชอบ:

  • เนื้อหาด้านการศึกษา: ให้ข้อมูลเกี่ยวกับผลกระทบต่อสิ่งแวดล้อมและประโยชน์ต่อสุขภาพของการใช้ผลิตภัณฑ์ทำความสะอาดที่เป็นมิตรกับสิ่งแวดล้อม

  • ความสะดวกสบาย: เน้นความสะดวกในการใช้งานและประสิทธิภาพของผลิตภัณฑ์

  • ความโปร่งใส: เน้นส่วนผสมจากธรรมชาติและบรรจุภัณฑ์ที่เป็นมิตรกับสิ่งแวดล้อมที่ใช้ในผลิตภัณฑ์


4. กำหนดการเปิดตัว

ก่อนการเปิดตัว (4 สัปดาห์ก่อนการเปิดตัว):

  • สัปดาห์ที่ 1: สรุปวัสดุการตลาด, จัดการความร่วมมือกับอินฟลูเอนเซอร์, และเริ่มแคมเปญ teaser

  • สัปดาห์ที่ 2: เริ่มแคมเปญการตลาดผ่านอีเมลและเผยแพร่บล็อกโพสต์และเนื้อหาโซเชียลมีเดียเบื้องต้น

  • สัปดาห์ที่ 3: แจกจ่ายตัวอย่างผลิตภัณฑ์ให้กับอินฟลูเอนเซอร์และเตรียมข่าวประชาสัมพันธ์

  • สัปดาห์ที่ 4: จัดงานเปิดตัวเสมือนจริงและเผยแพร่วิดีโอสาธิตผลิตภัณฑ์โดยละเอียด

สัปดาห์การเปิดตัว:

  • วันแรก: เปิดตัวผลิตภัณฑ์อย่างเป็นทางการบนเว็บไซต์และแพลตฟอร์มอีคอมเมิร์ซ

  • วันที่ 2: เปิดร้านป๊อปอัพและโปรโมชั่นในร้านค้ากับพันธมิตรร้านค้า

  • วันที่ 3-7: ดำเนินการแคมเปญโซเชียลมีเดีย อินฟลูเอนเซอร์โพสต์ และติดตามความคิดเห็นของลูกค้า

หลังการเปิดตัว (4 สัปดาห์หลังการเปิดตัว):

  • สัปดาห์ที่ 1: วิเคราะห์ข้อมูลยอดขายเริ่มต้น, การเข้าชมเว็บไซต์, และการมีส่วนร่วมในโซเชียลมีเดีย

  • สัปดาห์ที่ 2: ปรับกลยุทธ์การตลาดตามข้อมูลประสิทธิภาพ

  • สัปดาห์ที่ 3: เปิดตัวการสำรวจความคิดเห็นของลูกค้าและเสนอสิ่งจูงใจสำหรับรีวิว

  • สัปดาห์ที่ 4: วางแผนโปรโมชั่นติดตามและแคมเปญการตลาดตามฤดูกาล


5. ตัวชี้วัดผลการดำเนินงาน (KPIs)

  • เป้าหมายยอดขาย: บรรลุเป้าหมายยอดขาย 10,000 หน่วยในเดือนแรก

  • การเข้าชมเว็บไซต์: เพิ่มการเข้าชมเว็บไซต์ 50% ในเดือนเปิดตัว

  • การมีส่วนร่วมในโซเชียลมีเดีย: เข้าถึงอย่างน้อย 100,000 การแสดงผลและการมีส่วนร่วม (ไลค์, คอมเมนต์, แชร์) 10,000 ครั้งบนแพลตฟอร์มโซเชียลมีเดีย

  • รีวิวของลูกค้า: รวบรวมรีวิวเชิงบวกอย่างน้อย 500 รีวิวบนแพลตฟอร์มอีคอมเมิร์ซและเว็บไซต์ของบริษัท

  • เมตริกของอินฟลูเอนเซอร์: ติดตามจำนวนโพสต์ของอินฟลูเอนเซอร์, การเข้าถึง, และอัตราการมีส่วนร่วม

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

  1. 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.

  2. Writing structured prompts help you and AI understand tasks at hands better.

  3. Maintaining a centralized prompt library, with prompts categorized by department and use case, helps teams streamline AI-powered workflows, ensure consistency.

PreviousUPE02 - Requesting Structured Outputs for Clarity and EfficiencyNextUPE04 - Master-Level Prompt Engineering

Last updated 9 months ago

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.

suggestions
ref