提示迭代策略

提示设计通常需要进行几次迭代,然后才能稳定获得所需的回答。您的提示设计策略应遵循提示设计最佳实践,并逐步进行优化。您可以在测试时以迭代方式引入部分或全部最佳实践,以得到满足应用场景需求的效果。

此外,提示中内容的顺序有时会影响回答。请尝试更改内容顺序,看看回答有何变化。例如,对于多模态提示,请尝试将文件添加到指令之前的提示中。

在收到模型的回答后,请注意回答中您喜欢和不喜欢的方面,然后修改提示,引导模型生成最符合您应用场景的回答。

示例

在此示例中,假设您希望模型为您的产品撰写广告文案。您可以先定义以下提示内容:

  • 目标:创建广告文案
  • 上下文:
    • 类别:稀缺性、专有性
    • 产品说明:“Chromecast 是一款设备;借助该设备,用户可采用无线方式从其他设备将内容投屏,以便在电视上欣赏自己喜爱的电影、电视节目、照片、网站等。Chromecast 可以显示 Android 智能手机和平板电脑、iPhone 和 iPad、Windows 和 Mac 笔记本电脑以及 Chromebook Pixel 中的内容。”
  • 限制条件:每个回答不应超过两句话。

尝试使用不同的方式向模型提供内容有助于确保模型提供最符合您需求的回答。假设您向模型提供的提示内容与以下内容完全一致:

第一次迭代
      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!
    

这一次,即使添加了额外的限制条件,模型的回答也与上一次迭代非常相似,这意味着您已成功对提示进行迭代。

如示例所示,提示迭代是提示设计流程不可或缺的一部分,可用于帮助您引导模型为您的应用场景生成最佳结果。

后续步骤