P

Claude Prompt to Create a Chatbot

Creating a high-performance chatbot with Claude is a major opportunity to automate your customer interactions, technical support, or internal processes. Thanks to its advanced natural language understanding capabilities, Claude excels at designing chatbots that can maintain contextual conversations, handle complex scenarios, and adapt to your brand tone. Whether you want to deploy an assistant on your website, integrate a bot into Slack or WhatsApp, or create a specialized conversational agent for your business domain, a well-structured prompt is the key to a truly useful chatbot. The challenge is not simply to generate responses, but to define consistent behavior: managing edge cases, escalating to a human when necessary, adhering to a precise knowledge scope, and maintaining an appropriate tone. The prompts presented here guide you in designing a professional chatbot with Claude, from rapid prototype to robust production system, covering personality, business rules, context management, and essential safeguards.

The prompt

Claude

You are an expert chatbot for [DOMAIN/COMPANY]. Your role is to assist users professionally and empathetically.

Identity

  • Name: [BOT NAME]
  • Tone: professional, warm, and concise
  • Language: exclusively French
  • You introduce yourself only when the user greets you for the first time

Knowledge Scope

You are specialized in: [LIST OF COVERED TOPICS]
You do NOT answer questions outside this scope. In that case, politely say you cannot help on this topic and offer to redirect to [HUMAN CONTACT].

Conversation Rules

  1. Ask clarifying questions before answering if the request is ambiguous
  2. Structure your answers with short paragraphs and lists when relevant
  3. If you are unsure about information, say so explicitly — never fabricate data
  4. Limit your answers to 150 words maximum unless the user asks for more details
  5. End each response with a follow-up question or a concrete action proposal

Handling Sensitive Cases

  • Customer complaint: express empathy, summarize the problem, propose a solution or escalation
  • Urgent request: identify the urgency level and immediately direct to the appropriate channel
  • Personal data: NEVER ask for passwords, credit card numbers, or sensitive data

Response Format

Respond directly to the user in natural language. Do not use prefixes like "Bot:" or "Assistant:". Be conversational while remaining informative.

Personalize this prompt with Léa

Léa rewrites this prompt for your job and your exact goal — 3 quick questions.

Why it works

This prompt works because it defines a complete behavioral framework: identity, scope, rules, and safeguards. By explicitly delimiting what the chatbot knows and does not know, hallucinations and off-topic responses are avoided. The section structure allows Claude to apply each constraint consistently throughout the conversation, resulting in predictable and professional behavior.

Expected result

You get a chatbot that maintains a consistent personality, responds only within its area of expertise, and gracefully handles unexpected situations. The bot asks relevant questions, structures its responses in a readable way, and knows its limits to redirect to a human when necessary.

Variants by level

FAQ

How do I give my Claude chatbot conversational memory?
Claude automatically retains context within a conversation via the message history. For persistent memory between sessions, you need to implement an external storage system (database, JSON file) that injects a summary of previous interactions into the system prompt at the start of each new conversation. Use a structured format like: "Customer history: [summary of past interactions, known preferences, open tickets]". Limit this context to truly useful information to avoid consuming too many tokens.
How do I prevent my chatbot from answering out-of-scope topics?
Explicitly define in the prompt the list of allowed topics AND the expected behavior when faced with an out-of-scope question. Negative phrasing is essential: rather than just listing what the bot knows, specify what it should not do. Add a redirection instruction (email, phone, link) so the user is not left without a solution. Test with adversarial prompts to verify the robustness of the framing.
What is the best way to deploy a Claude chatbot in production?
Use the Claude API with the official SDK (Python or TypeScript). Architect your system with a backend that manages the conversation history, system prompt, and API calls. Integrate a chat widget on your site or connect to platforms like Slack or WhatsApp via their respective APIs. Set up a logging system to analyze conversations, detect friction points, and continuously improve your prompt. Start with Claude Haiku for cost/performance ratio, then switch to Sonnet if you need more nuanced answers.

Related prompts

How to use this prompt

  1. Copy the prompt with the button above.
  2. Paste it into ChatGPT, Claude or your favorite AI assistant.
  3. Replace the bracketed variables with your details, then refine the result.

About Prompt Guide

Prompt Guide is a free library of 4800+ ready-to-use prompts for ChatGPT, Claude and other AIs, with guides to learn prompting and tools to build and optimize your own prompts.

More prompts to explore

Go further

Get new prompts every week

Join our newsletter.