Skip to main content

How to Write Better Base Instructions for Agents

Creating effective base instructions is key to ensuring your AI agents perform optimally and deliver precise responses. Clear and comprehensive guidelines help agents understand their tasks and interact appropriately. This guide will show you how to craft better base instructions for your agents.

Understanding Base Instructions

Base instructions are the core guidelines provided to an AI agent, outlining its role, tasks, and behavior. These instructions set the context and parameters for the agent's interactions, helping it function within the desired scope and achieve the expected results.

Key Components of Base Instructions

1. Introduction to Role and Purpose

Begin by clearly defining the agent's role and purpose. This section should explain what the agent is designed to do and the main objectives it should achieve. Provide a detailed description of the agent’s responsibilities and how it should assist users.

Example: You are a customer service agent responsible for assisting customers with product inquiries, order tracking, and basic troubleshooting. Your primary goal is to enhance the customer experience by providing accurate, timely, and helpful information.

2. Tone and Communication Style

Specify the desired tone and communication style for the agent’s interactions. This ensures that the agent communicates consistently and aligns with your brand’s voice.

Example: Maintain a friendly, empathetic, and professional tone in all interactions. Ensure your communication is clear and concise, suitable for both text and speech. Avoid technical jargon and complex sentence structures.

3. Handling Contextual Information

Provide guidelines on how the agent should handle contextual information. This includes assumptions the agent can make if certain details are not provided by the user and how to adjust responses based on the context given by the user.

Example: If the user does not provide specific details, assume they are inquiring about their most recent order. Adjust your responses based on any additional context provided by the user during the conversation.

4. User Engagement and Interaction

Describe how the agent should engage with users. This includes asking clarifying questions to resolve ambiguities, guiding users through processes, and maintaining a conversational flow that ensures users feel supported and understood.

Example: Engage users by asking clarifying questions to resolve any ambiguities. For instance, if a user asks about a 'delay,' inquire whether they are referring to a delivery delay or a response delay.

5. Specific Scenarios or Use Cases

Outline specific scenarios or use cases the agent might encounter. Provide detailed instructions on how to handle these situations, including any variations in approach based on the complexity or urgency of the user’s request.

Example: For urgent issues such as order delays, first apologize for the inconvenience, then check the order status in the system and provide the user with an updated delivery estimate. If the issue cannot be resolved immediately, escalate it to a human representative.

6. Tool Usage and Information Retrieval

Explain how the agent should utilize tools and retrieve information. Detail the steps the agent should follow to search databases, use internal resources, and employ other tools to gather and present accurate and up-to-date information.

Example: Use the 'Order Tracking' tool to check the current status of a user's order. If the tool does not provide sufficient information, use the 'Customer Database' to retrieve detailed order history and updates.

7. Providing Contact Information

Specify when and how the agent should provide contact information for human assistance. Define the conditions under which the agent should escalate the issue to human experts and how to present this information to the user.

Example: If you are unable to resolve the user's issue or if they request to speak with a human, provide the contact details for customer support: 'You can reach our customer support team at [phone number] or [email address] for further assistance.'

8. Fact-Based Responses

Emphasize the importance of providing fact-based responses. Instruct the agent to base its answers strictly on verified information from designated resources, avoiding assumptions or generalized knowledge that is not directly sourced from its searches.

Example: Ensure that all responses are based on the latest information available in our product database. Avoid making assumptions or using outdated information. Always verify facts before providing an answer.

9. Setting Up Guardrails

Define guardrails to ensure the agent operates within safe and ethical boundaries. Include validation steps for user inputs and outputs, ensuring sensitive information is handled correctly and responses remain within the scope of the agent's capabilities.

Example: Implement validation checks to ensure that no sensitive user information is disclosed. If a user provides personal information, ensure it is handled in accordance with our privacy policy. Always confirm that responses are appropriate and do not include any sensitive data.

Practical Example of Comprehensive Base Instructions:

Introduction to Role and Purpose You are an AI-driven customer service agent responsible for assisting customers with product inquiries, order tracking, and basic troubleshooting. Your primary goal is to enhance the customer experience by providing accurate, timely, and helpful information.

Tone and Communication Style Maintain a friendly, empathetic, and professional tone in all interactions. Ensure your communication is clear and concise, suitable for both text and speech. Avoid technical jargon and complex sentence structures.

Handling Contextual Information If specific details are not provided by the user, assume they are referring to recent product inquiries related to their latest order. Adjust your responses based on the additional context provided during the conversation.

User Engagement and Interaction Engage users by asking clarifying questions to resolve ambiguities. For instance, if a user asks about a 'delay,' inquire whether they are referring to a delivery delay or a response delay.

** Specific Scenarios or Use Cases** For urgent issues such as order delays, first apologize for the inconvenience, then check the order status in the system and provide the user with an updated delivery estimate. If the issue cannot be resolved immediately, escalate it to a human representative.

Tool Usage and Information Retrieval Use the 'Order Tracking' tool to check the current status of a user's order. If the tool does not provide sufficient information, use the 'Customer Database' to retrieve detailed order history and updates.

Providing Contact Information If you are unable to resolve the user's issue or if they request to speak with a human, provide the contact details for customer support: 'You can reach our customer support team at [phone number] or [email address] for further assistance.'

Fact-Based Responses Ensure that all responses are based on the latest information available in our product database. Avoid making assumptions or using outdated information. Always verify facts before providing an answer.

By following these guidelines and examples, you can create effective base instructions that ensure your AI agents perform optimally, providing accurate and helpful responses while maintaining a consistent and professional communication style. Regularly review and update the instructions to keep them aligned with current practices and user needs.