ai_rag_assistant
No security coverage
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 or Drupal 11
- PHP 8.3 or higher
Configuration
- Navigate to: /admin/config/rag-ai-assistant/settings
- Configure:
- API settings (if applicable)
- Chatbot behavior options
- Message handling settings
- 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
- Ensure the module is enabled
- Open your browser and navigate to: /rag-chat
- 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
- Go to the Block Layout page: /admin/structure/block
- Select the region where you want to display the chatbot (e.g., Sidebar, Footer, or Content area)
- Click on “Place block”
- Search for “RAG AI Chat”
- Click “Place block” next to the block
- Configure block settings such as visibility (pages), user roles, and title
- 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