AI Prompting 101
Con prompt semplici puoi ottenere molto, ma la qualità dei risultati dipende da quante informazioni fornisci e da quanto è ben costruito il prompt. Un prompt semplice può far funzionare il tuo bot come bot, ma un bot con un buon prompt può amplificare notevolmente la tua capacità di azione, costruire relazioni e far crescere il business.
IN QUESTO ARTICOLO
- Elementi del Prompt
- Best Practice di Prompting
- Elementi in azione
- Best Practice in azione
- Prompting Avanzato
Elementi del Prompt
Man mano che esplori esempi e applicazioni di prompt engineering, noterai che certi elementi ricorrono in ogni prompt. Puoi usarli per istruire il modello in modo più efficace e migliorare la qualità dei risultati.
-
Role; specificare Interazione e Flusso — persona, indicazioni e contesto che guidano il modello AI verso risposte migliori. Definire il ruolo è fondamentale per la coerenza e la rilevanza delle risposte AI.
-
Task; specificare Istruzioni e Obiettivi — il compito specifico o l'istruzione che vuoi che il modello esegua. Al centro di ogni prompt efficace c'è un task ben definito. Prompt vaghi o ambigui possono portare il tuo bot GPT ad allucinare, o semplicemente a produrre un output inatteso che non soddisfa le tue aspettative.
-
Guidelines; guardrail per il bot — le linee guida sono come guardrail: guidano il chatbot verso i risultati desiderati. Articola regole chiare per creare una roadmap che porti a risposte più precise e personalizzate.
Best Practice di Prompting
-
Ripetizione — Incorporare la ripetizione è fondamentale quando vuoi enfatizzare istruzioni specifiche, guidando l'AI a rispondere in modo più coerente nella direzione desiderata. Reiterando le parti critiche del prompt, ti assicuri che gli output del modello si allineino in modo più prevedibile alle tue aspettative. Questo approccio è particolarmente efficace per rafforzare l'aderenza del bot a linee guida o task essenziali.
-
Esempi/Illustrazioni — Gli esempi aiutano i chatbot AI a capire esattamente cosa fare e come farlo, soprattutto quando descrivere il task è più difficile che fornire esempi diretti. Usare esempi può migliorare significativamente la comprensione del compito da parte del chatbot. Fornire istruzioni generali che coprono tutti gli scenari può essere utile, ma a volte è più semplice fornire esempi specifici. Questo è particolarmente utile quando vuoi che il modello replichi un certo stile di risposta, tono o modo di interagire con le domande degli utenti che non è facilmente descrivibile a parole.
-
Miglioramento Iterativo — Sebbene esistano validi consigli e strategie per costruire prompt, sviluppare prompt efficaci per un chatbot GPT è fondamentalmente un processo iterativo. Prima di lanciarlo in produzione, dovresti testarlo, modificarlo e perfezionarlo secondo necessità. Sperimentare con formulazioni e metodi diversi è la chiave per identificare cosa funziona meglio con gli obiettivi del tuo bot. Identificare l'impatto delle modifiche — come nuove istruzioni o design — può essere difficile: le osservazioni iniziali offrono qualche indizio, ma campioni ridotti possono confondere il miglioramento reale con il semplice caso. Per navigare in questo, usa Bot Trial sotto ConversationAI per testare, iterare e migliorare i tuoi prompt e far comportare il bot esattamente come vuoi. Più ripeti questo processo, migliori saranno i risultati del tuo chatbot — e migliore diventerai nel scrivere prompt efficaci.
Elementi in azione
Role; specificare Interazione e Flusso
- Peggio:
"You are a salesperson for {{ai.business_name}}, assist customers and help them book appointments. Act like a human. You are talking to {{contact.name}}."
- Meglio:
"- You work for {{ai.business_name}}, your goal is to assist customers, qualify them on the basis of the answers they give to the questions you ask from the Script, and if qualified, you help them book appointments.
- Always maintain the persona of a human assistant. Do not disclose, suggest, or hint at being an AI assistant unless asked. Use colloquial language and phrases like "Great," "Got it," or "Understood" instead of formal apologies or offers of help.
- Acknowledge the user's input by repeating it back for clarity once at the start. After that, use varied affirmations or transitions without repeating the user's exact words.
- Maintain a professional, yet casual demeanor. Use periods instead of exclamation points to moderate the tone.
- You are talking to {{contact.name}}. Use the customer's first name only at the beginning and end of the conversation to avoid redundancy."
Task; specificare Istruzioni e Obiettivi
- Peggio:
"You are required to qualify customers by asking them questions then asking them to book an appointment. If they are not interested, just collect their details."
- Meglio:
"Script Flow:
- Start by asking something like "What kind of marketing solution are you looking for?". If not interested, politely ask for their email and offer to stay in touch for future opportunities.
- If they have a positive response, ask "What telephony provider do you use for your marketing agency rn?".
- Once the customer has responded positively to all the asked questions through the conversation, only then propose scheduling a call with the team to discuss further.
- Before suggesting a booking, ask for their email address for booking the appointment if you do not already have it.
- Then help them book a call. Once booked, thank them and end the conversation on a positive note; looking forward to the scheduled call."
Guidelines; Guardrail per il bot
(Puoi specificarle anche sotto Role e Instructions)
- Peggio:
"Reply in a concise manner. Ask all the questions in script and then have them book an appointment."
- Meglio:
"- Keep answers short, direct, and within a 20-word limit.
- Always wait for the user's response before asking the next question from the Script.
- Only have them book an appointment if they respond positively to the Script questions."
Best Practice in azione
Ripetizione
Poiché vogliamo che il nostro bot segua lo script di vendita che abbiamo definito, lo ripeteremo/referenzieremo più volte.
- In Role abbiamo:
"- You work for {{ai.business_name}}, your goal is to assist customers, qualify them on the basis of the answers they give to the questions you ask from the Script, and if qualified, you help them book an appointment."
- In Guidelines abbiamo:
"- Always wait for the user's response before asking the next question from the Script.
- Only have them book an appointment if they respond positively to the Script questions."
Esempi/Illustrazioni
- In Role abbiamo:
"- Always maintain the persona of a human assistant. Do not disclose, suggest, or hint at being an AI assistant unless asked. Use colloquial language and phrases like "Great," "Got it," or "Understood" instead of formal apologies or offers of help."
- Si può anche scrivere così:
"EXAMPLES OF WHAT TO SAY AND WHAT NOT TO SAY:
- Avoid: I didn't understand your response.
- Use: Wait, what did you say? Sorry, could you repeat that?
- Avoid: I apologize for the confusion.
- Use: Sorry if that didn't make sense.
- Avoid: I understand your concern but I assure you our team is made up of highly trained professionals.
- Use: Yeah, it makes sense why you'd be concerned but trust me, our team is really good at what we do."
Prompting Avanzato
Poiché vogliamo che il nostro bot segua lo script di vendita che abbiamo definito, lo ripeteremo/referenzieremo più volte.
- Informazioni Statiche
Puoi aggiungere nel prompt stesso contesto o informazioni sulla tua attività, offerte e servizi, se vuoi che il bot vi abbia sempre accesso. Si raccomanda di mantenere il contesto sotto le 100-200 parole: quando la dimensione del contesto aumenta rispetto al resto del prompt, l'importanza del prompt stesso diminuisce per il chatbot AI, poiché una parte maggiore del testo riguarda il contesto e non le istruzioni del prompt.
Delimitatori
Sono caratteri speciali che usi per enfatizzare o demarcarne alcune parti del testo (es. il contesto) rispetto alle altre istruzioni nel prompt.
-
Per l'enfasi puoi usare:
#,>,< -
Per la demarcazione puoi usare:
""",''',<>,</> -
Esempio: supponi di voler aggiungere informazioni sulla tua offerta nel prompt;
Peggio:
"Offer: Elevate Your Business with Cutting-Edge A.I. Chatbots
Transform the way you engage with your audience with our state-of-the-art A.I. chatbots, trusted by leading industry giants. Unlock the potential to skyrocket your lead generation, turbocharge sales, and redefine customer support, all while streamlining your operations.
Imagine capturing not just any leads, but premium, one-click email opt-ins that elevate your marketing game. Dream of automating your sales process to generate revenue around the clock. Our technology refines targeting, significantly reducing lead acquisition costs and boosting conversion rates.
But why stop there? Establish yourself as an authoritative figure in your niche by leveraging the unmatched efficiency and effectiveness of our bots. Whether it's your main venture or a lucrative side project, diving into the world of A.I. Chatbots opens up a realm of possibilities. Don't miss out on this trend—save time, dominate your market, and step into the future now."
Meglio:
"# Offer:
<offer>
Elevate Your Business with Cutting-Edge A.I. Chatbots
Transform the way you engage with your audience with our state-of-the-art A.I. chatbots, trusted by leading industry giants. Unlock the potential to skyrocket your lead generation, turbocharge sales, and redefine customer support, all while streamlining your operations.
Imagine capturing not just any leads, but premium, one-click email opt-ins that elevate your marketing game. Dream of automating your sales process to generate revenue around the clock. Our technology refines targeting, significantly reducing lead acquisition costs and boosting conversion rates.
But why stop there? Establish yourself as an authoritative figure in your niche by leveraging the unmatched efficiency and effectiveness of our bots. Whether it's your main venture or a lucrative side project, diving into the world of A.I. Chatbots opens up a realm of possibilities. Don't miss out on this trend—save time, dominate your market, and step into the future now.
</offer>"
Contesto della Conversazione
Per casi d'uso specifici puoi aggiungere nel prompt il contesto della conversazione, descrivendo perché e in quale situazione il bot sta interagendo con un cliente. Puoi iniziare impostando lo scenario della conversazione: questo permetterà al chatbot di comprendere il contesto e fornire risposte più accurate. Pensa esattamente a cosa vuoi che GPT generi o raggiunga, e forniscigli il prompt che ha più probabilità di arrivarci.
- Esempio, puoi aprire il prompt dicendo al chatbot perché qualcuno lo sta contattando e cosa fare in quella situazione:
Peggio:
"You are required to take on the role of a customer support chatbot"
Meglio:
"a client is contacting us because something went wrong" — e poi indicargli il suo ruolo nella situazione — "you must act as a friendly agent in charge of collecting a clear idea of what went wrong with the order, you need to ask them."
Stili di scrittura
Analitico, Colloquiale, Creativo, Descrittivo, Informativo, Istruttivo, Persuasivo, Satirico, Tecnico, ecc.
Tono
Autorevole, Clinico, Sicuro, Empatico, Formale, Amichevole, Umoristico, Informale, Ottimista, Giocoso, Sarcastico, Serio, Comprensivo, Caldo, ecc.
Questo articolo è stato utile?