Con prompt semplici puoi già ottenere molto, ma la qualità dei risultati dipende da quante informazioni fornisci e da quanto il prompt è ben costruito. Un prompt basilare può far funzionare il bot come un bot, ma un bot con un buon prompt può amplificare enormemente la tua efficacia, costruire relazioni e far crescere il business.
- Elementi del Prompt
- Best Practice per il Prompting
- Elementi in pratica
- Best Practice in pratica
- Prompting Avanzato:
Elementi del Prompt
Man mano che esploriamo esempi e applicazioni di prompt engineering, noterai che certi elementi compongono sempre un prompt. Puoi utilizzare questi elementi per istruire il modello in modo più efficace e migliorare la qualità dei risultati.
Ruolo (Role): definire Interazione e Flusso - persona, indicazioni e contesto che guidano il modello AI verso risposte migliori. Definire il ruolo è fondamentale per la coerenza e la pertinenza delle risposte AI.
Task: definire Istruzioni e Obiettivi - un compito o un'istruzione specifica che vuoi che il modello esegua. Al centro di ogni prompt efficace c'è un task ben definito. Prompt vaghi o ambigui possono portare il bot GPT ad "allucinare", ovvero a produrre risultati inattesi o che non soddisfano le tue aspettative.
Linee guida (Guidelines): i guardrail per il bot - le linee guida funzionano come guardrail, orientando il ChatBot verso i risultati desiderati. Articola chiaramente le regole per creare una mappa che guidi verso risposte più precise e personalizzate.
Best Practice per il 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 il rispetto da parte del bot delle linee guida o dei task essenziali.
Esempi/Illustrazioni - Gli esempi aiutano i ChatBot AI a capire esattamente cosa fare e come eseguire il compito richiesto, soprattutto quando descrivere il task è più difficile che fornire direttamente degli esempi. L'utilizzo di esempi può migliorare significativamente la comprensione del compito da parte del ChatBot. Sebbene fornire istruzioni generali che coprano tutti gli scenari possibili possa essere utile, a volte è più semplice fornire esempi specifici. Questo è particolarmente utile quando si vuole che il modello replichi un certo stile di risposta, tono o modalità verso le domande degli utenti che non sono facilmente descrivibili a parole.
Miglioramento Iterativo - Sebbene esistano consigli e strategie utili per la creazione di prompt, sviluppare prompt efficaci per un chatbot GPT è fondamentalmente un processo iterativo. Prima di metterlo in produzione, dovresti testarlo, modificarlo e affinarlo secondo necessità. Sperimentare con varie formulazioni e metodi è essenziale per identificare ciò che funziona meglio con gli obiettivi del tuo bot. Valutare l'impatto delle modifiche, come nuove istruzioni o impostazioni, può essere a volte difficile. Le osservazioni iniziali possono fornire qualche indicazione, ma campioni di dimensioni ridotte potrebbero rendere difficile distinguere un miglioramento reale dalla semplice casualità. Per gestire questo aspetto, usa la funzione Bot Trial in ConversationAI per testare, iterare e migliorare i tuoi prompt, facendo comportare il bot esattamente come vuoi. Più ripeti questo processo, migliori saranno i risultati del tuo chatbot e più diventerai bravo a scrivere prompt efficaci.
Elementi in pratica
Ruolo: definire 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: definire 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."
Linee guida: i guardrail per il bot
(Puoi specificarle anche sotto Ruolo e Istruzioni)
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 pratica
Ripetizione
Poiché vogliamo che il nostro bot segua lo script di vendita che abbiamo predisposto, lo ripeteremo/referenzieremo più volte.
Nel Ruolo 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."Nelle Linee guida 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
Nel Ruolo 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."Può essere scritto anche come:
"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 predisposto, lo ripeteremo/referenzieremo più volte.
- Informazioni Statiche
Puoi aggiungere direttamente nel prompt contesto o informazioni sulla tua attività, offerte e servizi, se vuoi che il bot vi abbia accesso in ogni momento. Si consiglia di mantenere il contesto entro le 100-200 parole: quando le dimensioni del contesto aumentano rispetto al resto del prompt, l'importanza del prompt stesso diminuisce per il ChatBot AI, poiché una porzione maggiore del testo riguarda il contesto e non le istruzioni del prompt.
Delimitatori
Sono caratteri speciali che puoi usare per enfatizzare o delimitare determinate porzioni di testo (es. Contesto) nel prompt rispetto alle altre istruzioni.
Per l'enfasi puoi usare: #, >, <
Per la demarcazione puoi usare: """, ''', <> </>
Esempio: supponi di voler aggiungere nel prompt alcune informazioni sulla tua offerta;
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 anche il contesto della conversazione, descrivendo perché e in quale situazione il bot sta parlando con un cliente. Puoi iniziare impostando la scena per la conversazione: questo permetterà al chatbot di comprendere il contesto e fornire risposte più accurate. Pensa esattamente a ciò che vuoi che GPT generi o ottenga, e fornisci il prompt che con maggiore probabilità ti porta lì.
Esempio: puoi aprire il prompt spiegando al chatbot perché qualcuno sta interagendo con esso 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 definendo 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, Caloroso, ecc.