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
- Ask clarifying questions before answering if the request is ambiguous
- Structure your responses with short paragraphs and lists where relevant
- If you are unsure about information, say so explicitly — never fabricate data
- Limit your responses to 150 words maximum unless the user asks for more details
- 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
Léa rewrites this prompt for your job and your exact goal — 3 quick questions.
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
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 OptimizerComments
- 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
Sora Prompt for Creating E2E Tests
End-to-end (E2E) tests are essential for ensuring application reliability, but writing them remains time-consuming and repetitive. Sora, thanks to its advanced generation capabilities, makes it possible to automate the creation of complete E2E test scenarios in seconds. By formulating a precise prompt describing user journeys, expected interactions, and validation criteria, you obtain structured test suites covering nominal cases as well as edge cases. The prompt engineering approach applied to Sora transforms how QA and development teams approach test coverage. Instead of starting from a blank page, you describe the expected behavior of your application in natural language, and Sora generates the corresponding test code with appropriate assertions. This method significantly reduces the time needed to set up an E2E suite while maintaining a professional quality level. Whether you use Playwright, Cypress, or Selenium, the prompts presented here adapt to your technical stack and the complexity of your application.
Implement rate limiting
Protect APIs from abuse
GitHub Copilot Prompt for Creating a REST API
GitHub Copilot has become an essential assistant for developers looking to accelerate the creation of REST APIs. Thanks to its direct integration into the code editor, it understands the context of your project and generates structured code in real time. Whether you work with Node.js and Express, Python and FastAPI, or Java and Spring Boot, Copilot adapts to your tech stack to produce endpoints conforming to REST conventions. The main challenge lies in formulating the prompt: a well-structured prompt yields a complete API with data validation, error handling, authentication, and documentation. A vague prompt, on the other hand, will produce generic code requiring many adjustments. In this guide, we offer an optimized prompt that fully leverages GitHub Copilot's capabilities to generate a professional, testable, production-ready REST API. You will also discover variants adapted to your experience level as well as practical tips to get the most out of this tool on a daily basis.
Implement CSP with nonces
Prevent XSS with strict CSP