In this article we will give you some general tips & tricks for writing Instructions, both in Domain knowledge and Instructions.
A language model is an AI-based text generator. An 'instruction' is a command or question given to a language model or chatbot to perform certain behavior, also called a 'prompt'. 'Prompt engineering' is a relatively new technique for developing and optimizing instructions. Using this technique, large language models can independently complete or write texts. By just adding knowledge, you're not there yet! The language model (GPT) cannot read your mind. After adding knowledge, your chatbot does not yet know how to deploy or use this knowledge. Therefore, it is important to clearly name your requirements in the Instructions. Instructions allow the chatbot to tailor the knowledge it has to your company, products and services. You create the framework and leeway within which the chatbot is allowed to operate.
General tips & tricks
- Your new colleague: Write Instructions as if you are instructing a new colleague using the second person ("you"). This perspective helps in making the chatbot understand and execute Instructions effectively.
- Be clear and concise: Formulate your Instructions in a clear and concise manner so that the chatbot can easily understand and follow the Instructions.
- Provide context / include examples: Ensure that your Instructions provide sufficient context to the chatbot. This helps the chatbot provide accurate answers based on the specific situation. 'Don't tell, but show': demonstrate the chatbot how to handle provided information. You can do this by giving the chatbot examples of questions and answers, by adding this to a specific instruction:
Example:
User: [question of the user]
Assistant: [what you want to see the chatbot respond to the questions]
- Be specific: Give detailed Instructions to the chatbot, especially when it comes to specific tasks or interactions with users. Avoid vague or general Instructions that can lead to misunderstandings. The chatbot takes Instructions very literally!
- Consider different languages: If your chatbot is multilingual, ensure that your Instructions are consistent with the user's language. Set up language-specific Instructions if necessary to ensure the chatbot responds correctly. You can find additional information on making your chatbot respond in different languages in this article.
- Test and improve: Experiment with different Instructions and regularly test how the chatbot responds. Adjust the Instructions based on feedback and learn from interactions to improve the chatbot's performance.
In some cases, a change in an instruction will lead to a better answer to a specific question, but that does not mean that better answers will be given to all other questions. Therefore, it is important to ask multiple test questions to determine results. - Stay up-to-date: Regularly update your Instructions updated with the latest information and developments in your company or industry. This ensures that the chatbot provides relevant and up-to-date answers.
- Be friendly and empathetic: If the chatbot is customer-oriented, consider adding Instructions that are friendly and empathetic. Let the chatbot show understanding and provide supportive responses to enhance the user experience. Implement this not only in the Domain knowledge, but also in the Instructions.
- Use positive language: For example, use phrases like "you can" or "you say A when asked B" instead of "you cannot" or "you don't answer question B".
- Monitor and analyze: Keep a close eye on the chatbot's interactions and analyze the provided answers. Identify patterns, frequently asked questions, and possible areas for improvement. Use these insights to optimize the Instructions and the chatbot's performance.
By following these tips, you can create effective Instructions that help your chatbot communicate better and support users in an appropriate and useful manner.
Do not perceive the entered Instructions as strict rules, but rather as helpful guidelines that assist the chatbot in adjusting its behavior. By modifying Instructions, experimenting with changes in those Instructions, and testing the implemented modifications, the chatbot can be better aligned with the desired outcomes. Keep in mind that the chatbot may occasionally not provide the exact answer you want to see, but it is possible to achieve this by making the right adjustments in the Instructions.