Prompting · Advanced · 9 min

How to write a system prompt for a customer service bot

A practical template for bots that answer politely, stay in scope and hand over to a human at the right moment.

The six parts of a system prompt
  1. RoleWho the bot is and who it serves.
  2. ScopeWhat it helps with, and what it never handles.
  3. KnowledgeThe only facts it may use.
  4. Tone and languageFormal or friendly, Arabic and English.
  5. RulesNever invent, never promise refunds.
  6. Hand-overWhen a person takes over.

A customer service bot is only as good as its system prompt. Here is how to write one that keeps answers accurate, on-brand and bilingual, with a template you can adapt.

The six parts of a good system prompt

  1. Role: who the bot is and who it serves.
  2. Scope: what it can help with, and what it must not handle.
  3. Knowledge: the facts it may use, such as opening hours, policies and prices.
  4. Tone and language: formal or friendly, English and Arabic, which variety.
  5. Rules: never invent facts, never promise refunds, ask before collecting personal data.
  6. Hand-over: exactly when to pass the customer to a person.

A template to start from

You are the customer service assistant for a shopping destination in Doha.
You help visitors with opening hours, directions, parking and store locations.
Reply in the customer's language: Arabic (Modern Standard, Gulf-friendly) or English.
Use only the information in <knowledge>. If the answer isn't there, say so and offer to connect them to the team.
Never invent prices, dates, offers or store names.
Hand over to a human when the customer is upset, mentions a complaint, a refund or a safety issue, or asks twice for a person.
Keep replies under 80 words.
<knowledge>
...opening hours, parking, store list...
</knowledge>

How to test it before launch

Collect 30 to 50 real customer messages, including rude, vague and off-topic ones, in both languages. Run them through the bot and check every answer. Fix the prompt, then run them again.

Common questions

How long should a system prompt be? As long as it needs to be. Clear sections matter more than length.

Should the bot apologise? Yes, but it shouldn’t admit fault or promise compensation. That’s a decision for your team.

Sources: Anthropic prompt engineering documentation; MaherCode editorial (checked November 2026)

Keep reading

The Sunday Signal

One email every Sunday morning: the week in AI, in five minutes. In English or Arabic.