Course 10 built a knowledge base that answers questions correctly. Course 11 built a widget that lets an anonymous visitor ask them. Put those two courses’ code side by side on a real client site and you’d have a working demo, not a product you’d stake a support team’s day on. This lesson lays out the gap between the two, plainly, and turns that gap into the roadmap the rest of this course follows.
Course 10, Build a RAG Knowledge Base in WordPress, and Course 11, Build Front-End AI Chat & Conversational Experiences for WordPress Visitors. This course builds directly on both and does not re-teach either one’s fundamentals.
Step 1: what Course 10 and Course 11 actually gave you
Course 10 indexed WordPress posts: chunk the content, embed each chunk with
AiClient::input()->generateEmbedding(), store the vectors in a custom table, and search
them with cosine similarity in plain PHP. Course 11 built the surface: a chat widget, a
register_rest_route() endpoint whose PHP callback is the only code holding an API key,
and a transient-keyed session so an anonymous visitor gets conversational memory without
a WordPress account. Wired together, that’s the retrieve-then-generate loop from Course
10’s grounding lesson, running behind Course 11’s widget. It works.
It also stops short of nearly everything a real support deployment needs on day one.
Step 2: the five real gaps
Every one of those gaps is a real, common requirement from an actual support-chatbot brief, not a hypothetical. This course closes each one, in order.
Step 3: the roadmap
Every lesson from here on reuses Course 10’s table and Course 11’s REST endpoint and
session pattern as the load-bearing infrastructure. Nothing in this course replaces
either one, it extends both. If a code sample references my_plugin_index_post() or
my_plugin_get_session_transcript() without redefining it, that’s the function Course
10 or Course 11 already built.
Step 4: what “production” means for this specific course
“Production” here means three concrete things, and they recur through every lesson: answers are grounded in content a site owner actually controls, not invented; a human can always regain control of a conversation without the visitor noticing a seam; and no customer’s question, and no piece of indexed content, ever has to leave the site’s own database to make any of this work. Keep those three in mind as a checklist while reading the rest of this course, every lesson exists to make one of them true in a specific, concrete way.
Test it: confirm your Course 10 and Course 11 code still runs
Before building anything new, confirm the foundation is actually in place:
wp-env run cli wp eval '
global $wpdb;
$count = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->prefix}ai_chunk_embeddings" );
echo "Indexed chunks: {$count}\n";
'
curl -X POST "https://your-site.test/wp-json/my-plugin/v1/chat" \
-H "Content-Type: application/json" \
-d '{"message":"hello","session_id":"test"}'
If the first command reports a real chunk count and the second returns a JSON reply rather than a fatal error, Course 10 and Course 11’s foundations are in place and this course’s lessons will layer directly on top of them.
Recap
A working RAG pipeline and a working chat widget are not, on their own, a shippable support chatbot. The gap is content scope beyond blog posts, verifiable rather than invented citations, real-time human takeover instead of a one-way handoff link, honest reach into other languages and voice input, and features that make the chatbot valuable to the business running it, lead capture and visibility into what it’s actually being asked. The next eight lessons close each of those gaps in turn, building directly on Course 10 and Course 11’s code rather than replacing it.