Part of the AI ecosystem · 361 projects
This module provides an AI-powered search interface that allows users to query your Drupal content using natural language. It streams responses in real-time, offering a conversational way to find information on your site.
AI Powered Search Block answers the questions your visitors type, with content from your own site. An LLM writes the answer from the pages you indexed. Every answer links to the sources it used. You configure it. You do not code it.
The feature needs two blocks: an input block and a response block. Both point at a Search API index that stores your content as vectors. This is RAG search in Drupal. The module retrieves your content, the model writes the answer, and the sources sit under it.
Trusted answers, not invented ones
- The model only sees content from your index. It does not answer from general knowledge.
- Every answer links to the pages it used. You choose the view mode that renders those pages.
- A score threshold and a minimum result count decide when there is enough content for an answer. With less content than that, the block shows your own message instead of a guess.
- You can select a guardrail set from the AI module, or pick individual guardrails. Every AI call the module makes has its own guardrail setting: the search block, the question tagging, the content gaps analysis and the analysis of poorly rated answers. Each one is off until you turn it on, and each keeps its own choice, because the four calls do different work.
- You can also block the queries that contain words you list.
- The log submodule stores the prompt and the sources of every answer. Nothing about an answer stays hidden.
What you get
- AI Search block: the question input.
- AI Search Response block: it shows the answer word by word, while the model writes it. This is a separate block, so you decide where the answer appears on the page.
- Settings for the RAG prompt, the retrieval (score threshold, result count, optional reranking), the chat model, and the view mode for the sources.
Submodules
AI Search Block Log
The log stores every question, the answer the visitor received, the prompt behind it, and the sources it used. Visitors can rate an answer and leave feedback. The module keeps that feedback with the log entry.
Reports show searches per day, per block and per user, plus the scoring statistics.
A separate report analyses the answers visitors disliked. An answer counts when the visitor scored it at or below a threshold you set, or when they wrote feedback. Feedback counts on its own, because somebody who takes the time to write it has something to say, whatever they clicked.
Opening that page costs nothing. It lists the answers and waits. The model runs when you press the button. The answer is then kept, with the time it was produced, so a refresh or a colleague opening the page does not pay for it again. The prompt is kept too, so an edit one person makes is the prompt everybody sees. The settings sit in four tabs: Logging, AI configuration, Detection and Guardrails.
AI Search Block Log Tag
The module classifies the logged questions with your own tags. It uses a fast model and a prompt you control.
The tags are taxonomy terms. You select a vocabulary for each block, so a professional block and a consumer block can use different term sets. The module installs a vocabulary named AI search tags to start from, and any vocabulary of your own works just as well.
The log keeps a reference to the term, not a copy of its name. A term you rename therefore keeps its history, and every report shows the new name at once.
The prompt supports three tokens: [user_question], [user_answer] and [configuration_tags]. The last one is filled with the names of the terms in the vocabulary of that block. Only a name that matches a term is stored.
Tagging runs in a queue on cron, so a search never waits for it. You can tag the existing logs in bulk. You can repeat that safely, because the module replaces the tags of a log instead of adding duplicates.
The classification reads the question of a visitor and the answer it received, so it has a guardrail setting of its own. The settings page holds four tabs: AI configuration, Classification, Processing and Guardrails.
The statistics page shows the number of questions, how many of them carry tags, and how often the module applied each tag. A term that never matches is easy to spot. Each block then has its own page with three charts: searches per day by tag, searches per tag, and the share per tag.
AI Search Block Content Gaps
Content gaps are the questions your site did not answer. The submodule collects them, newest first. Each question links to its log entry, so you can read the answer and the sources it found.
Detection is tag-driven. The tagging prompt marks a failed answer with a tag, NO_RELEVANT_CONTENT_FOUND by default. You tick the tags that count as a gap. A question also counts when the search used no content at all. This submodule reads those tags, so it needs AI Search Block Log Tag. A question appears in the list after cron tags it.
One button asks the AI to group the questions into topics, with the number of questions behind each one. That turns a list of failures into a short content plan: what to write next, in the words your visitors already used.
Both the prompt and the answer survive a refresh. The prompt is saved when you evaluate, so an edit one person makes is the prompt everybody sees. The answer is kept with the time it was produced, above a line that says how old it is. Pressing the button replaces it. The settings sit in three tabs: AI configuration, Detection and Guardrails.
AI Search Block Geo
This submodule shows where your questions come from. It adds a Countries tab to the Insights pages, with a world map shaded by question volume and a table of the countries that ask the most. Both can be narrowed to one block and one period.
It does not keep the visitor IP. An IP address is personal data, a country is not, so the module is built so that no IP outlives the lookup. The IP is written only so the lookup has something to read. On the next cron run it is replaced with a two letter country code. If the queue never runs, cron discards every IP older than the retention window anyway, one hour by default. When a log entry is deleted or expires, its country goes with it. Nothing else in the module reads that column, and the lookup never leaves your server: it reads a MaxMind GeoLite2 database on your own disk.
A question whose IP cannot be placed is recorded as Unknown and counted in the summary, so you can tell a quiet country apart from one you failed to detect.
You need a free MaxMind account for a license key, which is held in a Key entity so it stays out of exported configuration, and the geoip2/geoip2 library. The module downloads the database for you and refreshes it on cron.
AI Search Block Tool
This submodule exposes the search through the Tool API, so an AI agent can ask your site a question instead of reading entities and assembling an answer itself. With the MCP tool bridge installed, the tools are also reachable over MCP.
- Ask: answers a question from your indexed content and names the pages behind the answer.
- List configurations: lists the search configurations, so a caller can pick one.
- Content gaps: the same analysis the content gaps page produces.
- Search statistics: how often the search was used, per day and per configuration, with the feedback scores.
- Tag statistics: the topics the questions were about, as a count for each tag.
The tools add no search logic of their own. They call the same helper the browser calls, so retrieval, the prompt and the access filter for each account stay as they are. An answer is filtered per account exactly as it is in the browser.
The reporting tools return plain numbers rather than a chart, because a caller that is not a browser cannot read a canvas. Each one reports a plain failure when the submodule that records what it reports is not installed, so they never break discovery for the others.
AI Search Block Contact Centre
The contact centre is a second front end for your support agents, on the same index. An agent pastes an incoming email or question and picks a response type. The draft answer arrives word by word in an editor, with its sources. The agent edits it before they send it.
Response types are plugins, so another module can add one with a single class. Agents need their own permission, so you can give them the tool without the settings.
Smaller submodules
- AI Search Block Header: a search form for your header. It sends the visitor to the page that holds the AI search blocks, and it runs the query there.
- AI Search Block Extras: small interface improvements, such as an input that grows one row at a time while the visitor types.
Requirements
- Drupal
^10.2,^11or^12. - The AI module
^1.4, with an embedding model and a chat model. - A vector database provider, for example Postgres pgvector
or Milvus. - Search API
^1.39, with an index that stores your content in that vector database.
Three submodules ask for something extra:
- Log Tag needs the core Taxonomy module, which holds the tags.
- Geo needs the Key module, the
geoip2/geoip2library, a free MaxMind GeoLite2 account, and a private file system to keep the database out of the web root. - Tool needs the Tool module, and the MCP tool bridge if you want the tools over MCP.
Getting started
- Configure the AI module with an embedding model and a chat model.
- Create a Search API server that uses the AI Search backend.
- Pick a vector database and a collection name.
- Create the index. Mark one field as Main content before you index.
Without that field, indexing reports success and embeds nothing. - Index your content.
- Place the AI Search block and the AI Search Response block on a page.
- Select the index on the search block.
- If you want logging, tagging, content gaps, countries, agent tools or the contact centre, enable those submodules.
Every admin page of the module is under /admin/config/ai/ai_search_block, in three groups: Insights, Tools and Settings.
Ask your assistant about AI powered Search Block
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
More in the AI ecosystem
Most installed first
Activity
Release Timeline
Releases
| Version | Type | Core | PHP | Release date | |
|---|---|---|---|---|---|
| 1.1.0-rc05 | Pre-release | 10–11 | Nov 19, 2026 | ||
| 1.1.0-rc02 | Pre-release | 10–11 | Oct 28, 2026 | ||
| 1.1.x-dev | Dev | 10–11 | Jul 10, 2026 | ||
| 1.0.0-rc24 | Pre-release | 10–11 | Jun 18, 2026 | ||
| 1.0.0-rc23 | Pre-release | 10–11 | Jun 3, 2026 | ||
| 1.0.0-rc22 | Pre-release | 10–11 | May 26, 2026 | ||
| 2.0.x-dev | Dev | 10–11 | Feb 23, 2026 | ||
| 1.0.0-rc21 | Pre-release | 10–11 | Feb 20, 2026 | ||
| 1.0.0-rc20 | Pre-release | 10–11 | Jan 27, 2026 | ||
| 1.0.0-rc19 | Pre-release | 10–11 | Jan 27, 2026 |