Lesson 14.4: Writing Better Agent Instructions

Module 14: Agent Builder

Lesson 14.4: Writing Better Agent Instructions

Intermediate Last verified: 2026-06-02
Availability and governance note: Agent Builder availability, builder permissions, sharing, publish options, and supported knowledge sources can vary by tenant, license, admin controls, and rollout.

Lesson Promise

Write instructions that shape consistent, useful, and safer agent behavior.

Real-World Scenario

A prototype answers some questions well, but it rambles, invents policy details, and gives different answer formats each time.

Core Concept

Instructions are the agent's operating rules. They should be specific enough to reduce drift without pretending to control every possible response.

Strong instructions include purpose, audience, allowed sources, output structure, escalation, refusal behavior, and quality checks.

Instructions should be tested and revised like product copy, not written once and forgotten.

Step-By-Step Workflow

  1. Start with a purpose sentence and target audience.
  2. Define allowed and excluded topics.
  3. Specify the answer structure users should receive.
  4. Tell the agent when to ask a clarifying question.
  5. Tell the agent when to say it cannot answer from the approved sources.
  6. Add examples of good responses and revise after testing.

Prompt Lab

Bad Prompt

Be accurate and concise.

Better Prompt

Use only the approved renewal playbook. Answer in three sections: short answer, source-based detail, next step. If the source is missing, say you cannot confirm and route to RevOps.

Expert Prompt

Rewrite these rough agent instructions into production-ready instructions. Include purpose, audience, allowed sources, excluded topics, answer format, citation/source expectations, uncertainty handling, escalation path, tone, and examples of acceptable and unacceptable responses.

Hands-On Exercise

Rewrite a vague instruction set into a clear operating policy.

Deliverable

A production-ready instruction block with examples.

Agent Builder Review Checklist

Common Mistakes

  • Building a broad general helper instead of a focused role-based agent.
  • Adding messy or outdated files and expecting the agent to infer what matters.
  • Skipping refusal instructions for policy, legal, financial, HR, or customer-impacting questions.
  • Testing only the happy path and missing vague, hostile, or sensitive prompts.
  • Sharing an agent before ownership, feedback, and update routines are clear.
Pro tip: Write agent instructions like operating policy: purpose, audience, allowed sources, preferred structure, quality rules, and what to do when the answer is uncertain.

Quiz / Checkpoint

What should instructions say about missing information?

They should tell the agent to acknowledge uncertainty, avoid inventing, and route the user to the right human or source.

Official Sources To Verify

For AI founders and marketers

Want your AI product explained to a large AI-native audience?

Kingy AI helps AI companies turn complex products into clear, useful YouTube videos that drive awareness, product understanding, demos, clicks, and search visibility.