OpenClawR. AI OpenClaw Hub

AI Bot Best Practices

Practical guidelines for writing effective bot instructions, designing conversations, staying safe, and managing costs

AI Bot Best Practices

Get the most out of your OpenClaw bot with these proven practices — no technical skills required.

Writing Effective Bot Instructions

Your bot's system instructions define its personality, knowledge boundaries, and behavior. Think of it as onboarding a new team member.

Define a Clear Role

Give your bot a specific job title and personality — not a vague "helpful assistant."

Bad example:

You are a helpful assistant. Be nice and answer questions.

Good example:

You are "Luna", the customer support specialist for GreenPaws Pet Store.

Personality: Friendly, knowledgeable, and concise.

Rules:
- Only answer questions about our products, shipping, and returns
- If unsure, say "Let me connect you with our team" instead of guessing
- Keep responses under 3 sentences
- Use a warm, casual tone

Set Tone and Length

Be specific about how your bot should communicate:

  • Tone: "Sound like a helpful friend" or "Professional but approachable"
  • Length: "Keep responses under 3 sentences" or "Use bullet points for lists"
  • Style: "Avoid corporate jargon" or "Use simple language a teenager would understand"

Provide Example Conversations

Show your bot how to handle real situations:

Example interactions:

User: "Where is my order?"
Bot: "I'd love to help! Could you share your order number? I'll check the status right away."

User: "Do you have discounts?"
Bot: "We have 10% off for first-time buyers! Use code WELCOME10 at checkout."

User: "What's your opinion on politics?"
Bot: "I'm here to help with pet supplies! Is there anything about our products I can help with?"

Common Instruction Mistakes

MistakeWhy It's BadFix
Too vague ("Be helpful")Bot gives generic, unhelpful answersGive specific role + rules
Too many rolesBot gets confused, drops important rulesStart with one clear purpose
No boundariesBot discusses anything, risks brand damageDefine what's off-limits
No human handoffUsers get stuck in loopsAdd "connect to human" fallback
Negative-only rulesBot knows what NOT to do, but not what TO doBalance "never" with "always"

Conversation Design Tips

First Impressions Matter

Your bot's greeting sets expectations. Use a simple structure:

  1. Who I am — Brief introduction
  2. What I can do — List 2-3 capabilities
  3. First action — Give a clear next step
Hi! I'm Luna from GreenPaws. I can help you with:
- Product recommendations
- Order tracking
- Returns & exchanges

What can I help you with today?

Handle "I Don't Know" Gracefully

When your bot can't answer, avoid generic responses:

  • Bad: "I don't understand."
  • Good: "I'm not sure about that. Would you like to ask about [Product Info] or [Order Status]? Or I can connect you with our team."

Always offer a next step so users aren't left hanging.

Group Chat Etiquette

If your bot is added to Telegram groups:

  • Stay quiet unless directly mentioned with @botname or a /command
  • Keep replies short — group messages should be 50% shorter than private chats
  • Reply to the specific message so everyone knows who the bot is answering
  • Don't spam — avoid sending multiple messages when one will do

Use Telegram Features

Make conversations interactive instead of purely text-based:

  • Quick-reply buttons for common choices ("Track Order", "See Menu", "Talk to Human")
  • Inline keyboards for in-the-moment decisions ("Confirm", "Cancel")
  • Images and media for product showcases or visual guides

Buttons and quick replies are usually free — they don't consume AI tokens, which helps keep your costs down.

Safety and Content Guidelines

Set Clear Boundaries

Tell your bot exactly what topics are off-limits:

Boundaries:
- NEVER discuss competitors, politics, religion, or personal opinions
- NEVER provide medical, legal, or financial advice
- NEVER make promises about pricing, discounts, or policies not in our official docs
- If asked about restricted topics, say: "I'm designed to help with [your topic]. For other questions, please contact our team."

Protect Sensitive Information

Never share sensitive credentials with your bot or through bot conversations.

Never give your bot access to:

  • Main bank account details or payment credentials
  • Cryptocurrency wallet keys or seed phrases
  • Admin passwords or master API keys
  • Personal identity documents or social security numbers
  • Internal business credentials (accounting systems, admin panels)

If your bot needs to handle payments, use your platform's built-in payment features — never paste account numbers into system instructions.

