General tips & tricks for writing Instructions

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 AI Agent 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 AI Agent 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 AI Agent to tailor the knowledge it has to your company, products and services. You create the framework and leeway within which the AI Agent 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 AI Agent understand and execute Instructions effectively.
  • Be clear and concise: Formulate your Instructions in a clear and concise manner so that the AI Agent can easily understand and follow the Instructions.
  • Provide context / include examples: Ensure that your Instructions provide sufficient context to the AI Agent. This helps the AI Agent provide accurate answers based on the specific situation. 'Don't tell, but show': demonstrate the AI Agent how to handle provided information. You can do this by giving the AI Agent 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 AI Agent respond to the questions]

  • Be specific: Give detailed Instructions to the AI Agent, especially when it comes to specific tasks or interactions with users. Avoid vague or general Instructions that can lead to misunderstandings. The AI Agent takes Instructions very literally!
  • Consider different languages: If your AI Agent is multilingual, ensure that your Instructions  are consistent with the user's language. Set up language-specific Instructions if necessary to ensure the AI Agent responds correctly. You can find additional information on making your AI Agent respond in different languages in this article.
  • Test and improve: Experiment with different Instructions and regularly test how the AI Agent responds. Adjust the Instructions based on feedback and learn from interactions to improve the AI Agents 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 AI Agent provides relevant and up-to-date answers.
  • Be friendly and empathetic: If the AI Agent is customer-oriented, consider adding Instructions that are friendly and empathetic. Let the AI Agent 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 AI Agent'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 AI Agent's performance.

By following these tips, you can create effective Instructions that help your AI Agent 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 AI Agent in adjusting its behavior. By modifying Instructions, experimenting with changes in those Instructions, and testing the implemented modifications, the AI Agent can be better aligned with the desired outcomes. Keep in mind that the AI Agent 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.