Bots

Prompt engineering tips

Writing effective prompts is key to getting the best performance from your Chat Thing bot. A well-crafted prompt helps your bot understand its role, maintain consistency, and deliver responses that match your brand's voice.

Here are six practical tips to help you create better bot prompts.


1. Tell your bot who it IS

Instead of just describing what your bot should do, define its personality traits and characteristics. This shapes how it communicates at a fundamental level.

Don't just say:

You are a customer support assistant.

Instead, define personality traits:

You are helpful, patient, and empathetic. You remain calm under pressure and always prioritize the customer's needs. You're knowledgeable but never condescending.

The personality you define will influence every interaction. A "helpful and patient" bot will naturally respond differently than one that's "efficient and direct."


2. Give context about who it works for

Help your bot understand the business it represents. Include a brief description of your company, what you do, and your values.

Example:

You work for Acme Analytics, a SaaS company that helps small businesses understand their data. We value simplicity, transparency, and making complex things accessible to everyone.

This context helps your bot:

  • Answer questions in a way that aligns with your brand
  • Understand the type of customers it's serving
  • Make appropriate references to your products or services

3. Add explicit Don'ts

Be specific about what your bot should NOT do. This is especially important for setting boundaries and keeping conversations on topic.

Examples:

Don't:
- Provide legal or medical advice
- Make promises about future features
- Discuss competitor products
- Answer questions outside of our documentation and knowledge base
💡

Scope limiter tip

Include a scope limiter to keep your bot focused: "Only answer questions related to your product/service. For other topics, politely redirect users to the appropriate resource."


4. Set the tone with examples

Don't just tell your bot to "be friendly" or "be professional" — show it what that looks like with concrete examples.

Instead of:

Answer in a friendly, casual tone.

Show with examples:

User: "How do I reset my password?"
Good response: "No problem! Head to your account settings, click 'Security', and you'll see a 'Reset Password' button. If you run into any issues, just let me know!"

Bad response: "Navigate to account configuration panel. Locate security subsection. Execute password reset protocol."

These examples give your bot a clear template for matching your desired style.


5. Give it a fallback behaviour

Define exactly what your bot should do when it doesn't know the answer or encounters an edge case.

Example fallback behaviour:

If you don't know the answer or the information isn't in the provided context:
- Say "I don't have that information in my knowledge base right now."
- Offer to help with something else: "Is there anything else I can help you with?"
- Never make up information or guess
â„šī¸

Why this matters

Without a fallback behaviour, your bot might make things up, give vague answers, or simply say "I don't know" without offering any alternatives. A defined fallback keeps the conversation moving productively.


6. Keep responses short and control formatting

Long-winded responses lose users. Set clear expectations for response length and format.

Example formatting rules:

Response guidelines:
- Keep answers under 100 words when possible
- Use bullet points for lists or steps
- Use bold for important terms or warnings
- Break long explanations into shorter paragraphs
- Always respond using markdown format

For technical documentation, you might also specify:

- Include code snippets in code blocks with appropriate language tags
- Use headings to structure longer responses
- Include links to relevant documentation pages

Complete prompt template

Here's a template that brings all six tips together. Customize it for your specific use case:

You are [personality traits]. You work for [company name], [brief company description and values].

You will be given information in markdown format to help answer questions.
Please answer questions using the following context only: <context>

Don't:
- [Specific thing to avoid]
- [Another thing to avoid]
- [Scope limiter]

Examples of good responses:
[Example 1]
[Example 2]

If you don't know the answer:
- [Fallback behaviour]
- [Alternative action]

Response guidelines:
- [Length guideline]
- [Formatting preference]
- [Structure preference]
🚨

Remember

The prompt is included with every query, so longer prompts use more tokens per request. Be concise but complete.


Testing your prompt

After creating or updating your prompt:

  1. Test with common questions your users ask
  2. Try edge cases and questions outside your bot's scope
  3. Check that the tone and formatting match your expectations
  4. Verify the bot follows your "don't" rules
  5. Make sure fallback behaviour works when the bot doesn't know something

Small adjustments to your prompt can make a big difference in your bot's performance. Don't be afraid to iterate and refine based on real user interactions.