{"id":1480,"date":"2025-12-07T08:55:57","date_gmt":"2025-12-07T08:55:57","guid":{"rendered":"https:\/\/bogdanburuiana.com\/?p=1480"},"modified":"2026-04-27T09:10:14","modified_gmt":"2026-04-27T09:10:14","slug":"agent-instructions-the-skill-nobody-talks-about-enough","status":"publish","type":"post","link":"https:\/\/bogdanburuiana.com\/index.php\/2025\/12\/07\/agent-instructions-the-skill-nobody-talks-about-enough\/","title":{"rendered":"Agent Instructions: The Skill Nobody Talks About Enough"},"content":{"rendered":"\n<p>Here&#8217;s a pattern I&#8217;ve seen repeated across dozens of AI projects: teams spend weeks selecting the right model, configuring the infrastructure, setting up integrations &#8211; and then write the agent instructions in about ten minutes.<br>Then they&#8217;re surprised when the agent behaves inconsistently.<br>The instructions field isn&#8217;t a formality. It&#8217;s the most important configuration decision you&#8217;ll make. Getting it right is part craft, part discipline, and entirely learnable. Let me show you how I think about it.<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>What Instructions Actually Do<\/strong><br>When you configure an agent in Azure AI Foundry (or any agent framework), the instructions become part of the system prompt &#8211; the persistent context the LLM receives with every single conversation turn. They shape:<\/p>\n\n\n\n<ul>\n<li>How the agent understands its role<\/li>\n\n\n\n<li>What constraints it operates within<\/li>\n\n\n\n<li>How it handles ambiguous situations<\/li>\n\n\n\n<li>What tone and format it uses when responding<\/li>\n\n\n\n<li>When it should ask for clarification vs. proceed<\/li>\n<\/ul>\n\n\n\n<p>Think of it as the onboarding document you&#8217;d write for a new, very literal-minded employee who follows instructions exactly as written.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>A Real Example: Travel Booking Agent<\/strong><br><\/p>\n\n\n\n<p class=\"has-vivid-red-color has-text-color has-link-color wp-elements-213fb042ff45c418bd62ccec155ff168\"><strong>Weak instructions: <\/strong>You are a travel booking assistant. Help users book travel.<\/p>\n\n\n\n<p class=\"has-vivid-green-cyan-color has-text-color has-link-color wp-elements-bfb1d85cd0160a228fabc50622a5dc44\"><strong>Strong instructions:<\/strong> You are a travel booking and expense management assistant<br>designed to help employees plan, book, and manage business<br>travel. Always confirm trip dates and budget before making bookings.<br>Prefer direct flights when the cost difference is less than 20%<br>compared to connecting flights. Never book accommodation outside approved vendor list.<br>If the user&#8217;s request exceeds their allocated travel budget,<br>flag this explicitly before proceeding and ask for manager<br>approval confirmation.<\/p>\n\n\n\n<p>Same agent. Same model. Same tools. Completely different behaviour &#8211; and completely different risk profile for the business.<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>The Four Elements of Strong Instructions<\/strong><br>After writing (and debugging) a lot of agent configurations, I&#8217;ve settled on four elements that every instruction set needs:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"555\" src=\"\/wp-content\/uploads\/2026\/04\/image-7-1024x555.png\" alt=\"\" class=\"wp-image-1481\" srcset=\"\/wp-content\/uploads\/2026\/04\/image-7-1024x555.png 1024w, \/wp-content\/uploads\/2026\/04\/image-7-300x163.png 300w, \/wp-content\/uploads\/2026\/04\/image-7-768x416.png 768w, \/wp-content\/uploads\/2026\/04\/image-7.png 1440w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>Element 1: Role<\/strong><br>This seems obvious, but the specificity matters. &#8220;You are a customer service assistant&#8221; is not a role. A role includes context about the business, the user base, and the purpose.<br>&#8211; <em>Weak: You are a customer service assistant.<\/em><br>&#8211; <em>Strong: You are the first-line support assistant for a SaaS platform (subscription management and billing). You interact with small business owners who have limited technical knowledge. Your primary goal is to resolve billing queries, subscription changes, and account access issues without escalating to a human agent when possible.<\/em><br>The LLM uses that context to calibrate every response &#8211; the vocabulary it uses, how much it explains, what it treats as in-scope.<\/p>\n\n\n\n<p><strong>Element 2: Behaviour<\/strong><br>This is about operational style. How does the agent communicate? What does it do first? How does it format responses?<br>Examples of useful behavioural instructions:<\/p>\n\n\n\n<ul>\n<li>Always summarise the action you&#8217;re about to take before taking it.<\/li>\n\n\n\n<li>Use bullet points for lists of more than three items.<\/li>\n\n\n\n<li>If the user seems frustrated, acknowledge their frustration before proceeding.<\/li>\n\n\n\n<li>Respond in the same language the user writes in.<\/li>\n\n\n\n<li>Never provide legal or medical advice &#8211; redirect to appropriate professionals.<\/li>\n<\/ul>\n\n\n\n<p>These aren&#8217;t constraints (Element 3) &#8211; they&#8217;re style and process guidelines. The distinction matters because you&#8217;ll edit them for different reasons.<\/p>\n\n\n\n<p><strong>Element 3: Constraints<\/strong><br>This is the safety layer. Constraints are things the agent must never do, or must always check before doing.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"526\" src=\"\/wp-content\/uploads\/2026\/04\/image-8-1024x526.png\" alt=\"\" class=\"wp-image-1483\" srcset=\"\/wp-content\/uploads\/2026\/04\/image-8-1024x526.png 1024w, \/wp-content\/uploads\/2026\/04\/image-8-300x154.png 300w, \/wp-content\/uploads\/2026\/04\/image-8-768x395.png 768w, \/wp-content\/uploads\/2026\/04\/image-8.png 1440w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>I&#8217;d argue constraints are where the security posture of your agent lives. <strong>A missing constraint is an attack surface.<\/strong> You can see agents manipulated into revealing information they shouldn&#8217;t because nobody write &#8220;never disclose internal pricing structures to users outside the enterprise network&#8221;.<\/p>\n\n\n\n<p><strong>Element 4: Handling Ambiguity<\/strong><br>This one is underrated. What does your agent do when it doesn&#8217;t have enough information to proceed confidently?<br>Options to specify:<\/p>\n\n\n\n<ul>\n<li>Ask for clarification &#8211; If the user&#8217;s request is ambiguous, ask one clarifying question before proceeding.<\/li>\n\n\n\n<li>State assumptions &#8211; If information is missing, state the assumption you&#8217;re making before acting on it.<\/li>\n\n\n\n<li>Escalate &#8211; If you cannot resolve the issue within three attempts, offer to connect the user with a human agent.<\/li>\n\n\n\n<li>Decline gracefully &#8211; If the request is outside your scope, explain what you can help with instead.<\/li>\n<\/ul>\n\n\n\n<p>Without this guidance, agents tend to make up the missing information or proceed with false confidence. Both are worse than asking a clarifying question.<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Common Mistakes<\/strong><\/p>\n\n\n\n<ol>\n<li>Instructions that are too short<br><em>Two sentences is not a system prompt. The LLM needs enough context to handle the full range of scenarios your users will throw at it.<\/em><\/li>\n\n\n\n<li>Contradictory instructions<br><em>&#8220;Be concise&#8221; and &#8220;always provide a detailed explanation&#8221; in the same prompt creates unpredictable behaviour. Review for internal consistency.<\/em><\/li>\n\n\n\n<li>No failure handling<br><em>If a tool call fails, what should the agent do? If the user&#8217;s request is clearly malicious, how should it respond? Silence on edge cases means the model makes its own decisions.<\/em><\/li>\n\n\n\n<li>Instructions that describe desired output instead of behaviour<br><em>&#8220;Give excellent responses&#8221; is not an instruction. &#8220;Always provide three concrete examples when explaining a technical concept&#8221; is.<\/em><\/li>\n\n\n\n<li>Never testing adversarial inputs<br><em>Write your instructions, then try to break them. Ask the agent to do something outside its scope. Provide contradictory information. Try to get it to ignore its constraints. If it breaks, your instructions aren&#8217;t done yet.<\/em><\/li>\n<\/ol>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Pros and Cons of Instruction-Heavy Configuration<\/strong><br><strong>Pros:<\/strong><\/p>\n\n\n\n<ul>\n<li>No code changes needed to alter agent behaviour &#8211; just update instructions<\/li>\n\n\n\n<li>Accessible to non-developers (product owners, domain experts can contribute)<\/li>\n\n\n\n<li>Fast iteration cycle &#8211; change, test, observe<\/li>\n\n\n\n<li>Audit trail if you store instructions in version control<\/li>\n<\/ul>\n\n\n\n<p><strong>Cons:<\/strong><\/p>\n\n\n\n<ul>\n<li>LLMs don&#8217;t follow instructions with 100% consistency &#8211; you need testing<\/li>\n\n\n\n<li>Complex constraints can conflict with each other in unpredictable ways<\/li>\n\n\n\n<li>Very long instruction sets can consume significant context window tokens<\/li>\n\n\n\n<li>Requires domain expertise &#8211; you need to know what the agent should do before you can write it down<\/li>\n<\/ul>\n\n\n\n<p><strong>My Framework for Writing Instructions<\/strong><br><em>I use this process whenever I&#8217;m building a new agent:<\/em><\/p>\n\n\n\n<ul>\n<li>Start with the user journey &#8211; what does the user want to accomplish?<\/li>\n\n\n\n<li>Map the failure modes &#8211; what are the five worst things this agent could do?<\/li>\n\n\n\n<li>Write the role &#8211; one paragraph, specific and contextual<\/li>\n\n\n\n<li>Write the constraints first &#8211; safety before capability<\/li>\n\n\n\n<li>Add behaviour guidelines &#8211; style, format, escalation paths<\/li>\n\n\n\n<li>Specify ambiguity handling &#8211; what does it do when unsure?<\/li>\n\n\n\n<li>Test with ten real scenarios &#8211; including at least three edge cases<\/li>\n\n\n\n<li>Iterate &#8211; treat instructions as a living document<\/li>\n<\/ul>\n\n\n\n<p>The instructions you write on day one are not the instructions you&#8217;ll run in production. That&#8217;s normal. The discipline is in the iteration.<\/p>\n\n\n\n<p>In the next article, I&#8217;ll cover tools &#8211; the other half of the agent equation. Because even perfect instructions can&#8217;t make an agent useful if it doesn&#8217;t have access to the right actions.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s a pattern I&#8217;ve seen repeated across dozens of AI projects: teams spend weeks selecting the right model, configuring the infrastructure, setting up integrations &#8211; and then write the agent instructions in about ten minutes.Then they&#8217;re surprised when the agent behaves inconsistently.The instructions field isn&#8217;t a formality. It&#8217;s the most important configuration decision you&#8217;ll make. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/bogdanburuiana.com\/index.php\/wp-json\/wp\/v2\/posts\/1480"}],"collection":[{"href":"https:\/\/bogdanburuiana.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bogdanburuiana.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bogdanburuiana.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bogdanburuiana.com\/index.php\/wp-json\/wp\/v2\/comments?post=1480"}],"version-history":[{"count":3,"href":"https:\/\/bogdanburuiana.com\/index.php\/wp-json\/wp\/v2\/posts\/1480\/revisions"}],"predecessor-version":[{"id":1485,"href":"https:\/\/bogdanburuiana.com\/index.php\/wp-json\/wp\/v2\/posts\/1480\/revisions\/1485"}],"wp:attachment":[{"href":"https:\/\/bogdanburuiana.com\/index.php\/wp-json\/wp\/v2\/media?parent=1480"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bogdanburuiana.com\/index.php\/wp-json\/wp\/v2\/categories?post=1480"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bogdanburuiana.com\/index.php\/wp-json\/wp\/v2\/tags?post=1480"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}