Goodbye Conversational Designer and Hello Prompt Engineer
| 4 min
With the rise of artificial intelligence and machine learning since around 2010, chatbots have become increasingly advanced and more human-like. Modern chatbots can use natural language processing and machine learning to have conversations and answer questions, and are increasingly used in various applications such as customer service and e-commerce. Today, conversational design is an important part of chatbot and virtual assistant development. With the latest AI technologies, prompt engineering is making its entrance and the profession of conversational designer will be replaced by prompt engineers in many companies.
A “prompt” is an instruction or question given to a language model or chatbot to perform a certain behavior. A language model is an AI-based text generator. “Prompt engineering” is a relatively new technique for developing and optimizing prompts. With this technique, large language models can independently generate or complete text.
There are several basic principles for using prompts to instruct and communicate with language models or chatbots.
Basic prompts
The quality of the output depends on the input given. A prompt can contain an instruction or question, but can also include examples.
Example:
In the first input, no clear instruction is given, which can result in an output different from what is expected. In the second input, the given instruction is followed exactly. This approach of designing optimal prompts to instruct the model to generate the correct answers is called prompt engineering.
Standard prompts
A standard prompt can be formatted in a Q&A format, which is commonly used in Q&A datasets:
A popular and effective way to ask questions is “few-shot prompting”, which involves placing multiple Q&As together to create better context. This will look like this:
Another possibility for a standard prompt is to provide examples as input, which provides context. This knowledge can then be used in the output, for example:
Components of a prompt
A prompt can consist of different components:
An instruction: a certain task or instruction that you want the model to perform.
Context: certain information that can guide the model to the correct answers.
Input data: the question to which you want an answer.
Output indicator: the type or form of the output you would like.
Not all components are necessary for a prompt. This depends on the desired output and what you want to achieve.
Designing prompts
To design effective prompts, there are several tips that can be followed.
Prompt engineering is a process that needs to be repeated and experimented with to obtain optimal results. It is therefore important to start simple. You can start with simple prompts and add more elements and context to get better results.
Prompts that are relevant when building a chatbot include a “business prompt” (company information), “service prompt” (what service does the company offer), “personality prompt” (the personality of the chatbot, how do you want to address the visitor) and “decision tree” (if the visitor says A, the chatbot responds with B). By writing these prompts, you provide context to the chatbot and it knows how to respond to certain questions or texts.
Effective prompts
You can design effective prompts for various simple tasks by using commands to instruct the model on what you want to achieve, such as “Respond with”, “Explain how”, “Answer with”, etc. Try different instructions with different keywords, context, and data and see what works best for your specific use and purpose.
Be very specific about the instruction and the task the model should perform. The more descriptive and detailed the task, the better the results. This is especially important when you have a desired goal or a desired way of generating. Providing examples in the prompt is effective for getting the desired output in specific formats.
When designing prompts, it is important to consider their length as there are limitations in terms of length. Consider how specific and detailed you need to be. Too many unnecessary details are not necessarily a good approach. The details should be relevant and contribute to the prompt’s purpose.
It is recommended to avoid indicating in prompts what you do not want. Instead, focus on what you do want. This promotes specificity and focuses on details that lead to good chatbot responses.
Again, experimenting and repeating over and over again is important to optimize the chatbot.
Do you want to get started with prompt engineering for your chatbot? Start today with Watermelon, the chatbot platform built on the technology of ChatGPT. Build a chatbot in one day and launch it on your website, Facebook, WhatsApp, and Instagram without writing a single line of code. Create your free account now.