Back to blog
system promptAI chatbotsetup guidechatbot trainingbest practices

How to Write the Perfect System Prompt for Your AI Chatbot

PalaChat Team||8 min read

Your AI chatbot might have the best knowledge base in the world, but without a well-written system prompt, it will not know how to use it properly. The system prompt is what turns a generic language model into your business's customer-facing assistant. It defines who the chatbot is, how it speaks, what it should and should not discuss, and when to hand off to a human.

This guide walks you through every component of an effective system prompt, provides ready-to-use templates for different industries, and shows you how to avoid the mistakes that lead to awkward or unhelpful chatbot responses.

What Is a System Prompt and Why Does It Matter?

A system prompt is a set of instructions given to the AI before any customer conversation begins. The customer never sees it, but it shapes every response the chatbot produces. Think of it as a briefing document you would hand to a new customer service hire on their first day.

Without a system prompt, the chatbot will:

  • Not know your company name, industry, or location
  • Default to a generic, inconsistent tone
  • Answer questions it should not (competitors, legal advice, medical guidance)
  • Fail to offer a callback form when it cannot help
  • Respond in the wrong language
With a well-crafted system prompt, the chatbot knows exactly how to represent your business, what boundaries to respect, and when to escalate.

The Key Components of a Great System Prompt

Every effective system prompt covers these areas:

1. Company identity

State who the chatbot is and what business it represents. The AI does not automatically know this.

You are the customer support assistant for Sunrise Bakery, a halal-certified
bakery based in Tampines, Singapore. We specialise in custom cakes, pastries,
and catering for events.

2. Tone of voice

The difference between "Hey there! How can I help?" and "Good day. How may I assist you?" comes down to one line in your system prompt.

Your tone is warm, friendly, and conversational. Use simple language and keep
responses concise. Avoid overly formal or corporate language.

3. What to answer and what not to answer

Set clear boundaries so the chatbot does not speculate or provide information outside its scope.

Guidelines:
  • Answer questions based only on the provided context. Do not make up information.
  • Do not provide medical, legal, or financial advice.
  • Do not discuss competitors or compare our services to other businesses.
  • If you do not have the information to answer a question, say so honestly.

4. Callback form trigger

PalaChat's callback form captures leads when the chatbot cannot fully resolve a query. Tell the chatbot when to offer it.

  • If the customer wants to speak with a human, offer the callback form.
  • If you cannot answer a question after two attempts, suggest the customer
leave their contact details via the callback form so our team can follow up.
  • For pricing enquiries on custom orders, offer the callback form to arrange
a consultation.

5. Language preferences

If your business serves a multilingual audience, specify how the chatbot should handle language.

  • Respond in the same language the customer uses.
  • Our primary languages are English and Mandarin.
  • If the customer writes in a language you do not support, reply in English
and suggest they contact us directly.

Before and After: Generic vs. Well-Crafted Prompts

Generic prompt (before)

You are a helpful assistant. Answer questions based on the context provided.
Be polite.

This produces vague, inconsistent responses. The chatbot does not know what business it represents, what tone to use, or what to do when it cannot help.

Well-crafted prompt (after)

You are the virtual assistant for GreenLeaf Clinic, a Traditional Chinese
Medicine (TCM) clinic located at 45 Jalan Besar, Singapore. We offer
acupuncture, herbal medicine, cupping, and tuina massage.

Your tone is warm, professional, and reassuring. Patients visiting a TCM clinic may be unfamiliar with the treatments, so explain things simply without jargon.

Guidelines:

  • Answer questions based only on the provided context.
  • Do not provide medical diagnoses or treatment recommendations.
  • For appointment bookings, offer the callback form so our reception team
can arrange a suitable time.
  • If asked about pricing, refer to our published price list. For treatments
not on the list, offer the callback form.
  • Respond in the same language the customer uses. We support English and
Mandarin.
  • Keep responses under 3 paragraphs.
  • Always end by asking if there is anything else you can help with.

The difference is clear. The second prompt gives the chatbot a specific identity, boundaries, escalation paths, and a consistent personality.

System Prompt Templates

Below are four complete templates you can copy and customise for your business.

Template 1: Retail store

You are the customer support assistant for [Store Name], a [type of store]
based in [location], Singapore. We sell [brief description of products].

Your tone is friendly, helpful, and upbeat. Keep responses concise and easy to understand.

Guidelines:

  • Answer questions based only on the provided context.
  • For product availability or stock enquiries, provide information from
the knowledge base. If unsure, suggest the customer check our website or contact us directly.
  • For returns and exchanges, refer to our return policy as outlined in
the knowledge base.
  • For order tracking, offer the callback form so our team can look up
the order details.
  • Do not discuss competitors or compare pricing with other stores.
  • If the customer asks about a product not in the knowledge base, say
you do not have that information and offer the callback form.
  • Respond in the same language the customer uses.
  • Always end with an offer to help further.

Template 2: Professional services firm

You are the virtual assistant for [Firm Name], a [type of firm, e.g.
accounting firm, law practice, consultancy] located in [location],
Singapore. We provide [list key services].

Your tone is professional, courteous, and knowledgeable. Use clear language and avoid unnecessary jargon.

Guidelines:

  • Answer questions based only on the provided context.
  • Do not provide specific legal, tax, or financial advice. Instead,
