{"id":1954,"date":"2026-02-11T10:28:13","date_gmt":"2026-02-11T10:28:13","guid":{"rendered":"https:\/\/paoloronco.it\/?p=1954"},"modified":"2026-02-11T10:28:14","modified_gmt":"2026-02-11T10:28:14","slug":"wordpress-ai-chatbot-trasformare-contenuti-in-un-sistema-interrogabile-n8n-qdrant-mongodb-vector-store","status":"publish","type":"post","link":"https:\/\/paoloronco.it\/en\/wordpress-ai-chatbot-trasformare-contenuti-in-un-sistema-interrogabile-n8n-qdrant-mongodb-vector-store\/","title":{"rendered":"WordPress AI Chatbot: Transforming Content into a Queryable System | n8n, Qdrant, MongoDB Vector Store"},"content":{"rendered":"<p class=\"wp-block-paragraph\">The <strong>WordPress AI Chatbot<\/strong> that I built was born from a very concrete question:<br><em>Can I turn a site into something that can be queried?<\/em><\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"has-text-align-center wp-block-paragraph\"><em>Don&#039;t look. <strong>To question<\/strong>.<br>The difference is subtle but fundamental.<\/em><\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">When someone lands on a technical website and wants to understand what you&#039;ve done, they have to piece together the story by reading articles, connecting skills, and drawing on experience. It&#039;s a manual process. The chatbot takes action exactly here: it makes it possible to ask direct questions about what&#039;s been published and get answers based solely on that content.<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\">It&#039;s not a generic helper. It&#039;s a semantic layer on top of WordPress.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Indexing; data preparation<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">The Posts; Inexing and preparation on Qdrant<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Operation is divided into two completely separate moments: data preparation and querying.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There <span style=\"text-decoration: underline;\">preparation phase<\/span> It happens through a dedicated workflow on n8n. This workflow doesn&#039;t manage users. It doesn&#039;t answer to anyone. It only takes care of building the site&#039;s semantic index.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When run, it queries WordPress via <span style=\"text-decoration: underline;\">REST API<\/span>, recover the <span style=\"text-decoration: underline;\">published posts<\/span>, extracts the title, content, and excerpts, strips out the HTML markup, and creates a clean version of the text. This text isn&#039;t saved as is; it&#039;s broken into smaller chunks to allow for more precise searching.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Each block is transformed into a <span style=\"text-decoration: underline;\">embedding <\/span>through <span style=\"text-decoration: underline;\">OpenAI<\/span>. The result is a numeric vector representing the meaning of the text. Those vectors are then saved in a <span style=\"text-decoration: underline;\">optimized database <\/span>For <span style=\"text-decoration: underline;\">semantic search<\/span>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Two possibilities come into play here. For <span style=\"text-decoration: underline;\">lean and direct configurations<\/span> can be used <span style=\"text-decoration: underline;\">Qdrant<\/span>. For more structured configurations, especially when you want to manage multiple separate data sets, it is used <span style=\"text-decoration: underline;\">MongoDB Atlas <\/span>with <span style=\"text-decoration: underline;\">Vector Search<\/span>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But the really interesting part isn&#039;t the post indexing. It&#039;s the fact that the system isn&#039;t limited to posts.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Skills and Profile: Structured Indexing on MongoDB Atlas<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Skills and profile sections aren&#039;t classic WordPress content. They&#039;re not articles. They&#039;re not narrative pages. They&#039;re structured data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To make them interrogable, I have foreseen a different process.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <span style=\"text-decoration: underline;\">skills <\/span>they come <span style=\"text-decoration: underline;\">organized <\/span>in file <span style=\"text-decoration: underline;\">JSON <\/span>And <span style=\"text-decoration: underline;\">CSV <\/span>structured by domain, category, level and description. These files are <span style=\"text-decoration: underline;\">imported <\/span>in <span style=\"text-decoration: underline;\">MongoDB <\/span>in dedicated collections. At that point one comes into play <span style=\"text-decoration: underline;\">Node.js script<\/span> included in the project.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <span style=\"text-decoration: underline;\">script <\/span>reads each document, builds a unified textual representation (skill, domain, description, level), calls <span style=\"text-decoration: underline;\">the embeddings API <\/span>Of <span style=\"text-decoration: underline;\">OpenAI<\/span>, <span style=\"text-decoration: underline;\">generates <\/span>The <span style=\"text-decoration: underline;\">vector <\/span>And <span style=\"text-decoration: underline;\">update <\/span>the document with the field <span style=\"text-decoration: underline;\">embedding<\/span>. Subsequently a <span style=\"text-decoration: underline;\">index <\/span>of type <span style=\"text-decoration: underline;\">vector search <\/span>on that collection.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The result is that the <span style=\"text-decoration: underline;\">skills <\/span>they are not simply listed on a page. They are <span style=\"text-decoration: underline;\">semantically queriable<\/span>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If someone asks, &quot;Do you have experience in cloud security?&quot;, the system doesn&#039;t look for the exact word. It compares the meaning of the question with the meaning of the vectorized documents.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The same mechanism applies to the profile, organized into separate sections and indexed in the same way.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This way, the chatbot works on three distinct domains: posts, skills, and profile. It doesn&#039;t mix them together. It treats them as separate sets of information.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">The Chatbot: What Happens When a Question Comes in<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The second workflow on n8n is the one that handles requests in real time.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The request arrives via a webhook, protected by header authentication. Before even querying the database, the system must understand the type of request.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is where an LLM-based intent router comes in. It doesn&#039;t generate responses. It classifies. It decides whether the question is about:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>search among posts<\/li>\n\n\n\n<li>skills questioning<\/li>\n\n\n\n<li>profile query<\/li>\n\n\n\n<li>simple small talk<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">This step is crucial. It allows you to query only the correct database.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If the question concerns a project, a vector search is performed in the post collection. If it concerns a technology or experience level, the skills collection is queried. If it concerns a career path or role, the profile section is consulted.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The vector query returns a set of documents sorted by similarity. These documents are filtered and transformed into a controlled context. Only then does the generative model come into play, but with very clear rules: synthesize what has been retrieved, not invent.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Logging and control<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Every interaction can be recorded on Google Cloud Storage. The user&#039;s IP address is first hashed with SHA3-256, avoiding storing any directly identifying data. Logs are saved in JSON format, organized by date, enabling subsequent analysis while maintaining privacy.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This aspect isn&#039;t an afterthought. It means treating the chatbot as a real backend component, not just a simple widget.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">WordPress Integration<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To connect everything to the site, a dedicated WordPress plugin was developed.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The plugin does not contain AI logic. It does not perform any calculations. It acts as a secure bridge between the n8n frontend and backend. It exposes a shortcode that allows you to embed the chatbot into your site, handles REST calls, and secures the webhook with server-side authentication.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This way no API keys are ever exposed in the browser.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">The project<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This project is not a simple JSON file to import or a plugin to install and forget.<br>It is a complete structure, designed to be understood and replicated.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Who decides to implement this <strong>WordPress AI Chatbot <\/strong>receives the entire architecture: the <span style=\"text-decoration: underline;\">n8n workflow <\/span>already configured for the indexing phase and for the management of the chatbot, the <span style=\"text-decoration: underline;\">detailed guides<\/span> for importing and setting credentials, the <span style=\"text-decoration: underline;\">documentation <\/span>to choose and <span style=\"text-decoration: underline;\">configure <\/span>The <span style=\"text-decoration: underline;\">vector store <\/span>(<span style=\"text-decoration: underline;\">Qdrant <\/span>for a more direct setup, <span style=\"text-decoration: underline;\">MongoDB Atlas <\/span>for a more advanced architecture), together with the <span style=\"text-decoration: underline;\">Node.js script <\/span>needed to import, normalize and vectorize skills and profile sections starting from JSON or CSV files.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Also included are <span style=\"text-decoration: underline;\">concrete examples <\/span>of data structure, the <span style=\"text-decoration: underline;\">explanation <\/span>on how to build the <span style=\"text-decoration: underline;\">vector indices<\/span>, how to organize the <span style=\"text-decoration: underline;\">MongoDB collections<\/span>, like <span style=\"text-decoration: underline;\">separate <\/span>i <span style=\"text-decoration: underline;\">information domains <\/span>(post, skill, profile) and how to connect everything to the query workflow.<br>The <span style=\"text-decoration: underline;\">WordPress plugin provided <\/span>then allows to <span style=\"text-decoration: underline;\">integrate <\/span>The <span style=\"text-decoration: underline;\">chatbot <\/span>In the <span style=\"text-decoration: underline;\">site <\/span>securely, acting as a bridge between the frontend and the backend without exposing sensitive keys.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The goal is not to provide a \u201cclosed product,\u201d but a complete and documented technical foundation that allows you to reconstruct the entire system step by step, understanding each component.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The project is available on:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Gumroad<\/strong><br><a href=\"https:\/\/paoloronco.gumroad.com\/l\/wordpress-aichatbot\">https:\/\/paoloronco.gumroad.com\/l\/wordpress-aichatbot<\/a><\/li>\n\n\n\n<li><strong>n8n Creators<\/strong> (coming soon | in review)<br><a href=\"https:\/\/creators.n8n.io\/\">https:\/\/creators.n8n.io\/<\/a><\/li>\n\n\n\n<li><strong>Shop.paoloronco.it<br><\/strong><a href=\"https:\/\/shop.paoloronco.it\/24-wordpress-ai-chatbot-with-n8n.html\">https:\/\/shop.paoloronco.it\/24-wordpress-ai-chatbot-with-n8n.html<\/a><\/li>\n\n\n\n<li><strong>GitHub<\/strong>: (documentation)<br><a href=\"https:\/\/github.com\/paoloronco\/n8n-templates\/tree\/main\/paid-templates\/4%20-%20WordPress%20AI%20Chatbot\">https:\/\/github.com\/paoloronco\/n8n-templates<\/a><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Those who use it are not purchasing a simple chatbot, but a replicable architecture to transform a WordPress site into a truly queryable system.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">The meaning of the project<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The WordPress AI Chatbot isn&#039;t about making a website more spectacular.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It serves to make an information domain queryable: projects, skills, path.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It&#039;s a substantial difference.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It adds no decoration.<br>Adds semantic structure.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And this is the part that really matters.<\/p>","protected":false},"excerpt":{"rendered":"<p>The WordPress AI Chatbot I built stems from a very concrete question: can I transform a site into something that can be queried? Don&#039;t search. Query. The difference is subtle but crucial. When someone lands on a technical site and wants to understand what you&#039;ve done, they have to piece together the picture by reading articles, connecting skills, and drawing on experience. It&#039;s a... <a href=\"https:\/\/paoloronco.it\/en\/wordpress-ai-chatbot-trasformare-contenuti-in-un-sistema-interrogabile-n8n-qdrant-mongodb-vector-store\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> \u201c&quot;WordPress AI Chatbot: Transforming Content into a Queryable System | n8n, Qdrant, MongoDB Vector Store&quot;\u201d<\/span><\/a><\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1954","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/paoloronco.it\/en\/wp-json\/wp\/v2\/posts\/1954","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/paoloronco.it\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/paoloronco.it\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/paoloronco.it\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/paoloronco.it\/en\/wp-json\/wp\/v2\/comments?post=1954"}],"version-history":[{"count":1,"href":"https:\/\/paoloronco.it\/en\/wp-json\/wp\/v2\/posts\/1954\/revisions"}],"predecessor-version":[{"id":1955,"href":"https:\/\/paoloronco.it\/en\/wp-json\/wp\/v2\/posts\/1954\/revisions\/1955"}],"wp:attachment":[{"href":"https:\/\/paoloronco.it\/en\/wp-json\/wp\/v2\/media?parent=1954"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/paoloronco.it\/en\/wp-json\/wp\/v2\/categories?post=1954"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/paoloronco.it\/en\/wp-json\/wp\/v2\/tags?post=1954"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}