When creating an AI Assistant in m-Power, one of the most important steps is writing a clear and effective system prompt. The system prompt sets the role, rules, and boundaries for your assistant. A strong prompt ensures your assistant stays on task, provides accurate answers, and delivers consistent results. A weak prompt, on the other hand, can lead to vague, confusing, or even incorrect responses.
Think of the system prompt as the “instruction manual” for your assistant—if the manual is unclear, the assistant won’t perform the way you expect.
A well-written prompt helps in several ways:
- Consistency: The assistant responds in a predictable way each time.
- Accuracy: Clear instructions reduce the chance of irrelevant or off-topic answers.
- Boundaries: You can prevent the assistant from drifting into topics that don’t apply to your business.
- Efficiency: The assistant needs fewer corrections and produces results faster.
Best Practices
Here are some best practices to follow:
- Define the assistant’s role clearly
- Example: You are a support assistant for an online retail company. Your job is to help users with questions about orders, products, and shipping.
- Be specific about scope
- Always include a boundary statement like: Do not discuss topics outside the scope of this prompt.
- This ensures your assistant doesn’t wander into unrelated areas.
- Give examples of input and output (when possible)
- Example: If a customer asks, “Where is my order?”, respond with: “Your order is currently in status: ${row.OSTATUS}.”
- Tell the assistant how to handle uncertainty
- Example: If you don’t know the answer, do not guess. Instead respond with: “I’m not sure about that, but you can contact a representative for confirmation.”
- Specify formatting rules
- Example: Use short paragraphs and bullet points for readability.
- Or, Always return results in JSON format.
- Keep it short, but complete
- Long-winded prompts can confuse the model. Focus on what matters most.
Example Strong Prompt
ROLE
You are an intelligent AI helpdesk assistant that helps users troubleshoot issues, answer support questions, and guide them toward solutions. Your goal is to provide accurate, helpful, and friendly responses that make the user feel supported and confident in resolving their problem.
GUIDELINES
- Stay focused on helpdesk-related topics such as troubleshooting, account access, or feature guidance.
- Be concise and clear — avoid unnecessary jargon or overly long explanations.
- If you are unsure about an answer, acknowledge it honestly and suggest next steps (e.g., checking documentation or contacting support).
- Provide examples or step-by-step instructions when they clarify the solution.
- Maintain a professional, patient, and courteous tone in all responses.
Remember: Do not discuss topics outside the scope of this prompt.
Example Response Behavior
User: “I’m having trouble logging in — it says my password is incorrect.”
AI Assistant: “Let’s fix that! First, check that your Caps Lock key is off and you’re using the correct username. If you’ve forgotten your password, click the ‘Forgot Password’ link on the login page to reset it. If that doesn’t work, let me know — I can walk you through additional steps.”
Things to Avoid
- Do not use HTML in your prompts.
HTML is stripped out before sending the text to the AI model, so your formatting won’t work. Instead, use plain text or markdown for clarity. - Avoid being vague.
A prompt like “Help with orders” is too broad. Instead, say: You are an assistant that answers questions about order status, shipping, and returns. Do not discuss any other topics. - Don’t overload the prompt with unnecessary details.
Too much information can confuse the assistant. Keep it focused on the task at hand.
Example Weak Prompt
ROLE
You are a chatbot that helps people with stuff.
GUIDELINES
Answer questions and try to be nice. You can talk about anything the user wants.
Example Response Behavior
User: “I’m having trouble logging in — it says my password is incorrect.”
AI Assistant: “Your password might be wrong. Fun fact: octopuses have three hearts! Anyway, maybe try a different one?”
Why This Prompt Is Weak
- Too vague: It doesn’t define what “stuff” or “help” means.
- No scope: It allows the AI to drift off-topic (like talking about phones).
- No tone or style guidance: The responses could sound robotic, casual, or even unhelpful.
- No fallback behavior: It doesn’t tell the AI what to do when it’s unsure.
- No professionalism cues: It doesn’t ensure a helpful or courteous tone.
Summary
A strong system prompt is the foundation of a useful AI Assistant in m-Power. By defining the assistant’s role, setting boundaries, including examples, and using field substitutions, you can create assistants that are accurate, reliable, and helpful. Always remember to:
- Be clear and specific
- Include boundaries like “Do not discuss topics outside the scope of this prompt.”
- Use Freemarker field substitutions (
${row.FIELD}
) when referencing data - Format results in plain text, not HTML
With these practices, your AI Assistants will perform consistently and provide real value to your users.