A WordPress RAG chatbot answers visitors using your own posts, pages, PDFs, and product data instead of the AI model’s generic training. AI Workflow Automation, a free WordPress plugin, builds one visually: you point its knowledge base at your content, the chatbot retrieves the matching passages, and the AI writes a grounded answer. This keeps replies accurate and cuts hallucinations to near zero.
I am Navid, the developer of AI Workflow Automation. I built the knowledge base feature because the first version of the chatbot node was confidently wrong about my own documentation, and no amount of prompt tuning fixed it. Retrieval did.
This guide walks through the exact build: what to install, how the knowledge base gets filled, how retrieval works at runtime, where it still fails, and what it costs. AI Workflow Automation is a free WordPress plugin with a visual drag-and-drop builder that runs AI workflows, agents, and chatbots inside your own site, using your own API keys, with no external subscription required.
What is a RAG chatbot and why train it on your own content?
RAG stands for retrieval-augmented generation. IBM describes it as an architecture that connects an AI model to external knowledge bases so the model answers from that data rather than from training alone.
The practical difference is where the facts come from. A plain chatbot generates from a model trained months or years ago, on public text that never included your pricing page. A RAG chatbot searches your content first, then writes the answer using the passages it found.
“Trained on your own content” is the phrase everyone searches for, but it is technically the wrong word. Nothing is retrained. Your content is converted into embeddings, stored, and retrieved on demand. That distinction matters, because it means updating an answer is as fast as editing the post.
| Behavior | Plain AI chatbot | WordPress RAG chatbot |
|---|---|---|
| Source of facts | Model training data | Your posts, pages, PDFs, products |
| Knows your pricing or policy | No, unless pasted into the prompt | Yes, retrieved each turn |
| Updating an answer | Rewrite the system prompt | Edit the source content and re-ingest |
| Hallucination risk on your specifics | High | Low, answers are grounded in retrieved text |
| Can cite where the answer came from | No | Yes, ingested WordPress content keeps titles and backlinks |
| Cost per conversation | Chat tokens only | Chat tokens plus a small embedding and retrieval cost |
| Setup effort | Minutes | Roughly an hour for the first build |
The cost line is honest: RAG is not free of overhead. It is just very cheap overhead, as the pricing section below shows.
What do you need before you start?
Four things, and three of them have free tiers.
- The plugin. AI Workflow Automation, installed from the WordPress plugin directory. The visual builder, the Chatbot node, and the knowledge base are all included.
- An OpenAI API key. This powers the embeddings that make retrieval work. AI Workflow Automation uses OpenAI’s
text-embedding-3-smallmodel for this. - A Supabase project. The knowledge base stores vectors in Supabase using the
pgvectorextension. The free tier is enough to start. - A LlamaParse API key, only if you are ingesting documents. Plain text, Markdown, and CSV files upload directly. PDF, DOC, DOCX, and RTF are converted through LlamaParse first.
You also need content worth retrieving. This is the part people skip. A knowledge base built on thin, contradictory, half-abandoned pages produces a chatbot that is confidently wrong in a new way. Fix the source material first.
How do you build the knowledge base in AI Workflow Automation, step by step?
The setup is a one-time configuration, then a repeatable content flow. Full detail lives in the knowledge base (RAG) documentation.
- Open Settings, then Knowledge Base Management, then the Supabase (RAG) tab. This is where the vector store connection lives.
- Enter your Supabase project URL and API key. The table name defaults to
wpaw_documents, which you can change if you already use that namespace. - Copy the setup SQL shown on that tab and run it in the Supabase SQL editor. It enables
pgvector, creates the documents table, and adds the similarity match function the plugin calls at query time. - Click Test connection. If WordPress cannot reach Supabase, you want to know now, not when a visitor is mid-conversation.
- Create a labeled knowledge base. I recommend one per audience rather than one giant pool, for example “Support docs” separate from “Sales FAQ”. Narrower knowledge bases retrieve cleaner passages.
- Add your content. Three methods are available: paste text directly with an optional title, ingest existing WordPress posts, pages, and custom post types, or upload files. WordPress ingestion keeps the post title and a backlink, so the chatbot can point people to the source page.
- Drop a Chatbot node onto the canvas. In the builder, this is the node described in the Chatbot node documentation, and it adds an AI chat widget to your site.
- On the Model tab, attach the knowledge base. The same tab is where you choose your AI source, either credits or your own API keys, and pick a model from OpenAI, Anthropic, or OpenRouter, plus memory, temperature, and top-p.
- Write the system prompt on the Instructions tab. Mine tells the bot to answer only from retrieved context and to say it does not know otherwise. That single instruction does more for accuracy than any model upgrade.
- Set the greeting and limits on the Behavior tab. Initial message, conversation history caps, rate limiting, file uploads, and typing indicators all live here.
- Style it on the Design tab, then save. Theme, position, colors, typography, quick replies, and footer are configurable. Saving generates a shortcode.
- Paste the shortcode into a page, post, or widget area. Then ask it five questions you already know the answers to, and check every one.
That last step is not optional in my book. The first pass almost always reveals a chunk of content you thought was in the knowledge base and is not.
How does retrieval keep answers accurate and cut hallucinations?
Retrieval works in three stages, and understanding them tells you exactly where to debug when an answer is wrong.
- Retrieve. The visitor’s question is embedded as a vector, and the plugin queries Supabase for the closest stored passages using the match function created during setup.
- Augment. Those passages are injected into the model’s context for that turn, alongside the system prompt and recent conversation history.
- Generate. The model writes an answer from that supplied context instead of reaching into training data.
Embeddings are what make step one work. OpenAI’s text-embedding-3-small produces 1536-dimensional vectors by default, per OpenAI’s embeddings documentation. Similar meanings land near each other in that space, which is why a visitor asking “can I get my money back” retrieves a refund policy that never uses those words.
Hallucinations drop because the model is answering a much easier question. “Summarize these three passages” is far more reliable than “recall everything you know about this small business”.
Now the honest limits. Retrieval in AI Workflow Automation is opt-in and fail-open, which means that if the vector store becomes unreachable the workflow keeps running rather than breaking the chat. That is the right trade for uptime, but it also means a Supabase outage can quietly return you to a plain chatbot. Monitor it.
Retrieval also cannot invent facts your content never stated. If your shipping policy is not written down anywhere, no amount of embedding will conjure it. And chunk-level retrieval sometimes lifts a passage that is topically close but contextually wrong, which is why I keep knowledge bases narrow and titles descriptive.
How do you add human handoff for questions the bot cannot answer?
Every knowledge base has edges. The question is what happens at the edge: a hedged guess, or a human.
The Chatbot node has a dedicated Handoff tab with support for Operator Inbox, Chatwoot, Zendesk, and Intercom. When the bot cannot answer confidently, the conversation moves to a person instead of dying in the widget.
For workflows rather than live chat, the Human Input node handles approval and review. You choose Approval Required for a yes or no decision, or Modification Required when a human should edit the content before it continues. Tasks assign to specific users or to entire roles, with email notifications, and approvals branch down separate Approve and Revert paths.
I use both together on support sites. The chatbot answers what it can, escalates what it cannot, and anything that would post publicly waits for a human approval step first.
What does a WordPress RAG chatbot actually cost?
Cheaper than most people expect, because embedding is the cheap part.
OpenAI’s documentation lists text-embedding-3-small at roughly 62,500 pages per dollar, assuming about 800 tokens per page. Indexing a 500 page documentation site therefore costs under a cent in embeddings, and you only pay again when content changes and gets re-ingested.
Supabase’s free tier covers small and mid-sized knowledge bases. LlamaParse is only involved if you ingest PDFs or Word documents.
The recurring cost is the chat model itself, billed per conversation by whichever provider you select on the Model tab. That varies widely between providers and models, so check current pricing with your provider rather than trusting a number in a blog post.
Two payment routes exist in the plugin. Use your own API keys and pay providers directly at cost, or use credits if you would rather not manage keys. The plugin itself is free either way, and nothing forces an external subscription.
What are the real use cases for a chatbot trained on your content?
Support deflection. Ingest your documentation and your existing ticket answers. The bot resolves the repeat questions, and the Handoff tab routes the genuinely new ones to a human. This is the highest return use case I see.
Documentation search that answers. Site search returns ten links. A RAG chatbot returns the answer plus a link to the source page, because WordPress ingestion preserves titles and backlinks.
WooCommerce catalog questions. Ingest product descriptions, specification sheets, and policy pages so the bot can answer sizing, compatibility, and returns questions at the moment of hesitation. Keep order lookups as an agent action rather than knowledge base content, since live order data should never sit in a vector store.
Internal knowledge. Onboarding docs, SOPs, and process notes, behind a login. Because everything runs on your own site with your own keys, the content never leaves your infrastructure for a third-party chatbot service.
More patterns are documented on the AI chatbot feature page.
Frequently asked questions
Can I train ChatGPT on my own website content?
Not by retraining the model, but you do not need to. A RAG chatbot achieves the same practical result: your content is embedded and stored, then the relevant passages are retrieved and passed to the model at question time. In AI Workflow Automation you attach a knowledge base to the Chatbot node and the retrieval happens automatically on every turn.
Is a WordPress RAG chatbot free?
The AI Workflow Automation plugin is free, and Supabase has a free tier that covers small knowledge bases. You still pay your AI provider for embeddings and chat tokens. Embeddings are negligible, at roughly 62,500 pages per dollar for OpenAI’s text-embedding-3-small, while chat model usage is the real recurring cost.
Do I need a vector database for a RAG chatbot?
Yes. Retrieval works by comparing the meaning of a question against stored embeddings, which needs a vector store. AI Workflow Automation uses Supabase with the pgvector extension, and the plugin gives you the exact setup SQL to create the table and the similarity match function in the Supabase SQL editor.
How do I stop my AI chatbot from hallucinating?
Ground it in retrieved content and instruct it to refuse otherwise. In practice: attach a focused knowledge base, tell the system prompt to answer only from retrieved context and to say it does not know when there is no match, then add human handoff so unanswered questions reach a person instead of getting a guess.
Start building
Install AI Workflow Automation free from the WordPress plugin directory, then follow the knowledge base (RAG) setup docs to connect Supabase and ingest your first ten pages.
If you would rather see it working before you build, the live demos show the chatbot and other workflows running on real content.