提示設計通常需要經過數次疊代才能獲得一致的回應。提示設計策略應採用提示設計最佳做法,並逐步進行精進。您可以逐步導入部分或所有最佳做法,以便測試符合用途需求的效能。
此外,提示中的內容順序有時也會影響回覆結果。因此不妨嘗試變更內容順序,看看回覆會有什麼變化。例如,如果是多模態提示,請嘗試在指令前面先新增檔案。
收到模型回覆後,請記下您喜歡和不喜歡的回覆內容,並修改提示,引導模型提供最符合您用途的回覆。
範例
舉例來說,假設您想讓模型為產品撰寫廣告文案,您可以先定義下列提示內容:
- 目標:建立廣告文案
- 背景資訊:
- 類別:稀缺性、獨占性
- 產品說明:「Chromecast 是一種裝置,可讓使用者以無線方式投放其他裝置中的內容,以便在電視上觀賞喜愛的電影、電視節目、相片、網站等。無論是 Android 智慧型手機和平板電腦、iPhone 和 iPad、Windows 和 Mac 筆電,還是 Chromebook Pixel 等裝置中的內容,皆可透過 Chromecast 顯示在電視上。」
- 限制:每個回覆的字數應不超過兩句話。
實驗如何將內容提供給模型,有助於確保模型的回應最符合您的需求。假設您將語句提示內容完整提供給模型:
第一個疊代 |
---|
Create ad copy. Categories: scarcity, exclusivity Product description: "Chromecast is a device that allows users to wirelessly cast their content from other devices, so they can watch their favorite movies, TV shows, photos, websites, and more on their TV. Chromecast can display content from Android smartphones and tablets, iPhones & iPads, Windows and Mac laptops, and the Chromebook Pixel." Constraints: Each response should be two sentences or less. Scarcity * Time is running out to experience the future of entertainment! Get your Chromecast before they're gone. * Limited quantities available! Don't miss your chance to own the streaming device everyone's talking about. Exclusivity * Unlock a world of entertainment with Chromecast. Experience the freedom of streaming like never before. * Upgrade your home entertainment with the exclusive Chromecast device. Join the elite group of cord-cutters who stream smarter. |
接著,您可以嘗試重新設定提示,看看當提示目標、限制和部分內容結合為單一句子時,回覆內容會如何變化:
第二次疊代 |
---|
Create scarcity and exclusivity-focused ad copy that is less than two sentences. Product description: "Chromecast is a device that allows users to wirelessly cast their content from other devices, so they can watch their favorite movies, TV shows, photos, websites, and more on their TV. Chromecast can display content from Android smartphones and tablets, iPhones & iPads, Windows and Mac laptops, and the Chromebook Pixel." Options for Scarcity & Exclusivity-Driven Chromecast Ads: Option 1 (Scarcity): "Limited quantities available! Get your Chromecast today before they're gone and unlock a world of on-demand entertainment." Option 2 (Exclusivity): "Experience entertainment like never before. Chromecast: the ultimate upgrade for your TV, available for a limited time." |
這次模型的回應只包含每個類別的一個副本選項。如果您發現每個類別至少需要兩個選項,且不想限制回覆長度,可以修改限制條件,然後再次嘗試提示:
第三次迭代 |
---|
Create two ad-copies about scarcity and two ad-copies about exclusivity. Product description: "Chromecast is a device that allows users to wirelessly cast their content from other devices, so they can watch their favorite movies, TV shows, photos, websites, and more on their TV. Chromecast can display content from Android smartphones and tablets, iPhones & iPads, Windows and Mac laptops, and the Chromebook Pixel." Scarcity Ad Copies: Ad 1: Headline: Don't miss out! Chromecast is flying off the shelves! Body: Experience the magic of Chromecast before it's too late! Limited quantities are available, so grab yours now and start enjoying your favorite entertainment on the big screen. Ad 2: Headline: Last chance! Chromecast is almost sold out. Body: Time is running out to get your hands on Chromecast. Upgrade your TV experience today and enjoy seamless streaming from all your devices. Don't wait, supplies are limited! Exclusivity Ad Copies: Ad 1: Headline: Unlock a world of entertainment with the exclusive Chromecast. Body: Join the elite group of Chromecast users and experience the future of television. Enjoy effortless streaming, endless entertainment options, and unparalleled convenience. Chromecast: It's not just TV, it's an experience. Ad 2: Headline: Elevate your home entertainment with the Chromecast advantage. Body: Go beyond ordinary TV with Chromecast. Seamlessly stream content from all your devices and enjoy a personalized entertainment experience like no other. Discover the exclusivity of Chromecast today. |
在第三次迭代中,模型的回應包含廣告文案的標題和內文欄位。假設這個回應符合廣告文案規定,請參考以下範例。
調整提示後,您就能獲得符合廣告文案需求的回覆。現在,您可以更新並測試提示,確保模型日後會產生格式相似的回覆:
第四次疊代 |
---|
Create two ad-copies about scarcity and two ad-copies about exclusivity. Include a headline and body for each ad copy. Product description: "Chromecast is a device that allows users to wirelessly cast their content from other devices, so they can watch their favorite movies, TV shows, photos, websites, and more on their TV. Chromecast can display content from Android smartphones and tablets, iPhones & iPads, Windows and Mac laptops, and the Chromebook Pixel." Scarcity Ads: Ad 1: Headline: Last Chance! Chromecast is Selling Out Fast Body: Get the Chromecast experience before it's gone! Limited quantities remain. Upgrade your TV time today! Ad 2: Headline: Don't Miss Out! Chromecast Stock is Running Low Body: Time is running out to grab your Chromecast. Enjoy seamless streaming on the big screen. Order now while supplies last! Exclusivity Ads: Ad 1: Headline: Unlock the Ultimate Viewing Experience with Chromecast Body: Join the elite group of Chromecast users and enjoy unparalleled streaming convenience. Elevate your entertainment today! Ad 2: Headline: Experience the Future of Entertainment: Get Your Chromecast Body: Be among the first to enjoy the cutting-edge technology of Chromecast. Stream anything, anytime, effortlessly. Upgrade your home entertainment now! |
這次,即使有額外限制,模型的回應仍與上一個疊代非常相似,這表示您已成功對提示進行疊代。
如範例所示,提示疊代是提示設計程序的重要部分,可用於引導模型產生最適合用途的最佳結果。
後續步驟
- 如要查看更多提示範例,請前往提示庫。
- 瞭解如何使用 Vertex AI 提示最佳化工具 (預先發布版),針對Google 模型最佳化提示。