Install
Works with Drupal: ^11Using Composer to manage Drupal site dependencies
Alternative installation files
Release notes
Initial alpha release - a Drupal 11 module that transforms site content into a Retrieval-Augmented Generation system using Ollama and pgvector.
Features
- Automatic indexing of Drupal entities (nodes, files, media) into vector embeddings
- Text extraction from PDF, DOCX, XLSX, PPTX, ODT, TXT, Markdown, JSON, XML, CSV
- Sentence-boundary-aware chunking with configurable size and overlap
- Ollama integration for embeddings (any embedding model) and chat generation
- Native pgvector storage with HNSW index for cosine similarity search
- Three REST API endpoints: /api/rag/query, /api/rag/prompt, /api/rag/augment
- Configurable RAG prompt template with {{context}} and {{query}} placeholders
- Dedicated queue table (drupal_rag_queue) isolated from Drupal's default queue
- Settings form at /admin/config/search/drupal-rag with live model list and test connection
- Status page at /admin/reports/drupal-rag
- Drush command: drupal-rag:queue-all (alias rag:qa)
- Permission-based access control (access rag query, administer drupal rag)
- Event deduplication: published-status check, entity_presave disabled, upsert pattern
Requirements
- Drupal 11
- PostgreSQL with pgvector extension
- Ollama running locally or on the network
Known limitations (alpha)
- entity_label defaults to empty string for entities processed before the column was added
- metadata column is always NULL (not yet populated from entities)
- No streaming support for /api/rag/augment responses
- RagQueryController::status() uses \Drupal::service() instead of proper DI
- Vector dimension is hardcoded at 768 (typical for nomic-embed-text)
- No tests yet
- APIs and database schema may change
Contributors
Initial development by reinchek.