Back to Top

Guide for Magento 2 AI Product Recommendation

Updated 4 May 2026

Magento 2 Product Recommendations extension is an additional feature for the Magento 2 e-commerce platform. 

It allows the store admins to enable AI-based product recommendations on their Magento 2 store.

Magento 2 AI product recommendation utilizes artificial intelligence to suggest products to the customers in the Adobe Commerce store.

The AI algorithm analyzes the products viewed by the customer and provides product suggestions using the embedding technique.

It matches the products’ names, SKUs, super attributes, searchable attributes, and filterable attributes to suggest similar products in the Magento store.

Check the overview of Magento 2 AI Product Recommendations below –

5govdgdA-98


You can also check our Magento 2 AI Image Search Extension where a customer can search for products based on images using AI technology.

For added functionality, consider exploring the Magento 2 Image Background Removal extension to remove image backgrounds.

Also, you can check the Adobe Commerce AI reporting dashboard that give you an upper hand on enhanced data analysis within the Magento 2 store.

Features

  • The admin can set the number of suggested products to display, ranging from 1 to 10.
  • Increase average order value with smart bundling.
  • Automatically generates product recommendations for customers.
  • Matches products based on names, SKUs, super attributes, searchable attributes and filterable attributes.
  • Uses embedding Technique to identify and recommend products through AI.
  • Supports multiple vector databases like OpenSearch, Elasticsearch, Chroma DB, and Milvus DB for flexible implementation.

Minimum System Requirement (API Setup)

The following minimum system requirements are needed for this extension,

  • Python Version – 3.10
  • RAM (4 GB)
  • Space (16 GB)
  • Server key and cert files (for Flask API)
  • Docker (Optional)
  • Two ports (5000 and 8000)
  • API Key (If you would like to use Hosted Platforms Gemini,OpenAI etc. for creating embeddings) – Optional

Note: The minimum system requirements may vary based on the data.

To install AI module, we need SSH access. You can also check the AI Models Server Installation Guide and ChromaDB Installation Guide for reference.

Installation

The installation is quite simple just like the standard Magento 2 extensions.

#Download Module

Firstly, you need to log in to the Webkul Store, go to My Account>My Purchased Products section, verify, and then download and extract the contents of this zip folder on the system.

#Upload Folder

Once the module zip extracts, follow path src>app and then copy the app folder into the Magento 2 root directory on the server as shown below:

magento2 installation

# Run Commands

You need to run the following commands:

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
php bin/magento indexer:reindex
php bin/magento cache:flush

# Additional Commands

Use generate:recomm:embeddings to create or update embeddings from the terminal:

php bin/magento generate:recomm:embeddings

Selected products, by product ID:

php bin/magento generate:recomm:embeddings -p 1,2,3

Flags: -t text embeddings, -i image embeddings, -u user embeddings, -s store IDs (e.g. -s 1,2). You can combine flags as needed for your run.

Language Translation

For translating the module language, navigate through the app/code/Webkul/AIProductRecommendation/i18n and edit the en_US.csv file.

Thereafter, rename the CSV as “en_SA.csv” and translate all right side content after the comma in the Arabic language. After editing the CSV, save it.

installation folder

Now, upload it to the path app/code/Webkul/AIProductRecommendation/i18n where the installation of Magento 2 is on the server.

Magento 2 Product Recommendations will be translated into the Arabic Language. It supports both RTL and LTR languages.

The user can edit the CSV like the image below.

image code

Initial Configuration Settings

After the successful installation of the module, the admin will navigate to Stores > Configuration > AI Product Recommendation Configuration.

configuration1

After enabling the module, the admin can access the initial configuration by navigating AI Product Recommendation Manager> System Configuration.

configuration2
configuration2
configuration3

General Settings:

1. Enabled: The admin can enable or disable the extension functionality in their Magento 2 store by choosing Yes or No.

2. LLM Engine: The LLM Engine determines which AI service is used to run the platform’s intelligent functionality. When you click on the LLM Engine option, two dropdown choices are available:

3. LLM Bridge Provider: The LLM Bridge Provider defines which external AI service is connected to the platform to process and generate intelligent outputs.

Available LLM Providers: OpenAI, OpenRouter, Gemini, Voyage, Mistral, and ONNX.

4. LLM Embedding Model: In this section, the admin can choose the LLM embedding model to be used for processing and understanding data.

5. LLM Image Bridge Provider: It allows the admin to select the LLM provider used for generating image embeddings. Available image bridge options are: Voyage and ONNX.

6. LLM Image Embedding Model: Select image embedding model for selected LLM image bridge provider.

7. LLM Image Embedding API Key: Enter the API key for the selected image embedding provider. You can find the API key here: API Key

8. Use Resized Image for Embeddings: When enabled, resized 512x512 images are used for image embedding generation. This option is used when image embedding model/provider is Voyage.

9. Image Model Is Paid: Use this setting when selected image model/provider is paid. This option is also used when image embedding model/provider is Voyage.

