Experimenting with a RAG-Based AI Chatbot on a Personal Drupal Blog

Thomas T. Trelvik Integrates RAG-Powered AI Chatbot Into His Drupal Blog Using Open Modules

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

Reference: Building a content-aware AI chatbot (23 November 2025)

Disclosure: This content is produced with the assistance of AI.

Disclaimer: The opinions expressed in this story do not necessarily represent that of TheDropTimes. We regularly share third-party blog posts that feature Drupal in good faith. TDT recommends Reader's discretion while consuming such content, as the veracity/authenticity of the story depends on the blogger and their motives. 

Note: The vision of this web portal is to help promote news and stories around the Drupal community and promote and celebrate the people and organizations in the community. We strive to create and distribute our content based on these content policy. If you see any omission/variation on this please reach out to us at #thedroptimes channel on Drupal Slack and we will try to address the issue as best we can.

Related Organizations

Related People

Upcoming Events