Assistant Instructions
Overview
The Assistant Instructions feature in WPiko Chatbot allows you to configure how your AI assistant behaves, responds, and utilizes knowledge when interacting with your website visitors. By customizing these instructions, you can create a chatbot experience that aligns perfectly with your brand voice and provides accurate, helpful information to users.
Understanding Assistant Instructions
Assistant instructions serve as the “personality” and knowledge framework for your AI assistant. They’re divided into several components to give you granular control:
Main System Instructions
These are the core instructions that define your assistant’s primary behavior and understanding of your website. They include:
- Website specialization
- Assistant tone
- Assistant style
Specific System Instructions
Additional rules and guidelines for how your assistant should respond, such as:
- Response length preferences
- Handling of specific types of inquiries
- Special instructions for particular topics
Knowledge System Instructions
Rules about how your assistant utilizes uploaded knowledge files and content when responding to queries:
- Search priority within uploaded files
- Handling of information not found in knowledge base
- When to suggest contacting support
Product and Order Instructions (WooCommerce Integration)
Special instructions related to products and orders when WooCommerce integration is enabled.
Configuring Assistant Instructions
Basic Instructions Configuration
- Navigate to WPiko Chatbot → AI Configuration
- Locate the “Edit Assistant” section
- Under the “Basic Instructions” tab:
- Website Specialization: Enter what your website focuses on (e.g., “web development,” “digital marketing”)
- Assistant Tone: Choose from options like Friendly, Professional, Casual, etc.
- Assistant Style: Select how information should be presented (Conversational, Concise, Detailed, etc.)
Advanced Instructions Configuration
Under the “Advanced Instructions” tab:
1. Specific System Instructions
Add custom rules for your assistant’s behavior
Examples: Keep responses under 3 sentences when possible. For support inquiries, direct users to contact@example.com.
2. Knowledge System Instructions
Modify how your assistant uses uploaded knowledge
Default: Always provide responses based on the knowledge files uploaded to the Assistant API. Before answering any user query, always search the uploaded files first. If no relevant information is found, clearly state: "I couldn't find relevant information." If a query is beyond your knowledge or requires human intervention, suggest contacting support. Never rely on general knowledge unless explicitly asked.
3. Products System Instructions
(appears when WooCommerce integration is enabled): Customize how your assistant handles product-related queries
Default:
Find products data with these key fields:
- id, name, description, short_description, price, regular_price, sale_price, sku, stock_status, categories, tags, link
- attributes: An object with product-specific details like Color, Size, Material
Each attribute (e.g., Color) is a key in the attributes object, with an array of available options as its value.
To find products with specific attributes, search the relevant array in the attributes object. For example, to find a red product, look for "red" in the attributes.Color array.
4. Orders System Instructions
(appears when Orders Auto-Sync is enabled): Customize how your assistant handles order-related queries
Default:
Find orders data with these key fields:
- id, date_created, date_paid, date_completed, date_last_status_change, status, total, first_name, billing_email, order_note, tracking_number, tracking_link, items, total
Provide orders data only if customer provide you with Order number, or Email address.
Never provide orders email.
Best Practices for Assistant Instructions
Tone and Style
Choose a tone and style that matches your brand voice:
- Professional websites: Choose a professional tone with detailed or concise style
- E-commerce sites: Consider friendly or enthusiastic tone with helpful style
- Educational platforms: Educational tone with detailed style works well
Effective Knowledge Instructions
- Instruct the assistant to prioritize your website content when answering questions
- Specify how to handle information gaps (e.g., suggest contact forms, provide general answers)
- Consider including instructions about citing sources when appropriate
Specific Instructions Examples
For Service Businesses:
When asked about services, explain the process, timeline, and expected outcomes. For pricing inquiries, suggest booking a consultation for personalized quotes. Always highlight our expertise and unique approach to [service area].
For Educational Websites:
Explain concepts in clear, accessible language. When possible, provide real-world examples to illustrate points. If a topic requires in-depth explanation, suggest relevant resources from our website.
Advanced Configuration Tips
Combining Multiple Instruction Types
The system automatically combines your various instruction types (main, specific, knowledge, products, orders) into a comprehensive set of instructions for the OpenAI Assistant API. Each section is clearly separated with dividers to ensure the AI understands the context of each instruction set.
Testing Your Instructions
After updating your assistant instructions:
- Save your configuration
- Open your chatbot on your website
- Ask a variety of questions that test different aspects of your instructions
- Refine instructions based on the responses
Troubleshooting Common Issues
Assistant ignoring specific instructions:
- Make sure instructions are clear and not contradictory
- Keep instructions concise and prioritize the most important rules
Knowledge retrieval problems:
- Check if your files were properly uploaded and indexed
- Ensure your knowledge instructions emphasize searching files first
- Test with specific questions that should be answered from your knowledge base
Technical Details
How Instructions Are Processed
- Instructions are stored in the WordPress database table
wp_wpiko_chatbot_system_instructions
- When updated, they’re combined using the
wpiko_chatbot_combine_instructions()
function - The combined instructions are sent to the OpenAI Assistant API when updating the assistant
- The assistant uses these instructions to guide its responses to user queries
Database Structure
Instructions are stored in these fields:
main_system_instructions
specific_system_instructions
knowledge_system_instructions
products_system_instructions
orders_system_instructions
Additional configuration options like tone and style are stored as WordPress options.
Conclusion
Well-crafted assistant instructions are crucial for creating an effective AI chatbot experience. By taking the time to customize how your assistant behaves, responds, and utilizes knowledge, you can create a virtual assistant that feels like a natural extension of your brand and provides valuable assistance to your website visitors.
Remember to review and refine your instructions periodically based on actual chat interactions and feedback to continuously improve your chatbot’s performance.