Download the PHP package davidbel/magento-ai-search without Composer
On this page you can find all versions of the php package davidbel/magento-ai-search. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download davidbel/magento-ai-search
More information about davidbel/magento-ai-search
Files in davidbel/magento-ai-search
Package magento-ai-search
Short Description AI search module for Magento 2.
License MIT
Homepage https://github.com/DavidBelicza/Magento-AI-Search
Informations about the package magento-ai-search
Magento AI Search
An AI provider-agnostic semantic search solution
for Magento, Mage-OS, and Adobe Commerce.
See the User Guide for complete installation and configuration instructions.
See the Cost Analysis to learn how this module can save up to $29,993 per year.
๐ก Motivation
What if there was a module using Magento's default search engine to provide actual meaning-based AI search without breaking the default one? This is that module.
Inspired by Google Cloud's Commerce AI Search, the module reads and chunks product descriptions, uses a remote AI server to convert the text chunks into vectors, then saves those vectors to Magento's default search engine, OpenSearch. This enables intelligent search based on meaning rather than keyword or synonym matching.
๐ฐ Cost Analysis
This chart compares estimated first-year direct vendor costs for a catalog of 100,000 products in two languages with 1 million submitted searches per month. The assumptions, calculations, pricing sources, and limitations are documented in the Cost Analysis.
The module bars appear almost flat because the managed services cost hundreds or thousands of times more on the same linear scale.
๐๏ธ Use Cases
Customer product discovery
Semantic search is most useful when shoppers describe a need, experience, or intended use instead of entering the exact words used in the catalog. It works especially well when product descriptions and dynamic documents contain rich, specific information.
| Store type | Useful product content | Example search |
|---|---|---|
| Consumer electronics | Compatibility details, technical features, setup instructions, and usage guidance | comfortable headphones that block office noise |
| Tea and specialty food | Flavor, aroma, origin, preparation, and recommended occasions | a gentle floral tea for a calm evening |
| Fashion and luxury | Fit, texture, materials, comfort, quality, mood, and occasion | an elegant coat that feels soft and comfortable all day |
| Home and furniture | Dimensions, materials, room type, style, comfort, and practical use | a compact comfortable chair for a small reading corner |
| Outdoor and sports | Activities, terrain, weather, durability, and performance characteristics | waterproof shoes for long walks on wet rocky paths |
| Technical and B2B catalogs | Applications, constraints, compatibility, operating conditions, and specialist terminology | a compact pump suitable for corrosive liquids |
Catalog content quality review
Admin semantic-search testing can reveal weak product descriptions by showing whether representative shopper queries find the expected products and text chunks. This is a content-quality signal, not a measure of marketing effectiveness, which still requires conversion analytics or A/B testing.
The module produces stronger results when indexed product content clearly describes the benefits, attributes, and use cases that shoppers are likely to search for.
๐ What Semantic / AI Search Is
| Search query | Matching product descriptions |
|---|---|
| coffee for cold winter mornings | A rich dark roast with notes of cocoa and toasted spice. A seasonal coffee blend with cinnamon, caramel, and a warming finish. An insulated travel mug that keeps coffee hot throughout chilly days. |
| big coats for small kids | A roomy insulated parka for toddlers, with extra space for winter layers. An oversized puffer coat for young children, with adjustable cuffs and a warm hood. |
| gift for a home cook | A balanced chef's knife for precise everyday preparation. A durable bamboo cutting board with a deep juice groove. A compact digital scale for accurate cooking and baking. |
| I want to sleep better | A weighted blanket designed for calm, comfortable nights. Blackout curtains that reduce outside light in the bedroom. |
| stay warm outdoors | An insulated jacket designed for cold and windy conditions. A breathable merino wool base layer for winter activities. |
๐๏ธ Architecture
- Magento's indexer detects product changes, reads the selected store-scoped content, splits it into chunks, and saves the documents and chunks locally.
- Scheduled workers send pending chunks to the AI server in batches, receive their vectors, and publish them to a versioned index in Magento's OpenSearch service.
- When a shopper searches, the AI server converts the query into a vector and OpenSearch finds products with similar meaning. Magento continues to handle the catalog query and result page.
- If semantic search is disabled or unavailable, the request falls back to Magento's default search.
Reindexing workflow
Only key configuration changes trigger automatic full reindexing. The Admin UI flags these settings with tooltips for administrators.
| Reindexing mode | Product parsing | Text chunking | Vector embedding | Search indexing |
|---|---|---|---|---|
| Delta | Update documents for affected products | Parse and chunk changed documents | Embed only updated text chunks | Update index |
| Full | Update documents for all eligible products | (Re-)parse and (re-)chunk all documents | Embed all text chunks | Build new index |
โ๏ธ System requirements
Distribution
| Distribution | Status |
|---|---|
| Magento Open Source | โ Supported |
| Adobe Commerce | โ
Supported โน๏ธ Product Staging, Catalog Permissions, and B2B Shared Catalogs are not supported yet |
| Adobe Commerce on Cloud | โ
Supported โน๏ธ Product Staging, Catalog Permissions, and B2B Shared Catalogs are not supported yet |
| Mage-OS | โ Supported |
Magento
| Magento | PHP | OpenSearch | Status |
|---|---|---|---|
| 2.4.9 | 8.5 | 3 | โ Supported |
| 2.4.9 | 8.5 | 2.19 | โ Supported |
| 2.4.9 | 8.4 | 3 | โ Supported |
| 2.4.9 | 8.4 | 2.19 | โ Supported |
| 2.4.8-p3+ | 8.4 | 3 | โ Supported |
| 2.4.8 | 8.4 | 2.19 | โ Supported |
| 2.4.8-p3+ | 8.3 | 3 | โ Supported |
| 2.4.8 | 8.3 | 2.19 | โ Supported |
| 2.4.7-p10 | 8.3 | 3 | โ Supported |
| 2.4.7-p5+ | 8.3 | 2.19 | โ Supported |
OpenSearch must include the k-NN plugin, which is bundled with the standard OpenSearch distribution normally used with Magento.
Storefront
| Storefront | Status |
|---|---|
| Luma | โ Supported |
| Hyvรค | โ Not supported โน๏ธ Hyvรค's layered navigation customization breaks Magento's default relevance sorting, which also affects semantic result ordering. (Package: hyva-themes/magento2-default-theme 1.5.2; issue: position_category_* replaces relevance sorting.) |
| Headless (GraphQL) | โ Supported |
AI server
| Feature | Current support |
|---|---|
| Embedding models | โ Any model exposed through a supported endpoint (OpenAI text-embedding, Gemini Embedding, EmbeddingGemma, Cohere Embed, Voyage, Jina Embeddings, BGE, E5, GTE, Nomic Embed, Qwen Embedding, Mistral Embed, etc.) |
| API protocol | โ
OpenAI-compatible APIs โ Configurable embedding endpoint URLs โ OpenAI hosted API โ Google Gemini OpenAI-compatible API โ LM Studio โ Ollama โ llama.cpp โ Google Gemini native API |
| Authentication | โ
Unauthenticated endpoints โ Bearer-token authentication โ Google Gemini OpenAI-compatible API keys โ Google Gemini native API-key authentication |
๐ฆ Install
Complete installation steps are available in the User Guide.
๐ง Settings
The module settings are available in Stores > Settings > Configuration > AI Search.
The module dashboard is available in System > AI Search > Dashboard.
Complete configuration instructions are available in the User Guide.
๐ Performance
Catalog Scaling
The estimates are based on a cron job scheduled to run every 60 seconds, with 100
chunks per embedding batch, up to 3 concurrent embedding requests, and a maximum
worker runtime of 600 seconds. Each generated description contained approximately
1,500 estimated tokens and produced around 5 chunks. The chunks averaged about
300 estimated tokens, with a maximum size of 350 tokens and an overlap of 50 tokens.
| Visible simple SKUs | Vectors | Active processing | Conservative total |
|---|---|---|---|
| 1,000 | 6,000 | 2m 14s | 2m 14s |
| 10,000 | 60,000 | 22m 20s | 24m 20s |
| 100,000 | 600,000 | 3h 43m 16s | 4h 5m 16s |
| 1,000,000 | 6,000,000 | 1d 13h 12m 35s | 1d 16h 55m 35s |
The measurements show predictable linear scaling under the tested configuration, proving that the worker architecture can support larger, long-running catalog workloads.
These estimates describe an initial full ingestion or a deliberate full rebuild of the product content used for search. In normal operation, only changed content is processed, and product descriptions usually change far less often than prices or inventory. Processing an entire catalog is therefore an occasional workload, such as during initial setup, major content campaigns, or embedding configuration changes, rather than a daily requirement.
Time Distribution
The processing configuration can be tuned further for larger catalogs. However, most of the computational work is performed by the AI server. These measurements used a local development AI server; production servers typically scale further.
๐ Documentation
- User Guide
- Cost Analysis
- Solution Discovery
- Contributing Guide
- Security Policy
- Code of Conduct
- MIT License
All versions of magento-ai-search with dependencies
ext-mbstring Version *
guzzlehttp/guzzle Version ^7.5
guzzlehttp/promises Version ^2.0
magento/framework Version 103.0.*
magento/module-backend Version 102.0.*
magento/module-bundle Version 101.0.*
magento/module-catalog Version 104.0.*
magento/module-catalog-graph-ql Version 100.4.*
magento/module-config Version 101.2.*
magento/module-configurable-product Version 100.4.*
magento/module-cron Version 100.4.*
magento/module-elasticsearch Version 101.0.*
magento/module-grouped-product Version 100.4.*
magento/module-graph-ql-cache Version 100.4.*
magento/module-indexer Version 100.4.*
magento/module-open-search Version 100.4.*
magento/module-page-cache Version 100.4.*
magento/module-store Version 101.1.*
magento/module-ui Version 101.2.*
php Version >=8.3
psr/http-message Version ^1.1 || ^2.0
psr/log Version ^1.1 || ^2.0 || ^3.0