El diseño de las peticiones suele requerir varias iteraciones hasta que obtienes la respuesta deseada de forma constante. Tu estrategia de diseño de peticiones debe aplicar las prácticas recomendadas de diseño de peticiones, con mejoras incrementales. Puedes introducir de forma iterativa algunas o todas las prácticas recomendadas al hacer pruebas de rendimiento que satisfagan las necesidades de tu caso práctico.
Además, el orden del contenido en la petición a veces puede afectar a la respuesta. Prueba a cambiar el orden del contenido y observa cómo cambia la respuesta. Por ejemplo, en las peticiones multimodales, prueba a añadir los archivos a la petición antes de las instrucciones.
A medida que recibas respuestas del modelo, anota los aspectos que te gusten y los que no de sus respuestas, y modifica tus peticiones para guiar al modelo hacia las respuestas que mejor se adapten a tus casos prácticos.
Ejemplos
En este ejemplo, supongamos que quieres que el modelo escriba el texto del anuncio de tu producto. Puedes empezar por definir el siguiente contenido de la petición:
- Objetivo: crear textos de anuncios
- Contexto:
- Categorías: escasez, exclusividad
- Descripción del producto: "Chromecast es un dispositivo que permite a los usuarios enviar contenido de otros dispositivos de forma inalámbrica para poder ver sus películas, series, fotos, sitios web, etc. en sus televisiones. Chromecast puede mostrar contenido de smartphones y tablets Android, de dispositivos iPhone y iPad, de portátiles con Windows y Mac, y del Chromebook Pixel."
- Restricciones: cada respuesta debe tener dos frases como máximo.
Experimentar con la forma de proporcionar el contenido al modelo puede ayudarte a asegurarte de que la respuesta del modelo se ajuste mejor a tus necesidades. Supongamos que le das a la modelo el contenido de la petición exactamente como está escrito:
Primera iteración |
---|
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. |
Después, puedes probar a reformular la petición para ver cómo cambia la respuesta cuando el objetivo, las restricciones y parte del contexto se combinan en una sola frase:
Segunda iteración |
---|
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." |
En esta ocasión, la respuesta del modelo solo contenía una opción de copia por categoría. Si te das cuenta de que necesitas al menos dos opciones para cada categoría y que no quieres limitar la longitud de la respuesta, puedes modificar las restricciones y volver a probar tu petición:
Tercera iteración |
---|
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. |
En la tercera iteración, la respuesta del modelo contenía los campos de título y cuerpo del texto del anuncio. En este ejemplo, supongamos que esta respuesta se ajusta a los requisitos de su texto del anuncio.
Ahora que has ajustado la petición para obtener una respuesta que se ajuste a los requisitos de tu copia del anuncio, puedes actualizar y probar la petición para asegurarte de que el modelo genere respuestas con un formato similar en el futuro:
Cuarta iteración |
---|
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! |
En esta ocasión, la respuesta del modelo es muy similar a la de la iteración anterior, incluso con las restricciones adicionales, lo que significa que has iterado correctamente tu petición.
Como se muestra en el ejemplo, la iteración de las peticiones es una parte fundamental del proceso de diseño de peticiones que se puede usar para ayudar al modelo a producir los mejores resultados para tu caso práctico.
Siguientes pasos
- Consulta más ejemplos de peticiones en la galería de peticiones.
- Consulta cómo optimizar las peticiones para usarlas con modelos de Google mediante el optimizador de peticiones de Vertex AI (vista previa).