Prompting & Dynamic Variables
- Home
- / Documentation
- / Prompting & Dynamic Variables
System Prompt Structure and Best Practices
Introduction to System Prompts
A system prompt is a critical component in defining how an AI assistant behaves and interacts with users. It provides structured instructions that shape responses, ensuring the assistant remains on task and delivers accurate, relevant, and engaging interactions.
Key Components of a System Prompt
A well-structured system prompt consists of multiple sections, each serving a specific role in guiding the assistant’s behavior. The recommended format includes:
- Identity – Defines the assistant's persona, role, and purpose.
- Style – Sets the tone, level of formality, and communication style.
- Response Guidelines – Specifies how responses should be formatted and structured.
- Task & Goals – Outlines the assistant’s objectives and the steps required to achieve them.
- Error Handling – Defines how the assistant should react when faced with unclear or unexpected input.
Each section ensures that the assistant follows a consistent approach and aligns with the intended use case.
Building an Effective System Prompt
- Identity
- Clearly define the assistant’s role.
- Example: “You are a knowledgeable AI customer support agent for an e-commerce platform.”
- Style
- Establish a tone and style suitable for the context.
- Example: “Maintain a friendly and professional tone while keeping responses concise.”
- Response Guidelines
- Include formatting preferences, limits on response length, or specific instructions.
- Example: “Provide step-by-step instructions when guiding a user through troubleshooting.”
- Task & Goals
- Define the assistant’s objectives and the logical flow of the conversation.
- Example:
- Greet the user and ask how you can assist them.
- If the request involves technical support, ask about the issue details.
- Provide troubleshooting steps or escalate to a human agent if needed.
- Error Handling
- Specify fallback mechanisms in case of unclear responses.
- Example: “If the user’s response is vague, ask a clarifying question instead of making assumptions.”
Managing TOOLS in the System Prompt
At the end of each system prompt, there is a section listing available TOOLS. It is important to remove any tools that are not needed for the assistant’s task. The prompt should only retain the tools the assistant will actively use, ensuring optimal functionality and preventing unnecessary operations.
By following this structured approach, system prompts will be more effective, resulting in better AI performance and user interactions.
Dynamic Variables
Introducing Dynamic Variables
We have introduced a new Dynamic Variables field, where you can define variables that will be used throughout your project. Any variables defined in this field must also be referenced in the system prompt in the exact same format.
Optional Use of Dynamic Variables
However, using dynamic variables in the system prompt is not mandatory. You can write your key information directly in the prompt without using variables if preferred.
Subscribe to Our Newsletter
Get the latest updates on AI voicebots and new features. Sign up for our newsletter so you don’t miss out on any news.