Prevent Misinformation

AI can sometimes "hallucinate" — confidently stating incorrect information. To reduce this:

  • Ground your bot in facts: Attach specific documents (FAQs, product catalogs) and instruct: "Only answer based on the provided information"
  • Add disclaimers: "This is AI-generated information, not professional advice"
  • Require honesty: Include in instructions: "If you don't know the answer, say so — never guess"

Add Required Disclaimers

Depending on your industry, include appropriate notices:

  • General: "You are chatting with an AI assistant"
  • Health/Wellness: "This is not medical advice. Please consult a healthcare professional"
  • Finance: "This is informational only, not financial advice"
  • Legal: "For legal matters, please consult a qualified attorney"

Real-World Cautionary Tales

Learn from these public AI bot failures:

CompanyWhat HappenedLesson
Air CanadaBot invented a refund policy that didn't exist. Court ruled the airline was liableAlways ground your bot in real policy documents
DPDCustomer tricked bot into swearing and criticizing the company publiclySet strong guardrails against inappropriate language
Chevrolet DealerBot "agreed" to sell a $50,000 truck for $1Never let your bot agree to user-proposed terms or prices
NYC MyCityGovernment bot gave illegal business adviceHigh-stakes topics need human verification

Managing Your Costs

Understanding Tokens

Think of tokens as the "words" your AI reads and writes. You're billed for the total volume — both the question AND the answer.

  • ~750 words = ~1,000 tokens
  • Every conversation includes: your bot's instructions + chat history + user's message + bot's reply
  • Longer instructions and longer conversations = more tokens = higher cost

Quick Ways to Save

StrategyHowImpact
Shorter instructionsRemove filler words, "please", "thank you" from system prompt15-30% savings
Use buttons for FAQsStatic buttons don't consume AI tokensHigh savings on repetitive questions
Hard-code greetingsWelcome messages don't need AI generationSmall but consistent savings
Set response length limits"Keep answers under 3 sentences"Reduces output tokens

Monitor Your Usage

Check your Usage Dashboard regularly:

  • Watch for spikes — sudden increases may indicate abuse or a chatty prompt
  • Identify expensive topics — if "returns policy" costs the most, consider a static FAQ page instead
  • Set budget alerts — configure notifications at 50%, 75%, and 90% of your monthly quota

Set a monthly spending cap in your Billing settings to prevent surprise charges. When the cap is reached, your bot can display a simple "Leave a message" form instead.

Measure Your ROI

Track whether your bot is delivering value:

  • Deflection rate — How many customers got answers without needing a human?
  • Cost per resolution — Bot response ($0.01-0.10) vs. human agent ($5-15)
  • Response time — Bots respond in seconds vs. minutes/hours for humans
  • Customer satisfaction — Are users rating bot responses positively?

Testing Your Bot

Before Going Live

Never launch a bot without testing. Untested bots risk brand damage and customer frustration.

Pre-launch checklist:

  1. Test real questions — List the 10-20 questions your customers actually ask and verify the bot handles each one correctly
  2. Test edge cases — Try typos, slang, emoji-only messages, and very long messages
  3. Test boundaries — Ask off-topic questions to verify the bot redirects properly
  4. Test with fresh eyes — Have someone outside your team try the bot without instructions
  5. Test in the portal — Use the Chat tab to test responses before going live on Telegram

After Launch: Keep Improving

Your bot should get better over time:

  • Review logs weekly — Look for questions your bot couldn't answer and update instructions
  • Track fallback rate — If your bot frequently says "I don't know," it needs more knowledge
  • Update regularly — When products, pricing, or policies change, update your bot's instructions immediately
  • Listen to users — If customers complain about a specific response, fix the instruction that caused it

Quick-Start Checklist

  • Bot has a clear, specific role (not "helpful assistant")
  • Tone and response length are defined
  • Example conversations are included in instructions
  • Off-limits topics are explicitly listed
  • No sensitive credentials in bot instructions or knowledge base
  • Human handoff option is available
  • Disclaimer added (if health, finance, or legal related)
  • Greeting message and fallback responses are configured
  • Bot tested with real customer questions
  • Bot tested with edge cases and off-topic questions
  • Usage dashboard bookmarked and alerts configured
  • Monthly budget cap is set

Next Steps