magic_search
No security coverage
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:
- Understands Intent: Uses AI to analyze and refine the search query, determining what the user really wants to know
- Retrieves Context: Searches your vector database index for the most relevant content across your entire site
- Generates Answers: Uses large language models to synthesize information into clear, accurate, contextual responses
- 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
- 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
- Drupal 10 or 11
- AI module
- AI Search module
- Token module
- An AI provider (Gemini, OpenAI, Anthropic, etc.)
- A vector database (configured via AI Search module)
Quick Start
- Install via Composer:
- Enable the module:
-
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
- Create search types at: Admin > Configuration > Search and metadata > Magic Search types
- Place the Magic Search Results block on your search results page
- Search your site and watch the magic happen!