P
💻DeveloppementIntermediateClaude

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's 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 key to a truly useful chatbot. The challenge is not just generating responses, but defining coherent behavior: handling 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 to design a professional chatbot with Claude, from quick prototype to robust production system, covering personality, business rules, context management, and essential safeguards.

Paste in your AI

Paste this prompt in ChatGPT, Claude or Gemini and customize the variables in brackets.

You are an expert chatbot for [DOMAIN/COMPANY]. Your role is to assist users in a professional and empathetic manner.

Identity

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

Knowledge Scope

You specialize in: [LIST_OF_TOPICS_COVERED]
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 responses with short paragraphs and lists where relevant
  3. If you are unsure about information, say so explicitly — never fabricate data
  4. Limit your responses to 150 words maximum unless the user asks for more details
  5. End each response with a follow-up question or a concrete action suggestion

Handling Sensitive Cases

  • Customer complaint: express empathy, summarize the issue, offer 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

Reply 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

Answer 3 questions and Léa tailors the prompt to your situation.

Why this prompt 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.

Use Cases

Create a Chatbot

Variants

Expected Output

You get a chatbot that maintains a coherent personality, responds only within its expertise domain, and gracefully handles unexpected situations. The bot asks relevant questions, structures its responses legibly, and knows its limits to redirect to a human when necessary.

Frequently Asked Questions

How do I give my Claude chatbot conversational memory?

Claude automatically retains context within a single conversation through its message history. For persistent memory between sessions, you'll 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]". Keep this context limited to truly useful information to avoid consuming too many tokens.

How do I prevent my chatbot from responding to out-of-scope topics?

Explicitly define both the list of allowed topics AND the expected behavior when facing an out-of-scope question in the prompt. Negative phrasing is essential: rather than simply listing what the bot knows, specify what it must not do. Add a redirection instruction (email, phone, link) so the user isn't left without a solution. Test with adversarial prompts to verify the robustness of your framing.

What's 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 conversational history, the system prompt, and API calls. Integrate a chat widget on your site or connect to platforms like Slack or WhatsApp via their respective APIs. Implement a logging system to analyze conversations, detect friction points, and continuously improve your prompt. Start with Claude Haiku for its cost/performance ratio, then move to Sonnet if you need more nuanced responses.

Improve this prompt

Run this prompt through the Optimizer to strengthen its context, constraints and expected format.

Improve this prompt with the Optimizer

Comments

  • LéaAI

    Personnalisez les variables entre crochets avec des informations très précises (exemples concrets de sujets) et ajoutez 3 à 5 dialogues d’exemple dans la section Règles pour ancrer le ton. Cela évite les réponses génériques et améliore la cohérence du bot sur des cas réels.

📬 Get new prompts every week

Join our newsletter and never miss a prompt.

Go further

Similar Prompts

💻DeveloppementIntermediateAll AIs

Namespace and Quota Management

Manage a multi-tenant cluster

0108
💻DeveloppementBeginnerAll AIs

Artifact Retention Policy

Optimize artifact storage costs

097
💻DeveloppementAdvancedAll AIs

Build a virtualized list

Handle massive data lists

0142
💻DeveloppementIntermediateAll AIs

REST API for ML Model

Exposing a model via an API

095