Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Varbase FAQs 9.2.1 Minor update available for module varbase_faqs (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Magic Search

No security coverage
View on drupal.org

This module enhances Drupal's search functionality by using AI and RAG technology to provide intelligent, contextual answers and summaries above traditional search results. It understands user intent, retrieves relevant information from a vector database, and generates synthesized responses, offering a more intuitive search experience.

Transform your Drupal search with AI. Display dynamic, contextual answers and summaries above traditional results to better address user intent using RAG technology.

Magic Search transforms traditional keyword-based search into an intelligent, AI-powered experience that truly understands what your users are looking for.

Instead of just listing search results, Magic Search displays a dynamic block with direct answers, contextual summaries, and relevant links that directly address user intent - all powered by AI and RAG (Retrieval Augmented Generation) technology.

How It Works

When a user searches your site, Magic Search:

  1. Understands Intent: Uses AI to analyze and refine the search query, determining what the user really wants to know
  2. Retrieves Context: Searches your vector database index for the most relevant content across your entire site
  3. Generates Answers: Uses large language models to synthesize information into clear, accurate, contextual responses
  4. Composes the Layout: The AI dynamically selects which UI components to use from your configured component library and determines how to structure the response block based on the vector chunk results and an LLM-syntesized information
  5. Displays Results: Renders the AI-composed block with the selected components, content, and layout (often along with traditional search results)

Key Features

AI-Powered Intelligence

  • Intent Recognition: Understands user queries and generates optimized search terms
  • RAG Technology: Combines vector search with large language models for accurate, contextual responses
  • Smart Caching: Optimizes performance by caching AI responses to reduce API calls
  • Provider Agnostic: Works with Gemini, OpenAI, Anthropic Claude, or any AI provider supported by the Drupal AI Core

Flexible Configuration

  • Multiple Search Types: Create different search configurations for various contexts
  • Custom Prompts: Define how AI should behave with full Drupal token support
  • Component Library: Configure which UI components are available to the AI - the LLM intelligently decides which components to use and how to arrange them for each query
  • Fine-Tuned Control: Adjust AI parameters like temperature, tokens, and penalties per use case

Use Cases

  • Documentation Sites: Provide direct answers to "how-to" questions
  • E-commerce: Help customers find products based on needs, not just keywords
  • Knowledge Bases: Surface relevant information from large content repositories
  • Corporate Websites: Guide visitors to the right content quickly
  • Educational Platforms: Answer student questions with contextual information

Requirements

Quick Start

  1. Install via Composer:
  2. Enable the module:
  3. Configure at: Admin > Configuration > Search and metadata > Magic Search settings
    • Set up your AI providers (intent and RAG models)
    • Configure your search index
    • Customize prompts for your use case
  4. Create search types at: Admin > Configuration > Search and metadata > Magic Search types
  5. Place the Magic Search Results block on your search results page
  6. Search your site and watch the magic happen!

Activity

Total releases
1
First release
Feb 2026
Latest release
5 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
1.x-dev Dev Feb 9, 2026