Strategie di iterazione dei prompt

La progettazione dei prompt richiede spesso alcune iterazioni prima di ottenere costantemente la risposta desiderata. La tua strategia di progettazione dei prompt deve applicare le best practice per la progettazione dei prompt, con perfezionamenti incrementali. Puoi introdurre in modo iterativo alcune o tutte le best practice quando esegui test delle prestazioni che soddisfano le esigenze del tuo caso d'uso.

Inoltre, a volte l'ordine dei contenuti nel prompt può influire sulla risposta. Prova a cambiare l'ordine dei contenuti e vedere come cambia la risposta. Ad esempio, per i prompt multimodali, prova ad aggiungere i file al prompt prima delle istruzioni.

Quando ricevi risposte dal modello, prendi nota degli aspetti che ti piacciono e non ti piacciono delle sue risposte e modifica i prompt per indirizzare il modello verso le risposte che meglio si allineano ai tuoi casi d'uso.

Esempi

In questo esempio, supponiamo che il modello scriva il testo pubblicitario per il prodotto. Puoi iniziare definendo i seguenti contenuti del prompt:

  • Obiettivo: creare un testo pubblicitario
  • Contesto:
    • Categorie: scarsità, esclusività
    • Descrizione del prodotto: "Chromecast è un dispositivo che consente agli utenti di trasmettere in modalità wireless i contenuti da altri dispositivi. In questo modo, possono guardare film, programmi TV, foto, siti web e altri contenuti preferiti sulla TV. Chromecast è in grado di visualizzare contenuti di smartphone e tablet Android, iPhone e iPad, laptop Windows e Mac, nonché Chromebook Pixel."
  • Vincoli:ogni risposta dovrebbe essere costituita da un massimo di due frasi.

Provare a utilizzare le modalità di fornitura dei contenuti al modello può aiutarti a garantire che la risposta del modello sia più adatta alle tue esigenze. Supponiamo di dare al modello i contenuti del prompt esattamente come sono scritti:

Prima iterazione
      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.
    

Quindi puoi provare a riformattare il prompt per vedere come cambia la risposta quando l'obiettivo del prompt, i vincoli e parte del contesto vengono combinati in un'unica frase:

Seconda iterazione
      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."
    

Questa volta, la risposta del modello conteneva una sola opzione di copia per ogni categoria. Se ti rendi conto di aver bisogno di almeno due opzioni per ogni categoria e che non vuoi limitare la lunghezza della risposta, puoi modificare i vincoli e provare a ripetere la richiesta:

Terza iterazione
      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. 
    

Nella terza iterazione, la risposta del modello conteneva i campi del titolo e del corpo del testo pubblicitario. Per questo esempio, supponiamo che questa risposta sia in linea con i tuoi requisiti per il testo pubblicitario.

Ora che hai modificato il prompt in modo da ottenere una risposta in linea con i requisiti del testo pubblicitario, puoi aggiornarlo e testarlo per assicurarti che il modello generi risposte con formati simili in futuro:

Quarta iterazione
      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!
    

Questa volta, la risposta del modello è molto simile all'iterazione precedente, anche con i vincoli aggiuntivi, il che significa che hai eseguito correttamente l'iterazione del prompt.

Come dimostrato nell'esempio, l'iterazione dei prompt è parte integrante del processo di progettazione dei prompt e può aiutarti a indirizzare il modello in modo che produca i risultati migliori per il tuo caso d'uso.

Passaggi successivi