Settings page
Chat block
Chat Interface

This project is not covered by Drupal’s security advisory policy.

The RAG AI Assistant module provides an AI-powered chatbot for Drupal using Retrieval-Augmented Generation (RAG), enabling context-aware and dynamic responses based on site content or external data sources.

It integrates AI capabilities into Drupal, allowing users to query information and receive relevant responses through a simple API-driven architecture. The module is designed to be flexible and extensible, making it suitable for knowledge bases, support assistants, and content-driven AI experiences.

Features

  • AI-powered chatbot using the RAG approach
  • Context-aware responses based on site content or external data sources
  • API-driven architecture for easy integration
  • Configurable admin settings
  • Support for anonymous and authenticated users
  • Extensible and developer-friendly design
  • Integration with Drupal logging system

Requirements

  • Drupal 10, 11 or Drupal 12
  • PHP 8.3 or higher

Configuration

  1. Navigate to: /admin/config/rag-ai-assistant/settings
  2. Configure:
    • API settings (if applicable)
    • Chatbot behavior options
    • Message handling settings
  3. Save configuration

RAG Chat Page

The module provides a dedicated chatbot page available at /rag-chat, offering a full-page interface for users to interact with the AI assistant.

Accessing the Chat Page

  1. Ensure the module is enabled
  2. Open your browser and navigate to: /rag-chat
  3. Start interacting with the chatbot by entering your query

Permissions

  • The page can be configured to allow access to anonymous users
  • Access can be restricted using Drupal permissions if required

Chatbot Block Placement

The module also provides a chatbot interface that can be displayed using a Drupal block.

Steps to Add the Chatbot Block

  1. Go to the Block Layout page: /admin/structure/block
  2. Select the region where you want to display the chatbot (e.g., Sidebar, Footer, or Content area)
  3. Click on “Place block”
  4. Search for “RAG AI Chat”
  5. Click “Place block” next to the block
  6. Configure block settings such as visibility (pages), user roles, and title
  7. Click Save block

Recommended Setup

  • Place the chatbot in the footer for global access across the site
  • Use sidebar placement for contextual usage
  • Enable visibility for both anonymous and authenticated users if required

Optional Customization

  • Customize the block template (Twig) for UI changes
  • Add custom JavaScript for enhanced chatbot interaction
  • Integrate with frontend frameworks if needed
Supporting organizations: 
Module development and maintenance

Project information

Releases