This module enhances Drupal's Search API by using a Large Language Model to match user searches with terms from a configured taxonomy. It allows users to search using everyday language and automatically adds relevant taxonomy terms to improve search results.
LLM Enhanced Search improves Drupal Search API by using a Large Language Model (LLM) to match natural-language searches with terms from a configured taxonomy vocabulary.
Use this module when your site uses controlled taxonomy terms, but users may search using synonyms, descriptions, or everyday language instead of the exact terminology.
Connect to any OpenAI-compatible endpoint, including AI servers hosted on-premises or on your own infrastructure.
For example, a user searching for portable computer can have the taxonomy term Laptop automatically added to their Search API query.
Features
- Enhances Search API queries using an LLM.
- Maps natural-language searches to terms from a configurable taxonomy vocabulary.
- Validates LLM results against the configured vocabulary before adding them.
- Avoids adding terms already present in the user's query.
- Preserves other exposed filters from the Search API View.
- Leaves the original query unchanged when no valid term is identified.
- Check /admin/reports/status to verify that the configuration can communicate with the configured LLM.
Additional Requirements
- Search API
- A Search API-powered View with an exposed full-text search filter
- A configured Drupal taxonomy vocabulary
- An LLM service compatible with the OpenAI API
Post-Installation
Please read the README.txt for configuration steps
How It Works
The module acts as a query-enhancement layer:
User query => LLM => validated taxonomy term => enhanced Search API query => Search API results
The LLM response is validated against the configured vocabulary, so only valid taxonomy terms can be added to the search query.
Supporting organizations
LINAGORA sponsored initial developpement of D11 version of this module
Ask your assistant about Llm Enhanced Search
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
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.