{"id":14660,"date":"2025-10-09T16:08:15","date_gmt":"2025-10-09T21:08:15","guid":{"rendered":"https:\/\/www.mrc-productivity.com\/docs\/?post_type=ht_kb&#038;p=14660"},"modified":"2025-11-03T11:17:37","modified_gmt":"2025-11-03T17:17:37","slug":"ai-system-prompt","status":"publish","type":"ht_kb","link":"https:\/\/www.mrc-productivity.com\/docs\/knowledge-base\/ai-system-prompt","title":{"rendered":"Writing a System Prompt for AI"},"content":{"rendered":"\n<p>When creating an AI Assistant in m-Power, one of the most important steps is writing a clear and effective <strong>system prompt<\/strong>. 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.<\/p>\n\n\n\n<p>Think of the system prompt as the \u201cinstruction manual\u201d for your assistant\u2014if the manual is unclear, the assistant won\u2019t perform the way you expect.<\/p>\n\n\n\n<p>A well-written prompt helps in several ways:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Consistency:<\/strong> The assistant responds in a predictable way each time.<\/li>\n\n\n\n<li><strong>Accuracy:<\/strong> Clear instructions reduce the chance of irrelevant or off-topic answers.<\/li>\n\n\n\n<li><strong>Boundaries:<\/strong> You can prevent the assistant from drifting into topics that don\u2019t apply to your business.<\/li>\n\n\n\n<li><strong>Efficiency:<\/strong> The assistant needs fewer corrections and produces results faster.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Best Practices<\/h2>\n\n\n\n<p>Here are some best practices to follow:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Define the assistant\u2019s role clearly<\/strong>\n<ul class=\"wp-block-list\">\n<li>Example: <em>You are a support assistant for an online retail company. Your job is to help users with questions about orders, products, and shipping.<\/em><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Be specific about scope<\/strong>\n<ul class=\"wp-block-list\">\n<li><strong>Always <\/strong>include a boundary statement like: <em>Do not discuss topics outside the scope of this prompt.<\/em><\/li>\n\n\n\n<li>This ensures your assistant doesn\u2019t wander into unrelated areas.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Give examples of input and output (when possible)<\/strong>\n<ul class=\"wp-block-list\">\n<li>Example: <em>If a customer asks, \u201cWhere is my order?\u201d, respond with: \u201cYour order is currently in status: ${row.OSTATUS}.\u201d<\/em><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Tell the assistant how to handle uncertainty<\/strong>\n<ul class=\"wp-block-list\">\n<li>Example: <em>If you don\u2019t know the answer, do not guess. Instead respond with: \u201cI\u2019m not sure about that, but you can contact a representative for confirmation.\u201d<\/em><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Specify formatting rules<\/strong>\n<ul class=\"wp-block-list\">\n<li>Example: <em>Use short paragraphs and bullet points for readability.<\/em><\/li>\n\n\n\n<li>Or, <em>Always return results in JSON format.<\/em><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Keep it short, but complete<\/strong>\n<ul class=\"wp-block-list\">\n<li>Long-winded prompts can confuse the model. Focus on what matters most.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Example Strong Prompt<\/h3>\n\n\n\n<p>ROLE<\/p>\n\n\n\n<p>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.<\/p>\n\n\n\n<p>GUIDELINES<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Stay focused on helpdesk-related topics such as troubleshooting, account access, or feature guidance.<\/li>\n\n\n\n<li>Be concise and clear \u2014 avoid unnecessary jargon or overly long explanations.<\/li>\n\n\n\n<li>If you are unsure about an answer, acknowledge it honestly and suggest next steps (e.g., checking documentation or contacting support).<\/li>\n\n\n\n<li>Provide examples or step-by-step instructions when they clarify the solution.<\/li>\n\n\n\n<li>Maintain a professional, patient, and courteous tone in all responses.<\/li>\n<\/ol>\n\n\n\n<p>Remember: Do not discuss topics outside the scope of this prompt.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example Response Behavior<\/h3>\n\n\n\n<p><strong>User:<\/strong> \u201cI\u2019m having trouble logging in \u2014 it says my password is incorrect.\u201d<br><strong>AI Assistant:<\/strong> \u201cLet\u2019s fix that! First, check that your Caps Lock key is off and you\u2019re using the correct username. If you\u2019ve forgotten your password, click the <strong>\u2018Forgot Password\u2019<\/strong> link on the login page to reset it. If that doesn\u2019t work, let me know \u2014 I can walk you through additional steps.\u201d<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Things to Avoid<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Do not use HTML in your prompts.<\/strong><br>HTML is stripped out before sending the text to the AI model, so your formatting won\u2019t work. Instead, use plain text or markdown for clarity.<\/li>\n\n\n\n<li><strong>Avoid being vague.<\/strong><br>A prompt like <em>\u201cHelp with orders\u201d<\/em> is too broad. Instead, say: <em>You are an assistant that answers questions about order status, shipping, and returns. Do not discuss any other topics.<\/em><\/li>\n\n\n\n<li><strong>Don\u2019t overload the prompt with unnecessary details.<\/strong><br>Too much information can confuse the assistant. Keep it focused on the task at hand.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Example Weak Prompt<\/h3>\n\n\n\n<p>ROLE<\/p>\n\n\n\n<p>You are a chatbot that helps people with stuff.<\/p>\n\n\n\n<p>GUIDELINES<\/p>\n\n\n\n<p>Answer questions and try to be nice. You can talk about anything the user wants.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example Response Behavior<\/h3>\n\n\n\n<p><strong>User:<\/strong> \u201cI\u2019m having trouble logging in \u2014 it says my password is incorrect.\u201d<br><strong>AI Assistant:<\/strong> \u201cYour password might be wrong. Fun fact: octopuses have three hearts! Anyway, maybe try a different one?\u201d<\/p>\n\n\n\n<p><strong>Why This Prompt Is Weak<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Too vague:<\/strong> It doesn\u2019t define what \u201cstuff\u201d or \u201chelp\u201d means.<\/li>\n\n\n\n<li><strong>No scope:<\/strong> It allows the AI to drift off-topic (like talking about phones).<\/li>\n\n\n\n<li><strong>No tone or style guidance:<\/strong> The responses could sound robotic, casual, or even unhelpful.<\/li>\n\n\n\n<li><strong>No fallback behavior:<\/strong> It doesn\u2019t tell the AI what to do when it\u2019s unsure.<\/li>\n\n\n\n<li><strong>No professionalism cues:<\/strong> It doesn\u2019t ensure a helpful or courteous tone.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<p>A strong system prompt is the foundation of a useful AI Assistant in m-Power. By defining the assistant\u2019s role, setting boundaries, including examples, and using field substitutions, you can create assistants that are accurate, reliable, and helpful. Always remember to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Be clear and specific<\/li>\n\n\n\n<li>Include boundaries like \u201cDo not discuss topics outside the scope of this prompt.\u201d<\/li>\n\n\n\n<li>Use Freemarker field substitutions (<code>${row.FIELD}<\/code>) when referencing data<\/li>\n\n\n\n<li>Format results in plain text, not HTML<\/li>\n<\/ul>\n\n\n\n<p>With these practices, your AI Assistants will perform consistently and provide real value to your users.<\/p>\n\n\n\n<p><strong><a href=\"https:\/\/www.mrc-productivity.com\/docs\/knowledge-base\/ai-system-prompt-helper\" target=\"_blank\" rel=\"noreferrer noopener\">Click here to learn how to have AI help write your System Prompt.<\/a><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The System Prompt page is part of the AI Assistant template, and this document will cover best practices and tips for writing effective prompt pages.<\/p>\n","protected":false},"author":1,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[313],"ht-kb-tag":[314],"class_list":["post-14660","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-artificial-intelligence-ai","ht_kb_tag-ai"],"_links":{"self":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/14660","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/comments?post=14660"}],"version-history":[{"count":9,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/14660\/revisions"}],"predecessor-version":[{"id":14963,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb\/14660\/revisions\/14963"}],"wp:attachment":[{"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/media?parent=14660"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb-category?post=14660"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.mrc-productivity.com\/docs\/wp-json\/wp\/v2\/ht-kb-tag?post=14660"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}