Back to blog
Guides

How to Write a System Prompt That Actually Works

1 Apr 2026·6 min read

The system prompt is the set of instructions you give your AI chatbot before every conversation. It shapes the bot's personality, scope, and behaviour — and it's the single biggest lever for improving response quality. A well-written prompt turns a generic AI into a knowledgeable, on-brand representative of your business. A vague one produces watered-down, inconsistent answers.

The Four Things Every System Prompt Should Cover

Think of your system prompt as a brief for a new customer service employee. You'd tell them: who you are, what they're allowed to discuss, how to speak, and what to do when they're stuck. The same four elements belong in every system prompt.

1. Define the Role

Start with a clear statement of who the bot is and what business it represents. This grounds the entire conversation.

You are a helpful support assistant for Coastal Tiles, an Australian retailer specialising in premium wall and floor tiles for residential and commercial projects.

One sentence is enough. Avoid phrases like "You are a helpful AI assistant" — this tells the bot nothing about your business and encourages it to draw on general internet knowledge.

2. Set the Scope

Tell the bot explicitly what it should and shouldn't discuss. Scope limits prevent the bot from making things up when asked about topics that aren't in your knowledge base.

Only answer questions using the information in the knowledge base. If a question is outside your knowledge (pricing for a specific project, custom orders, stock at a specific location), say so clearly and direct the customer to call [phone] or email [email].

The key instruction is "only answer using the knowledge base." Without this, the model may supplement your content with general knowledge — which is where hallucinations creep in.

3. Set the Tone

Your chatbot should sound like your brand. A funeral home and a surf shop have very different tones, and that should come through in the bot's responses.

Be friendly, warm, and concise. Avoid jargon. Use Australian English (not American English). Keep responses to 2–4 sentences unless a detailed explanation is clearly needed.

If your business has a brand voice guide, use it here. "Energetic and casual" or "professional and reassuring" are both valid — what matters is consistency.

4. Provide Fallback Instructions

Every bot will eventually encounter a question it can't answer. Without fallback instructions, it may waffle, make things up, or give a frustrating non-answer.

If you can't answer a question from the knowledge base, say "I don't have that specific information, but our team can help — you can reach us at [email] or call [phone] Monday to Friday, 8am–5pm AEST."

A good fallback turns a dead-end into a warm handoff. It also sets a clear expectation so customers aren't left wondering if the bot is broken.

Putting It Together

Here's a complete example for a tile retailer:

You are a helpful support assistant for Coastal Tiles, an Australian retailer of premium wall and floor tiles. Answer questions using only the information in the knowledge base. Be friendly, concise, and use Australian English. If a question is about project-specific pricing, custom orders, or stock at a specific store, let the customer know you don't have that information and invite them to call 1300 XXX XXX or email hello@coastaltiles.com.au.

Keep your system prompt under 200 words. Longer prompts can dilute the bot's focus — the instructions you want it to follow most reliably should be short and prominent.

Test and Iterate

After setting your prompt, use the chatbot's Preview function to test it against real questions. If responses are too long, add "be concise." If it's going off-topic, tighten the scope. Check the Insights tab after a week of live traffic — the knowledge gaps section will show you exactly where the bot is struggling.

Ready to try Klaira?

Train a chatbot on your own content and embed it on your website — no code required.

Request Beta Access