Basics·5 min read

Writing Better Bot Instructions

Your bot is only as good as its instructions. Practical tips for clear, reliable agent behavior.

Writing Better Bot Instructions

The instructions block is your bot's persona and standing orders. Small wording changes make a big difference in reliability. Here's what works.

Be specific about the job

Vague: "You help with support." Better: "You answer billing questions using the knowledge base. If you don't know, say so and offer to escalate."

A clear scope keeps the bot from wandering or making things up.

Tell it when to use tools

Models sometimes skip a tool if the prompt doesn't push them to. Spell it out:

"Always search the web before answering questions about current events. Base your answer on the results."

Define the output shape

If you need a specific format, say so: "Reply in 2–3 sentences," or "Return a bulleted list of action items." Downstream workflow steps are far easier to wire when output is predictable.

Handle the unknown

Give it a fallback: "If the user's request is outside your scope, politely say what you can help with instead." This prevents confident-but-wrong answers.

Keep it focused

One bot, one job. A Researcher → Writer → Reviewer pipeline of focused bots beats a single bot told to do everything. Compose them in a swarm or workflow.

Iterate with real inputs

Test with the messages your users actually send, not just clean examples. Watch where it stumbles and tighten the instructions accordingly.

Next steps

Quick tip

Use the test pane to iterate quickly. Every change you make is live — no need to save first.

Important

API keys are shown only once. Store them securely and never commit them to version control.

Best practice

Test your bot with edge cases before deployment. Try empty inputs, long messages, and special characters.

Pro tip

Chain multiple specialized bots in a workflow for better results than one general-purpose bot.

Writing Better Bot Instructions