A modern AI chatbot for WordPress is no longer just a decision tree with pre-programmed responses. It is an intelligent assistant powered by an LLM (Claude AI, GPT-4) and fed by your content, which understands questions in natural language and responds accurately using YOUR data. Here’s how to create one.
The components of a WordPress AI chatbot
- The LLM, The language model (Claude AI, GPT-4 or Mistral) that understands and generates text
- The knowledge base, Your pages, articles, FAQs and documentation, indexed in a vector database
- The RAG (Retrieval-Augmented Generation), The system that searches for passages relevant to each question
- The chat interface, A widget integrated into your WordPress site, responsive and customised to match your brand guidelines
- The backend, an API that orchestrates the RAG + LLM (n8n, Make, or custom code)
Step 1: Choosing your LLM
Claude AI (Anthropic), Our top recommendation. Excellent in French, secure, accurate and honest about its limitations. API available from 3 $ per million tokens. Perfect for support and lead qualification chatbots.
GPT-4 (OpenAI), Highly creative, multi-modal, broad scope. Slightly more expensive. US servers – check GDPR compliance depending on your use.
Mistral Large, Open-source, hosting in the EU available. Excellent for French. Ideal if your data is sensitive and you want maximum GDPR compliance.
Step 2: Building the knowledge base
- Export your WordPress content (posts, pages, FAQs) using WordPress’s native XML export feature
- Clean up the content (remove HTML, normalise)
- Split into «chunks» of 500 to 1000 tokens
- Generate embeddings (numeric vectors) via the OpenAI or Cohere API
- Store in a vector database (Pinecone, Chroma, or pgvector if self-hosted)
Step 3: Set up the RAG with n8n
- n8n workflow: Webhook (user question)
- Node: Generate the embedding for the question
- Node: Find the 5 nearest chunks in Pinecone
- Node: Construct the prompt using context + question
- Node: Send to Claude AI API
- Node: Return the response to the chat widget
Step 4: Embed the widget in WordPress
Option 1: Create a WordPress shortcode that loads a custom JavaScript widget (floating button, chat window, opening animation).
Option 2: Use Crisp, Intercom or Tidio as your chat interface, and integrate your RAG + LLM backend as a custom bot via their API.
Option 3: Use a turnkey solution such as Voiceflow or Botpress, which offer no-code interfaces and can be integrated with WordPress in 5 minutes.
Step 5: Test and calibrate
- Manually test over 100 typical questions from your visitors
- Check that the bot responds with «I don’t know» to topics outside its scope (no hallucinations)
- Adjust the system instructions (tone, limits, recommended CTAs)
- Set up human escalation for complex cases
Expected results
- 80 %: frequently asked questions resolved without human intervention
- Average response time: 2–3 seconds (compared with 2–4 hours for a human)
- Available 24 hours a day, 7 days a week, 365 days a year
- +20 to +35 % qualified leads (the chatbot collects the information before passing it on)
Would you prefer us to do it for you? Discover our AI chatbot service for WordPress →