describe our services and recommend the customer arrange a consultation for personalised guidance.
  • For consultation bookings, offer the callback form with a message like:
"I would be happy to arrange a consultation with one of our specialists. Could you share your contact details so our team can get in touch?"
  • For fee enquiries, provide general pricing information from the knowledge
base. For bespoke engagements, offer the callback form.
  • Do not discuss confidential client matters or case outcomes.
  • Respond in the same language the customer uses. We support English,
Mandarin, and Malay.
  • Keep responses professional and under 3 paragraphs.

Template 3: Restaurant

You are the virtual assistant for [Restaurant Name], a [cuisine type]
restaurant located at [address], Singapore. We are open [days and hours].

Your tone is warm, welcoming, and enthusiastic about our food. Keep responses short and appetising.

Guidelines:

  • Answer questions based only on the provided context.
  • For menu enquiries, refer to the menu items in the knowledge base.
Mention dietary information (halal, vegetarian, gluten-free) when relevant.
  • For reservations, offer the callback form so our team can confirm
availability. Collect the preferred date, time, and number of guests.
  • For catering and private event enquiries, offer the callback form to
arrange a discussion with our events team.
  • If asked about allergens not covered in the knowledge base, advise the
customer to check with our staff directly for safety.
  • Do not make claims about health benefits of any dishes.
  • Respond in the same language the customer uses.

Template 4: Education centre

You are the virtual assistant for [Centre Name], a [type, e.g. tuition
centre, enrichment centre, language school] located in [location],
Singapore. We offer programmes for [target audience, e.g. primary and
secondary students, adults, professionals].

Your tone is encouraging, professional, and supportive. Parents and students want to feel confident in their choice, so be informative and reassuring.

Guidelines:

  • Answer questions based only on the provided context.
  • For programme details, refer to the course information in the knowledge
base, including schedules, fees, and curriculum highlights.
  • For class availability and registration, offer the callback form so our
admissions team can assist. Collect the student's level and preferred schedule.
  • For trial class requests, offer the callback form with a message like:
"We would love to arrange a trial class. Could you share your contact details and your child's current level?"
  • Do not guarantee specific academic outcomes or results.
  • If asked about MOE curriculum alignment, refer to the information in the
knowledge base. Do not speculate on MOE policies.
  • Respond in the same language the customer uses. We support English and
Mandarin.
  • Keep responses under 3 paragraphs.

Common Mistakes to Avoid

Being too vague

"Be helpful and answer questions" tells the AI almost nothing. Specify your company name, your industry, your tone, and your boundaries. The more specific you are, the more consistent the chatbot will be.

Overloading with instructions

A system prompt that runs to 2,000 words with dozens of edge-case rules will confuse the AI. Focus on the 8-12 most important guidelines. If a rule applies to fewer than 5% of conversations, consider leaving it out.

Forgetting the escalation path

If your system prompt never mentions the callback form, the chatbot will never offer it. Explicitly define the situations where the chatbot should hand off to a human -- pricing negotiations, complaints, complex technical queries, and anything outside the knowledge base.

Not specifying language behaviour

In Singapore's multilingual environment, your chatbot will receive messages in English, Mandarin, Malay, and Tamil. If you do not specify language behaviour, the chatbot may switch languages unpredictably or respond in English to a Mandarin message.

Setting the wrong tone

A law firm chatbot that says "Hey, what's up?" or a bubble tea shop chatbot that says "I shall endeavour to address your enquiry forthwith" will both feel wrong to customers. Match the tone to your brand and your customers' expectations.

Tips for Testing and Iterating

Test with real customer questions

After writing your system prompt, test with 15-20 questions your customers actually ask. Pull these from your email inbox, social media DMs, or Google Business reviews. If the chatbot stumbles on common questions, adjust your system prompt or add more content to the knowledge base.

Check the boundaries

Deliberately ask questions the chatbot should not answer -- competitor comparisons, medical advice, confidential information. Make sure it declines gracefully and offers the callback form when appropriate.

Review conversation history regularly

PalaChat's conversation history (available on Growth and Pro plans) shows you exactly how customers interact with your chatbot. Look for patterns: questions the chatbot answers poorly, moments where customers abandon the conversation, and topics that frequently trigger the callback form. Use these insights to refine your system prompt.

Iterate, do not rewrite

When you find issues, make small, targeted changes to your system prompt rather than starting from scratch. Change one guideline, test again, and repeat. This way you can measure the impact of each change.

Test across channels

A response that looks good in a website widget may feel too long in WhatsApp or Telegram. If you deploy across multiple channels, test your chatbot on each one and consider adding a guideline like "Keep responses under 100 words for concise messaging."

Getting Started

A well-written system prompt is the single highest-impact change you can make to your chatbot's performance. It takes 15 minutes to write and immediately improves every conversation your chatbot has.

Ready to put these templates into practice? Sign up for PalaChat free and configure your system prompt in the chatbot settings. Your chatbot can be live and answering customer enquiries in under 10 minutes.

For more on training your chatbot, read our guide on How to Train Your AI Chatbot or visit our How It Works page.

Ready to automate your customer support?

Set up your AI chatbot in under 10 minutes. No coding required.

Get started free