Strategi iterasi prompt

Desain perintah sering kali memerlukan beberapa iterasi sebelum Anda mendapatkan respons yang diinginkan secara konsisten. Strategi desain dialog Anda harus menerapkan Praktik terbaik desain dialog, dengan peningkatan inkremental. Anda dapat secara iteratif memperkenalkan beberapa atau semua praktik terbaik saat menguji performa yang memenuhi kebutuhan kasus penggunaan Anda.

Selain itu, urutan konten dalam perintah terkadang dapat memengaruhi respons. Coba ubah urutan konten dan lihat perubahan respons. Misalnya, untuk perintah multimodal, coba tambahkan file ke perintah sebelum petunjuk.

Saat Anda menerima respons dari model, perhatikan aspek yang Anda sukai dan tidak sukai dari responsnya, lalu ubah perintah Anda untuk memandu model ke respons yang paling sesuai dengan kasus penggunaan Anda.

Contoh

Dalam contoh ini, misalkan Anda ingin model menulis teks iklan untuk produk Anda. Anda dapat memulai dengan menentukan konten perintah berikut:

  • Tujuan: Membuat teks iklan
  • Konteks:
    • Kategori: kelangkaan, eksklusivitas
    • Deskripsi produk: "Chromecast adalah perangkat yang memungkinkan pengguna mentransmisikan konten mereka secara nirkabel dari perangkat lain, sehingga mereka dapat menonton film, acara TV, foto, situs, dan lainnya yang mereka sukai di TV. Chromecast dapat menampilkan konten dari smartphone dan tablet Android, iPhone & iPad, laptop Windows dan Mac, serta Chromebook Pixel."
  • Batasan: Setiap respons harus terdiri dari dua kalimat atau kurang.

Bereksperimen dengan cara Anda memberikan konten ke model dapat membantu Anda memastikan bahwa respons model paling sesuai dengan kebutuhan Anda. Misalkan Anda memberi model konten perintah persis seperti ditulis:

Iterasi pertama
      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.
    

Kemudian, Anda dapat mencoba memformat ulang perintah untuk melihat bagaimana respons berubah saat tujuan, batasan, dan beberapa konteks perintah digabungkan menjadi satu kalimat:

Iterasi kedua
      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."
    

Kali ini, respons model hanya berisi satu opsi salinan untuk setiap kategori. Jika menyadari bahwa Anda memerlukan minimal dua opsi untuk setiap kategori dan tidak ingin membatasi panjang respons, Anda dapat mengubah batasan dan mencoba perintah lagi:

Iterasi ketiga
      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. 
    

Pada iterasi ketiga, respons model berisi kolom judul dan isi untuk teks iklan. Untuk contoh ini, misalkan respons ini sesuai dengan persyaratan teks iklan Anda.

Setelah menyesuaikan perintah untuk mendapatkan respons yang sesuai dengan persyaratan teks iklan, Anda dapat memperbarui dan menguji perintah untuk memastikan model menghasilkan respons berformat serupa di masa mendatang:

Iterasi keempat
      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!
    

Kali ini, respons model sangat mirip dengan iterasi sebelumnya, bahkan dengan batasan tambahan, yang berarti Anda berhasil melakukan iterasi pada perintah.

Seperti yang ditunjukkan oleh contoh, iterasi perintah adalah bagian integral dari proses desain perintah yang dapat digunakan untuk membantu Anda memandu model agar menghasilkan hasil terbaik untuk kasus penggunaan Anda.

Langkah selanjutnya