Experimenting with a RAG-Based AI Chatbot on a Personal Drupal Blog
In a recent blog post, Thomas T. Trelvik shared his experience integrating a Retrieval-Augmented Generation (RAG) chatbot into his personal Drupal blog, using vector search and open-source modules to enable contextual responses from his site content.
The chatbot setup uses Gemini’s “Embedding 001” model to vectorize queries, pgvector for semantic comparison in PostgreSQL, and GPT‑4o‑mini for generating answers. Trelvik leveraged several AI-related modules, including ai, ai_search, ai_chatbot, ai_assistant_api, and search_api, along with gemini_provider and ai_vdb_provider_postgres.
By retrieving only site-specific content, the chatbot offers focused answers with fewer hallucinations. Trelvik also implemented a detailed system prompt to govern tone, citation behavior, and user interaction style—tailored for employers and peers exploring his portfolio. The only unresolved issue is a theming bug in the default drupal/cms setup, which affects the chatbot window's layout.
Though experimental, the post offers practical insight into building small-scale, content-aware chatbots using Drupal’s AI ecosystem. Readers can explore the implementation directly on his blog.
Read the full post: Building a content-aware AI chatbot by Thomas T. Trelvik

