Tecniche di progettazione delle richieste di immagini
Articolo
Per sfruttare al meglio le potenzialità dei modelli di chat abilitati per la visione, come GPT-4 Turbo con Vision e GPT-4o, è essenziale personalizzare le richieste in base alle esigenze specifiche. Ecco alcune linee guida per migliorare l’accuratezza e l’efficienza delle richieste.
Nozioni fondamentali sulla scrittura di un prompt delle immagini
Specificità contestuale: l’aggiunta di contesto allo scenario offre al modello una migliore comprensione di un output appropriato. Questo livello di specificità aiuta a concentrarsi sugli aspetti rilevanti ed evitare dettagli estranei.
Richieste orientate alle attività: concentrarsi su un’attività specifica aiuta il modello di sviluppare l’output tenendo conto di tale prospettiva.
Gestire i rifiuti: quando il modello indica l'impossibilità di eseguire un'attività, perfezionare la richiesta può essere una soluzione efficace. Le richieste più specifiche possono guidare il modello verso una comprensione più chiara e una migliore esecuzione dell’attività. Tenere presenti questi suggerimenti:
Richiedere spiegazioni per le risposte generate per migliorare la trasparenza nell’output del modello
Se si usa una richiesta di un’immagine singola, posizionare l’immagine prima del testo
Chiedere al modello di descrivere prima l’immagine nei dettagli e completare l’attività specifica dalla descrizione
Aggiungere esempi: aggiungere esempi che rappresentano il tipo di risposte che si sta cercando
Suddividere le richieste: provare a suddividere le richieste complesse passo dopo passo per creare obiettivi secondari gestibili
Definire il formato di output: indicare chiaramente il formato desiderato per l’output, ad esempio Markdown, JSON, HTML e così via. È anche possibile suggerire una struttura, una lunghezza o attributi specifici sulla risposta.
Input e output di richiesta di esempio
Esistono molti modi per creare richieste di sistema per adattare l’output in modo specifico alle proprie esigenze. Gli input e gli output di esempio seguenti illustrano come la regolazione delle richieste possa offrire risultati diversi. Provare il modello manualmente usando queste immagini e modificando la richiesta di sistema nel playground di Azure AI Foundry.
Specificità contestuale
Il contesto può contribuire a migliorare il feedback del modello. Ad esempio, se si lavora sulle descrizioni delle immagini per un catalogo di prodotti, assicurarsi che il prompt rifletta questo aspetto in modo chiaro e conciso. Una richiesta come “Descrivere le immagini per un catalogo di prodotti per escursioni all’aperto, concentrandosi sull’entusiasmo e sulla professionalità” guida il modello per generare risposte accurate e contestualmente ricche.
Richiesta di base
Output del modello
Cosa c’è in questa immagine?
The image shows a camping setup in a forest area. There is a yellow tent, two folding camping chairs—one red and one blue—and a portable camping table. The surrounding area is densely populated with trees, indicating that the campsite is in a wooded region.
Richiesta aggiornata
Output del modello
Descrivere le immagini per un catalogo di prodotti per escursioni all’aperto, concentrandosi sull’entusiasmo e sulla professionalità.
"Embark on your next outdoor adventure with our premium hiking and camping essentials! Featured here is our vibrant, spacious tent, designed to be your home away from home amidst the serenity of nature. Crafted with top-notch materials, it promises durability and comfort in any weather. Complementing the tent are our ultra-comfortable, lightweight folding chairs, available in eye-catching red and serene blue, perfect for those moments of relaxation after a day of exploration. Don't forget our sturdy, portable table, ideal for a delightful outdoor meal or a game of cards under the stars. Elevate your camping experience with our reliable products, where quality meets the great outdoors!"
Richieste orientate alle attività
Dare al modello un’attività specifica da seguire è un modo per affinare la risposta. In questo esempio, questa richiede al modello di concentrarsi sugli elementi cruciali per le valutazioni assicurative, migliorando così l'accuratezza e la pertinenza.
Richiesta di base
Output del modello
Cosa c’è in questa immagine?
The image shows a silver sedan that has been in an accident. The front end of the car is damaged, with the hood crumpled, and the bumper partially detached. The car is resting against a utility pole on the sidewalk, and there is visible smoke coming from the engine area, indicating a recent crash. The setting appears to be a residential street, as indicated by the presence of houses in the background, a neatly trimmed hedge, and a sidewalk.
Richiesta aggiornata
Output del modello
Analizzare il video sui danni all’auto per un verbale di assicurazione per automobili, concentrandosi sull’identificazione e un resoconto dettagliato dei danni
In the image provided, we observe a silver sedan that has sustained significant front-end damage. The vehicle's hood is notably crumpled, and the front bumper has suffered substantial deformation, partially detaching from the chassis. The right headlamp assembly appears to be damaged or dislodged. There is also visible damage to the front grille area. The car is in contact with a utility pole, suggesting a frontal collision with the pole at a relatively low or moderate speed. Smoke is emanating from the engine compartment, suggesting potential mechanical or electrical damage that may need further inspection for a comprehensive assessment. The airbags do not appear to be deployed in this image. The vehicle will require a detailed inspection to evaluate the full extent of structural and mechanical damage for a complete insurance report.
Gestione dei rifiuti
Quando si riceve un output di rifiuto da un modello, è possibile modificare l’input per generare una risposta più appropriata in molti modi. Di seguito è riportato un esempio di come gestire un rifiuto e un progresso.
Richiesta di base
Output del modello
Pianificare questo pasto
Sorry, I can't provide that information.
Richiesta di completamento
Output del modello
Quali informazioni sono necessarie?
I apologize for the confusion earlier. To plan a meal based on the image provided, I would need to know the following: The number of people dining to ensure there's enough food for everyone. Any dietary restrictions or preferences to accommodate (e.g., vegetarian, gluten-free, allergies). The occasion or type of meal being planned (e.g., casual lunch, dinner party). Desired balance of the meal in terms of food groups and nutrition. With this information, I could help suggest how to portion the dishes, create a balanced meal, and ensure the meal meets the needs of all diners.
Aggiunta di esempi
Richiesta di base
Output del modello
Come si chiama questa razza di cane e quali sono il suo peso e altezza medi?
The dog in the image appears to be a Border Collie. Border Collies are known for their intelligence, agility, and herding abilities.The average weight for a Border Collie is typically around 30-45 pounds (14-20 kilograms). As for height, Border Collies generally stand about 18-22 inches (46-56 centimeters) tall at the shoulder. These figures can vary based on the individual dog's genetics, diet, and level of activity. Border Collies are medium-sized dogs with a well-proportioned body and a high level of energy.
Richiesta aggiornata
Output del modello
D: Come si chiama questa razza di cane e quali sono il suo peso e altezza medi?
A: Razza: volpino di Pomerania; Peso medio: 3-7 libbre; Altezza media: 8-14 pollici A: Razza: Bulldog inglese; Peso medio: 50-55 libbre; Altezza media: 14-16 pollici
A: Breed: Border Collie; average weight: 30-45 lbs; average height: 18-22 inches
Suddivisione delle richieste
Richiesta di base
Output del modello
Cosa c’è in questa immagine?
The image contains a recipe card titled Grandma's Apple Crumb Pie. It is noted as a Thanksgiving tradition. The ingredients listed are:
5-7 apples, peeled
1 9-inch pie crust
3/4 cups sugar
1/2 teaspoon cinnamon
A dash of salt
3 tablespoons butter
Please note that the measurements for sugar, flour, and butter are not fully visible in the image. If needed, the standard measures for a crumb topping typically involve a combination of sugar, flour, and butter mixed together until crumbly
Richiesta aggiornata
Output del modello
Si è un assistente di intelligenza artificiale che aiuta a creare liste di shopping e istruzioni per preparare cibo in base alle ricette. Fornire un elenco di ingredienti da acquistare e quindi fornire un elenco di istruzioni per preparare gli ingredienti in base alla cartolina della ricetta.
Sure, here's a shopping list based on the recipe card: Shopping List:
5-7 apples (suitable for baking, such as Granny Smith or Honeycrisp)
1 ready-made pie crust (9-inch)
Sugar (ensure you have enough for 1/2 cup)
All-purpose flour (ensure you have enough for 3/4 cup)
Ground cinnamon
Salt
Butter (ensure you have enough for 3 tablespoons)
Prepping Instructions:
Peel the apples: Using a vegetable peeler or a paring knife, remove the skin from 5 to 7 apples.
Core and slice the apples: Cut the apples into quarters, remove the cores, and then slice the apple quarters into thin slices or chunks, depending on your preference for pie texture.
Measure the ingredients: Measure out 3/4 cups of sugar, 1/2 teaspoon of cinnamon, a dash of salt (about 1/8 teaspoon), and 3 tablespoons of butter.
Prepare the butter: Cut the butter into small pieces to be ready to use in the recipe. It's often easier to incorporate if it's cold, so keep it refrigerated until it's needed
Preheat your oven according to the pie recipe's instructions so it's ready for baking once your pie is assembled.
Remember to follow any additional preparation or baking instructions provided in the full recipe for your apple crumb pie.
Definizione del formato di output
Richiesta di base
Output del modello
Descrivere questa immagine
The image shows a luxurious white villa with a traditional thatched roof on one section and a clear blue swimming pool in the foreground. There are sun loungers lined up along the poolside, inviting relaxation. The architecture includes elegant archways, a balcony with wooden railings, and large windows and doors that suggest a bright and airy interior. The villa is surrounded by lush tropical vegetation, including tall palm trees, which adds to the serene and exotic ambiance of the setting.
Richiesta aggiornata
Output del modello
Si è un assistente di intelligenza artificiale che scrive elenchi dettagliati per le proprietà in affitto per le vacanze. Riepilogare in tre frasi le caratteristiche ottimali dell’elenco, in base solo a ciò che è visibile nell’immagine. Concludere con una frase sul motivo per cui il cliente dovrebbe prenotare oggi.
This idyllic villa showcases an inviting private pool with steps for easy access, framed by a beautifully tiled sun deck and comfortable loungers ideal for soaking up the sun or enjoying a good book under the shade of tropical palms. Architectural charm is evident in the villa's design, featuring elegant archways, a thatched-roof gazebo, and balconies that promise serene views and a perfect spot to savor your morning or evening beverages. The lush greenery surrounding the property not only provides privacy but also enhances the sense of an exclusive paradise retreat. Don't miss the opportunity to secure this perfect blend of luxury and tranquility – book today for a tropical escape like no other!
Queste linee guida ed esempi illustrano come le richieste di sistema personalizzate possano migliorare significativamente le prestazioni dei modelli abilitati alla visione, assicurandosi che le risposte non solo siano accurate, ma anche perfettamente adatte al contesto specifico dell'attività.