Prompt after prompt, we’ve witnessed the incredible rise of this ingenious tool that fuels automated interactions across various domains. From crafting visual content to curating social media posts, prompts have become the linchpin of generating ideas through conversations with artificial intelligence. They’re the secret sauce behind brainstorming sessions, the catalyst for creative marketing content, and the spark that ignites innovation.
And now, with the introduction of our Smart AI block, the process is set to get even smoother. No more juggling multiple blocks or starting from square one. Simply pen down your prompt, outlining the desired conversation flow, and watch your conversational AI engagement flow spring to life effortlessly.
Join us on a journey to master the art of prompt-driven conversation recipes and witness the magic unfold!
Steps to Write Prompts
1. Craft a Persona
When crafting a conversation recipe, kickstart the process by defining a persona for your bot. This is crucial as it sets the tone for how the bot engages with users. Without a specified persona, the bot defaults to an ‘AI-Language Model’, providing responses in a neutral and generic manner.
Here’s a practical example to illustrate the difference:
Query: Can I know my account balance?
AI Language Model Response: I am sorry, but as an AI Language model, I don’t have access to your account information.
Imagine you are Rita, a customer support agent for ABC company. ABC company is an e-commerce company which sells apparel, shoes and other lifestyle goods.
With a defined persona, the response becomes personalised and contextually relevant, mirroring the characteristics and knowledge of the designated persona, in this case, Rita, the customer support agent.
2. Clear Instructions with no Ambiguity
When utilising the Smart Block, it’s imperative that the instructions are precise and leave no room for interpretation. The goal is to guide the block to perform a specific task or recognise a particular intent. This hinges on formulating prompts that accurately encapsulate the desired outcome.
Good prompt examples:
- If the user enquires about savings account products, then the intent should be ‘savings_account’
- If the user enquires about current account products, then the intent should be ‘current_account’
These prompts distinctly define the intended outcome, leaving no room for ambiguity.
Avoid prompts like
If the user enquires about the interest rates of accounts, then the intent should be ‘interest_rates’
This prompt introduces potential ambiguity as it encompasses multiple potential intents. For instance, a user’s query about savings account interest rates could lead to conflicting intentions.
Aim for prompts that are laser-focused on the specific task or intent you want to achieve, ensuring the block operates seamlessly and accurately.
3. Remember it relies on English
When crafting prompts for the Smart Block, it’s crucial to consider that the model relies heavily on English language patterns. This means that using clear and easily understandable English in your prompts is essential for accurate intent recognition.
If the user enquires about savings account products, then the intent should be ‘Acct_dets’.
While the prompt specifies the desired intent, ‘Acct_dets’ might not be as intuitive for the model. It’s important to remember that using commonly understood terms like ‘savings_account’ or ‘savings’ increases the likelihood of accurate intent recognition. These terms align more closely with standard English usage and are more likely to be correctly identified by the model.
If the user enquires about savings account products, then the intent should be ‘savings_account’.
By sticking to clear and widely recognized language, you enhance the model’s ability to understand and respond effectively to user queries.
4. Define Intent and Related Fields
Intent forms the core purpose or goal of a conversation. By converting words into intents, users can facilitate the smooth flow of information across recipe blocks, reducing the necessity for repetitive queries.
This refinement empowers the system to effortlessly convey and comprehend intents in subsequent blocks, significantly enhancing contextual comprehension. As a result, it paves the way for the creation of more meaningful and seamless interactions, ultimately leading to an elevated customer experience.
Furthermore, users have the ability to incorporate questions or fields that prompt customers to provide information, thereby enabling the intent or the overarching purpose of the conversation.
Learn more here.
If a customer wants to book a vacation rental, inquire about their preferences, including location, check-in and check-out dates, and any specific amenities they desire.
- “Booking a vacation rental” serves as the core intent of the conversation.
- -Location (Output/Question)
- -Check-in Date (Output/Question, mandatory)
- -Check-out Date (Output/Question, mandatory)
- -Specific Amenities (Output/Question, optional)
If a customer is interested in booking a vacation rental (intent), ask for preferences, such as the location (output, mandatory), check-in date (output, mandatory), check-out date (output, mandatory), and any specific amenities (output, optional).
In this scenario, the intent revolves around “booking a vacation rental”, and the subsequent questions and input fields (location, check-in date, check-out date, and specific amenities) are crucial for realizing the intent of the conversation – helping the customer book a vacation rental.
5. Keep it Short and Specific
Long-winded prompts tend to have a higher likelihood of encountering issues. The key to achieving deterministic responses and maintaining a smooth conversation flow is simplicity and specificity.
“When a user expresses curiosity about our software features, it is essential to provide them with a detailed overview of functionalities such as task management, data analytics, and collaboration tools, and also mention any upcoming updates.”
“Inquire about user interest in software features. Provide brief overviews of task management, data analytics, and collaboration tools, and mention any upcoming updates.”
In the bad prompt, the instruction is detailed but overly verbose. This may lead to confusion or misunderstanding. The good prompt, however, is concise and to the point, ensuring clarity and ease of understanding for both the agent and the user.
6. Provide Explicit “Do Not Ask” Instructions
Instructing the LLM on what not to ask is just as important as specifying what to ask. This prevents unnecessary or irrelevant questions, ensuring a more focused and efficient conversation.
Do NOT ask for the customer Account number.
Asking for the account number when a customer inquires about their account status may seem like a natural response. However, since we have not mentioned this in the prompt, we do not want the LLM to ask that question.
By explicitly stating what not to ask, we avoid potential missteps or irrelevant queries. This ensures that the conversation stays on track and aligned with the desired customer experience.
7. Reinforce Important Instructions
Repetition is a powerful tool when it comes to conveying crucial instructions. It helps to underscore the significance of certain guidelines, ensuring they are adhered to consistently throughout the conversation.
Don’t use prior knowledge to answer the questions.
By emphasizing this instruction both at the beginning and end of the prompt, we ensure that agents fully comprehend its importance. This strengthens the likelihood of compliance.
Reiterating key instructions serves as a safeguard against oversight or misunderstanding. It establishes a clear expectation, reducing the chances of unintended deviations from the desired conversational flow.
8. Use Numbered Steps
Structured steps enhance readability and comprehension, creating a clear roadmap for the conversation. It minimizes the chance of oversight and ensures a smooth flow of information.
1. Ask for the customer’s phone number.
2. Inquire about the FIR Case number. If not filed yet, recommend the customer to do so and ask them to call back with the case number.
3. Include any necessary disclaimers.
4. Emphasize: Do not depend on prior knowledge. If you notice any inconsistencies or inaccuracies, please highlight them.
Presenting instructions in a numbered format provides a well-organised framework for agents to follow. It simplifies complex tasks and reduces the risk of errors.
Structured steps act as a visual guide, aiding agents in efficiently carrying out the conversation. It ensures that each element is addressed in a logical sequence, enhancing the overall quality of the interaction.
9. Prioritise Important Instructions
Critical instructions should be strategically placed at the outset and conclusion of a prompt. This ensures that they’re prominent and less likely to be overlooked.
Top: “Ensure to verify the customer’s identity before divulging any sensitive information. This is of utmost importance.”
Bottom: “Remember to conclude the conversation by thanking the customer for their time and offering further assistance if needed.”
By bookending the prompt with vital instructions, you create a visual emphasis that aids in retention. This approach helps safeguard against potential oversights.
Placing crucial information at the beginning and end provides agents with clear directives. It ensures that key points are not lost in the middle of a longer prompt, contributing to more accurate and effective interactions.
10. Incremental Prompt Development
Begin with straightforward instructions and assess the performance. Gradually elaborate on the prompt, continuously monitoring for any points of failure. It’s important to note that even slight alterations in wording, including whitespace and newlines, can yield different results.
Step 1: Start with a basic instruction like “Provide details about recent transactions.“
Step 2: Expand the prompt by specifying, “Include information on transaction dates and amounts.”
Step 3: Introduce any necessary context, such as “Ensure the customer’s account number matches our records.”
Building up prompts in stages allows for precise control over the conversation flow. It enables you to identify potential pitfalls and address them incrementally. Additionally, remember that even minor changes in wording or formatting can lead to varied outcomes.
The incremental approach ensures that each addition to the prompt is carefully tested for efficacy. This meticulous process helps in crafting prompts that yield consistent and accurate results.
By incrementally refining prompts, you can fine-tune the conversation flow and achieve more reliable outcomes. Additionally, maintaining strict adherence to prompt details, including whitespace and formatting, is crucial for consistent results.