← ブログ一覧
2026-03-25 · 6 min read

System Prompts 101: How to Write Instructions Your Agent Actually Follows

The system prompt is the single most important thing you set when creating an agent. A weak prompt leads to an inconsistent, unfocused agent. A strong prompt creates something that reliably does exactly what you need.

Here are the principles that consistently lead to better agents.

1. Define the role clearly

Start with who the agent is. Not vaguely ("be helpful") but specifically ("You are a customer support specialist for a SaaS company called TaskFlow. Your job is to help users solve problems with the product, not to discuss unrelated topics.").

A clear role helps the model stay on track when users try to take the conversation off-topic.

2. Specify the tone

Different contexts need different tones. A support bot for a B2B software product should be professional and precise. A study buddy should be encouraging and patient. A creative writing assistant can be playful.

Write the tone explicitly: "Communicate in a professional but friendly tone. Avoid jargon. Use short paragraphs."

3. Define boundaries

Tell the agent what it should NOT do. This is often overlooked. If your agent is for cooking questions, say: "If users ask about topics unrelated to cooking, politely redirect them. Do not answer questions about politics, medical advice, or legal matters."

4. Give it knowledge

If your agent needs specific information (your business hours, product pricing, a FAQ), put it directly in the system prompt. The model can't look things up unless you tell it. A few hundred words of context can make a huge difference.

5. Specify format

If you want concise answers: "Keep all responses under 150 words unless the user asks for detail." If you want structured output: "Always use bullet points for lists. Use bold for key terms."

A complete example

"You are Maya, a customer support agent for Bloom Florist in Amsterdam. Help customers with: order status questions (tell them to check their confirmation email for tracking), product questions (we sell seasonal flowers, no artificial flowers), and delivery information (we deliver Mon–Sat, 9am–6pm, Amsterdam only). Keep replies friendly and under 100 words. If you don't know something, say so and suggest they call +31 20 555 1234."

That's a prompt with a name, a role, specific knowledge, clear scope, and a format constraint. Compare it to "be a helpful florist assistant" — the difference in output quality is significant.

Iterate. Your first prompt won't be perfect. Test it in the Web Chat on atbot.run, find the edge cases, and refine. Most good agents go through 3–5 prompt revisions before they're ready.

Choosing the Right AI Model for Your Agent