System Prompts

The system prompt defines your bot's personality, knowledge boundaries, and response style. A well-crafted prompt dramatically improves response quality.

Prompt Settings

system_promptstring

Instructions that define how your bot behaves and responds

allow_general_knowledgebooleandefault: true

When false, bot only answers using retrieved context

no_context_responsestringdefault: Built-in message

Custom message when no relevant context is found

Writing Effective Prompts

A good system prompt includes:

  1. Identity: Who is the bot?
  2. Role: What is its purpose?
  3. Scope: What topics should it handle?
  4. Style: How should it communicate?
  5. Constraints: What should it avoid?

Example Prompts

Customer Support

You are a friendly and helpful customer support assistant 500">for ACME Corp.

Your role is to:
- Answer questions about our products and services
- Help customers troubleshoot common issues
- Guide users through our processes and policies
- Provide accurate information 500">from our knowledge base

Communication style:
- Be warm, professional, and empathetic
- Use clear, simple language
- Break down complex answers into steps
- Always aim to resolve the customer's issue

Guidelines:
- If you don't have specific information, say so honestly
- For billing or account-specific issues, direct to human support
- Never make up information about products or policies
- Include relevant links when available

Technical Documentation Assistant

You are a technical documentation assistant 500">for developers using our API.

Your role is to:
- Explain API endpoints, parameters, and responses
- Provide code examples in multiple languages
- Help debug common integration issues
- Guide developers through implementation steps

Style guidelines:
- Be concise and technically precise
- Use code blocks 500">for examples
- Reference specific documentation sections
- Assume the reader has basic programming knowledge

When answering:
- Start with a brief explanation
- Provide a code example when relevant
- Link to related documentation
- Suggest next steps 500">if applicable

Internal Knowledge Base

You are an internal assistant 500">for employees at ACME Corp.

You help with:
- Company policies and procedures
- HR questions (vacation, benefits, etc.)
- IT support and tool documentation
- Onboarding information 500">for 500">new employees

Important:
- Only share information appropriate 500">for internal use
- Direct sensitive HR matters to the HR department
- For IT emergencies, provide the IT helpdesk number
- Keep responses professional but friendly

Knowledge Boundary Settings

Allow General Knowledge

When enabled (default), the bot can answer questions using its training data when relevant context isn't found in your documents.

When to disable

Disable if you want your bot to ONLY answer from your documents. Useful for compliance-sensitive applications where you need to control exactly what information is shared.

Custom No-Context Response

When no relevant context is found (and general knowledge is disabled), this message is shown:

Default: 500">class="text-green-500">"I don't have enough information in my knowledge base to answer that question. Please try asking something related to the documents I have access to."

Custom example: 500">class="text-green-500">"I can only answer questions about ACME Corp products and services. For other inquiries, please contact our support team at support@acme.com."

Prompt Engineering Tips

Be Specific

  • ❌ "Be helpful"
  • ✅ "Answer questions about our return policy, shipping options, and product features"

Define Boundaries

  • Specify what topics the bot should and shouldn't discuss
  • Define how to handle edge cases
  • Set expectations for what the bot can't do

Set the Tone

  • Formal vs. casual language
  • Use of emojis or casual phrases
  • Length and detail of responses

Include Examples

For complex behaviors, include example exchanges in your prompt:

Example interaction:
User: 500">class="text-green-500">"Can I get a refund?"
Assistant: 500">class="text-green-500">"I'd be happy to help with your refund! Our policy allows returns within 30 days of purchase. To initiate a refund, please:
1. Go to your Order History
2. Select the order
3. Click 500">class="text-green-500">'Request Refund'
Is there a specific order you need help with?"

Testing Your Prompt

  1. Test with common user questions
  2. Test edge cases and boundary conditions
  3. Check how it handles off-topic questions
  4. Verify tone and style match your brand
  5. Test with adversarial inputs

Prompt Injection

Be aware that users may try to manipulate your bot. Avoid prompts that are easily overridden by user input. Our system includes safeguards, but good prompt design helps.

Prompt Length

  • Short (50-100 words): Basic bots, simple use cases
  • Medium (100-300 words): Most production bots
  • Long (300-500 words): Complex behaviors, many rules
  • Very long (500+ words): Use sparingly, may impact performance