10. API Key: Fill the API key. For LLM, use OpenAI / Gemini / Voyage API key as per the selected bridge.

After entering the API key, the admin can click the Validate button to verify the API key and ensure the AI configuration is set up correctly.

11. Select Attributes to create Embeddings: Admin selects the product’s attributes to create embeddings. Embeddings will be created with selected attribute values.

12. Accuracy: Admin can fill the number in this section. Value must be greater than 0 and less than or equal to 10 (where 1 is highly accurate).

13. Minimum Review For Review-Based Recommendation: Enter the minimum number of reviews required for a product.

AI-based recommendations will be generated only when the product has reviews equal to or greater than this value.

14. Duration: Admin enters the duration in hours for interaction validity.

Vector Database Settings

Vector Database Settings: In the Vector Database Settings section, the admin can click to view additional configuration options listed below.

vector database

Select Vector Database: This section allows the admin to select a suitable vector database (such as OpenSearch, Chroma DB, or Milvus DB) based on performance and project requirements.

Shared (all backends): Text Embedding Dimension and Image Embedding Dimension must match your embedding models. Validate Connection checks that Magento can reach the configured vector store. Delete All Embeddings removes collections or indices from the currently configured vector database.

Chroma DB

When Chroma DB is selected, the module uses:

  1. ChromaDB Endpoint — Full URL of the Chroma server, including port (as in system config, e.g. http://example.com:8000).
  2. ChromaDB API Version — API version that matches your Chroma deployment (required by the module’s Chroma client).

Milvus DB

When Milvus DB is selected:

  1. MilvusDB Endpoint — Milvus server URL with port.
  2. API KEY — Authentication key when your Milvus setup requires it.
  3. Metric Type — Distance metric used for Milvus vector search (must align with how embeddings are compared).

Elasticsearch

When Elasticsearch is selected (catalog search connection supplies host, port, and credentials):

  1. Elasticsearch Index Prefix — Prefix for vector indices (e.g. wk_ai_rec).
  2. Elasticsearch Similarity Metric — Similarity measure for vector search (cosine is typical for many embedding models).

OpenSearch

When OpenSearch is selected (catalog search connection supplies host, port, and credentials):

  1. OpenSearch Index Prefix — Prefix for vector indices (e.g. wk_ai_rec).
  2. OpenSearch Similarity Metric — Similarity for vector search (cosinesimil is recommended for OpenSearch k-NN).

Below Image Shows How to Train Data/Generate Embeddings

embedding commands

The admin can create a new recommendation by navigating to AI Product Recommendation Manager, then going to the Recommendations section and clicking on Add New Recommendation.

Recommendation

Admin needs to fill in the required details in the Recommendation Form to create a new recommendation.

add recommendation

Status: Controls whether the recommendation is active and visible on the storefront.

Name: Defines the title displayed for the recommendation block.

Page Type: Specifies the page where the recommendation will appear (e.g., product, category, home).

Recommendation Type: Determines the logic used to generate product suggestions. The module offers: Trending; Reviews. Category (category and product page only).
User (logged-in customers only). Visual Similarity (product page only). Text Similarity (product page only). and Recently Viewed.

Trending Type: Sets the criteria for identifying trending or popular products.

Start Timing: Schedules when the recommendation becomes visible to users.

End Timing: Defines when the recommendation will automatically stop displaying.

Product Count: Provide the number of products to show in the recommendation.

Sort Order: Decides the position of this recommendation relative to others on the page.

Filter with Current and Child Category: The admin can enable filtering based on the current and child categories, and recommendations will be shown accordingly

.Apply Filters: The admin can enable this option to apply custom filters and display recommendations based on the selected conditions.

After that, click the Save button to display the recommendation on the frontend.

Statistics Menu

When image embeddings are configured with Voyage and Image Model Is Paid is set to No, the Statistics menu is displayed in admin.

In this case, when image embeddings are generated, the image embedding process runs through queue processing, and related processing details are available through the Statistics flow.

If Image Model Is Paid is set to Yes, the Statistics menu is hidden from the AI Product Recommendation menu.

statistic

Storefront – Workflow AI Product Recommendation

After the successful configuration of the module, on the product page, it will generate the AI Recommended section for products suggested by AI.

ai recommended

Adjusting the distance value to 1 and the show products value to 5 in the backend will more accurately display five products recommended by AI.

recommended section

let us take another product’s example: changing the distance value to 4 and the show products value to 7 in the backend.

backpack

Similarly, the admin can choose the number of products to be recommended by the AI and the accuracy of the suggestion as per his choice.

Support

That’s all for AI-Powered Product Recommendation for Magento 2 AI extensions.

If you still have any issues feel free to add a ticket and let us know your views to make the module better at  webkul.uvdesk.com.

Current Product Version - 5.0.0

Supported Framework Version - Magento 2.0.x, 2.1.x, 2.2.x,2.3.x, 2.4.x

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

Back to Top

Message Sent!

If you have more details or questions, you can reply to the received confirmation email.

Back to Home