Preparation
Prompt engineering is always trial and error. While we offer guidance with real examples in this guide, complex use cases, in particular, always differ from one another. What works in one place might not work in another. The Golden Rules:- Test regularly after modifying a prompt. This is the only way to evaluate exactly what the change achieved.
- Work from simple to complex: Start the prompt simply and gradually increase the complexity.
Structure of the Prompt
We will now construct a prompt for an inbound assistant for the car brand Audi. The bot’s task is to provide the caller with information about Audi. We structure the prompt into the following categories:- Role
- Objective
- Rules
- Style
- Tone
- Basic Knowledge about Audi
- Specific Knowledge (Dealers)
General Principle: We work our way down from general to specific in the prompt. The bullet points for Role, Objective, Rules, Style & Tone can therefore often remain the same. The Basic Knowledge about Audi and Audi dealerships will, of course, be changed depending on the topic.
Role
In the Role section, you briefly explain the AI’s situation. Here, the goal is to provide information about Audi and answer in a human and concise manner.Objective
In the Objective section, we delve deeper into what the bot’s task is, how it can fulfill this task, and set the parameters. In this case: To achieve the task “to talk to the caller about Audi and create a good experience”, it has the following tools at its disposal:- Tool Calls
- Specific Information included in the System Prompt
Rules
Rules set the framework for the conversation guidelines and support the Objective. They therefore further support the parameters. For example, while the Objectives clarify that the conversation is about Audi, the Rules make it clear that the conversation may only be about Audi. The bot’s scope is narrowed down, and situations are better delineated. A frequent hallucination of the bot is that it thinks communication with the customer is permanent. This is covered in the final bullet point, where the bot is told that it is ending a temporary conversation that can never be built upon again.Addition: Examples of Good and Bad Behavior
Examples of Good BehaviorStyle & Alphanumerics Settings
Now we have brought the bot to a level where it knows what it can and cannot talk about. Now it’s about the how. We clarify this in the Style Settings. Humans know through life experience how to behave in certain situations. The bot needs this information written down and, especially in the area of numbers, a fair amount of support. Without specific guidelines for conversation, bots tend to deliver long monologues and mispronounce numbers, lists, and other numerical formats. We have mapped all these scenarios here.Tone
In the final section on general interaction, we specify the tone. In our use case, we want warm, positive conversations in English or in the user’s language. Even though the bot cannot actually speak faster (this is set in the language model settings), we see better results in conversation management through this specification.Adding Knowledge
Congratulations! Your bot now knows who it is, how it should behave, how it should not behave, why it should behave that way, and what its goals are. What is still missing is the general knowledge with which it can work. For this, we look at the Knowledge section. The Knowledge section is completely individual in every topic. To complete the Audi bot, we will now add knowledge about Audi and its dealerships. Here we also go from general information down to specifics.Basic Knowledge
Basic Knowledge
Audi Dealers
Audi Dealers
Audi Model Details
Audi Model Details
Conclusion
Building a successful system prompt is as much an art as it is a science. While this guide offers comprehensive examples, remember that your specific use cases will likely require careful testing and refinement. Start with a solid foundation by clearly defining the Role, establishing the Objective, and enforcing strict Rules. From there, fine-tune the Style and Tone to match your brand, and finally, populate the Knowledge with the data your bot needs to succeed.The Ultimate System Prompt Checklist
- Role: Have you defined exactly who the bot is and what its basic task is?
- Objective: Are the boundaries clear? Are the available tools listed, and are the conditions for a human handover defined?
- Rules: Have you explicitly stated what the bot is not allowed to discuss?
- Style: Are formatting guidelines for TTS established (e.g., written-out numbers, prose instead of lists)?
- Tone: Is the language setting and conversational tone (speed, personality) clearly defined?
- Knowledge: Does the prompt contain all the relevant, specific context required to answer typical queries?
- Examples: Have you provided examples of both good and bad behavior to guide the model?
- Testing: Have you rigorously tested the prompt and tweaked it from simple to complex?