New Module: AI Assistant for Magento 2
- Eugen Barilyuk
- Extensions
- Mar 21, 2023
- 13 min read
A scary good tool, as it is called by Elon Musk, can work for your Magento store. It is ChatGPT - an AI-based chatbot, which is considered by Forbes as a major disruptive technology in a decade. And you can use it to save time and reduce work on writing text content for your store. The ChatGPT writes texts almost as human and on almost any topic. You can easily embed this chatbot in your store with our new AI Assistant extension.
ChatGPT is scary good. We are not far from dangerously strong AI.
— Elon Musk (@elonmusk) December 3, 2022
- How GPT3/ChatGPT can be useful for a Magento store
- How AI Assistant makes GPT3/ChatGPT simple to use out of the box
- How to use AI Assistant for any text-related task
- Summary
How GPT3/ChatGPT can be useful for a Magento store
GPT3/ChatGPT technology can be useful for a Magento store in any situation that requires writing text:
- Customer Support. Provide quality customer support while spending less time writing responses to the requests of your shoppers.
- Sales Assistance. You can use ChatGPT to assist customers with their purchase decisions. This chatbot can make a series of questions to help shoppers better understand products that will fulfill their needs and preferences in the best way. Additionally, it can provide personalized recommendations and suggestions for products.
- Product Information. The power of AI will help you to write catchy titles and informative product descriptions. By doing so, your customers will feel more confident as they will have the information to make an informed purchasing decision.
- Automated notifications. ChatGPT can be integrated with the store's order management system to provide customers with real-time updates on the status of their orders.
- Marketing. This AI can help you in generating ideas for promotional sales, discounts, and other marketing initiatives for your Magento store.
Read our article Magento & ChatGPT: how to simplify copywriting for your store to see how ChatGPT can be so good in writing text, and examples of its use for a Magento store.
OpenAI has launched a next generation of GPT language model - GPT-4. The AI Assistant module is expected to get the support for GPT-4 API.
How AI Assistant makes GPT3/ChatGPT simple to use out of the box
You can totally use ChatGPT as is via its web interface on page chat.openai.com or on page platform.openai.com/playground. However, with the AI Assistant extension, this AI-based chatbot can be embedded in your Magento admin. The power of ChatGPT will be available in one click, saving you time, streamlining your work, and increasing productivity.
The AI Assistant module comes with a set of predefined templates for some of the most frequent tasks: SEO meta tags, product descriptions, newsletters, customer support, etc.
However, the best part of the AI Assistant is that it is not limited to a specific set of tasks. Create or customize prompts for your tasks, and you will receive quality content for your store.
Customer Support
Efficient customer support is crucial for any business. AI Assistant can help your support team generate answers to customer inquiries.
Full answer for any ticket request will be generated from a small prompt with a click of a button. In a second, you will receive a well-written message in a friendly tone, which is ready to be sent to your customer.
However, if you prefer communicating with your shoppers by yourself, you can benefit from AI Assistant as well. With this module, your replies to customers will always be grammatically correct. Simply use the Fix Grammar button.
The AI Assistant will also help you to ensure the replies of your customer support are always written in a friendly manner. A click on the Friendly button will make ChatGPT rewrite the existing reply in a friendly tone.
With the AI Assistant module, your customer support can provide relevant and polite responses to customers while decreasing response times. In the end, this allows customers to get better service in your Magento store.
Catalog Management
Short description for products
Product content drives sales: 87% of shoppers rate product content as very important when they make a decision to buy. A detailed product description is in top-3 key elements of product content, according to Salsify.
Save yourself time on writing product descriptions. With the AI Assistant module, you can easily create a product description and generate a short product description with a brief highlight of the product's main features.
The output can be automatically converted to HTML when required. For example, Magento expects product descriptions in HTML format. Simply activate the HTML option in the prompt configuration.
SEO meta tags
Product meta tags are vital elements that impact the visibility of your products in search engines. Google and other search engines use meta tags to display information on your product pages in their search output.
With AI Assistant, you can generate and rewrite existing meta tags for your products. This feature saves time and effort while ensuring the quality of your product content that is visible to potential shoppers when they search for a place to buy.
Generate meta title, meta keywords, and meta description in one click for any of your products. All you need is to configure respective prompts for the AI Assistant extension.
Blogging and social media
Catchy titles for your blog article
A great blog article can attract many more readers if it has a catchy title. For example, you may want to avoid such words as "best" or "always" in your titles. In fact, average click-through rate on headlines with negative superlatives is a 63% higher than that of their positive counterparts.
The AI Assistant can help you to generate blog titles that attract readers.
Short description for your blog article
Typically you will need an excerpt of your blog article content. This short description is displayed on the blog main page, related articles block, etc.
AI Assistant extension will use ChatGPT to generate an article excerpt in a second.
Meta tags for your blog articles
Since a blog is another essential tool that drives your sales by organically generating leads, you should maintain its SEO.
Save your time and leave it for ChatGPT to write meta title, meta keywords, and meta description for your blog articles.
Writing tweets for you
Social media is an important channel to increase your sales. If your post goes viral on social media, your store may see a spike in visitors and sales. Stores that actively post in social media have 32% more sales on average.
Email Newsletter
With AI Assistant, creating professional email newsletters is a breeze. Simply provide a list of key points, and the module generates a well-written email newsletter in no time.
The module has a predefined prompt for the newsletter subject and the email content.
Automated prompt execution
Any prompt you have created for a text-related task can be executed automatically. This can be handy, for example, when you regularly add new products to your catalog and you need to fill their SEO meta tags, product short descriptions, etc.
Create a set of automation rules and configure Cron to execute them by schedule.
Each rule is applied when a set of conditions you configure are met. For example, you can apply one prompt for a specific product type and another prompt - to a second product type. A third prompt can have no conditions, and it will be applied to every product.
How to use AI Assistant for any text-related task
The AI Assistant extension is very helpful right out of the box due to a number of predefined prompts for GPT3/ChatGPT. However, you are free to customize and create new prompts for any task related to text writing in your store.
How AI Assistant works
The AI Assistant extension is based on the power of the GPT-3/ChatGPT neural network. This network generates a well-written text from a small text prompt that describes the task. For example, for the prompt What should I wear in winter the ChatGPT will write several paragraphs of text explaining what clothing a human should put on in winter.
AI Assistant extension provides a convenient interface within Magento admin that allows sending to ChatGPT a specific task. Each task is configured as a prompt for ChatGPT. See the list of prompt examples the AI Assistant provides out of the box.
Default prompts the AI Assistant ships with are blocked from editing to ensure the extension work stability.
In case you need to edit a default prompt duplicate it and deactivate the original. You can freely edit the duplicate.
AI Assistant prompts basics
Prompts consist of two parts: a static part and variables. Static part is the task for the ChatGPT, for example, to write a newsletter. Variables are written as {{variable_name}} and they allow to include already existing data in the prompt. See the list of available variables to use in your prompts.
For example, use variables to send post title and content to ChatGPT.
To see the final prompt with variables replaced with their values you may click on the prompt name above the ChatGPT reply:
This prompt was configured with variables:
Customer Name: {{ticket.customer}} There is a last message from customer: ``` {{ticket.lastMessage}} ``` Write an personal message that explain next things: ``` {{global.input}} ``` Write in the same language as the initial text:
When this prompt was sent to ChatGPT the variables were replaced with values and the prompt looked like this:
Customer Name: Ann Peterson There is a last message from customer: ``` I see. Thanks. ``` Write an personal message that explain next things: ``` ``` Write in the same language as the initial text:
Prompt fields
To create a prompt for AI Assistant you need to fill up a list of predefined fields.
- Active. Activates the prompt to be accessible for usage.
- Code. Prompt identifier to be used by the extension.
- Title. Prompt name that is visible in the Magento admin to the user.
- Prompt. Contains a short prompt for ChatGPT. Use variables here to adjust the ChatGPT response to the specific request.
- Frequency penalty. This value controls the tendency for repeating words in the output. It can be from 0 to 1. When a value is lower words will be repeated more frequently.
- Scopes. To avoid mixing of the prompts the AI Assistant allows choosing a scope for the prompt: product, blog, ticket. If a prompt scope is set to Blog, it will be available on pages related to blog. When a scope is set to Product the prompt will be available on pages related to products. Ticket scope reserves the prompt to customer support tickets.
- Field Selectors. Specify a Magento field in which the extension will insert the ChatGPT output. You can use multiple field selectors in one prompt.
How to get a field selector name
One of the ways to get the field selector name is to look it up in the source code of the Magento admin page that has the field you need.
For example, to get a field selector name for the blog post text in your Magento admin open any blog post and click right mouse button on the post content area.
Select option Inspect code and the browser will open its developer tools to highlight the HTML code of the field you want to inspect.
Write down the type and the name of the element. In case of the blog post content these are
textarea name="content"
.Return to the prompt configuration page and set the field selector as
.blog-post-edit textarea[name="content"]
.
- Sort order. Sets the prompt position in the grid of prompts.
- Open in a window. When it is set to No, the ChatGPT output immediately replaces the original text. When it is set to Yes, you will have a preview window.
- Help text. Any additional information for ChatGPT to use when generating the output. For example, for an SEO meta title prompt, a help text may be to omit using such words as excellent, best, or revolutionary.
- Convert output to HTML. Activate it if the output text should be formatted as HTML.
Example 1: Get spellchecking for blog articles with AI Assistant
You would definitely want the perfect grammar and spelling for your blog articles. Sites with the sloppy grammar have 85% higher bounce rate than sites who publish spell-checked content. Some website owners report that a single spelling mistake on a page can cut sales in half.
The prompt for revising grammar for blog post is not available in AI Assistant out of the box. So we need to create one.
Create a prompt for blog article spellcheck
Navigate to System > AI Assistant > Prompts and add a new prompt or duplicate an existing one.
Code | fixgrblog |
Title | fix_gr_blog |
Prompt |
Fix grammar in the following blog post. Keep all original line breaks. ``` {{post.content}} ``` Post: |
Scopes | Blog |
Field Selectors | .blog-post-edit textarea[name="content"] |
Help Text | |
Convert output to HTML | No |
We have determined field selectors for this prompt for cases when Page Builder is enabled and disabled.
In Page Builder the button for prompt activation will appear when you enter in a text edit mode.
For Page Builder use the selector value
.blog-post-edit textarea[name="html"]
. For HTML editor use.blog-post-edit textarea[name="content"]
.You may include both field selectors in one prompt. Separate the field selectors with coma.
Use the prompt for fixing a blog post grammar
Having an active prompt for fixing a blog post grammar, in your Magento admin open the post you want to correct and click on the prompt activation button.
See how ChatGPT fixes all the misspelled words that were underlined by the browser spellcheck.
With such prompt you can easily and quickly fix the grammar and spelling of all your blog posts, which may lead to increased conversion rate.
Example 2: Automatically translate blog articles with AI Assistant
Posting content, like product descriptions or blog articles, on multiple languages is a simple way to increase your audience. For example, 60% of shoppers don’t buy from english-only websites.
Let’s create a prompt to automatically translate blog post from English to German.
Create a prompt for translating a blog article
Navigate to System > AI Assistant > Prompts and add a new prompt or duplicate an existing one.
Code | translate_blog |
Title | Translate blog article |
Prompt |
Translate the following blog post from English to German. Keep all original line breaks. ``` {{post.content}} ``` Post: |
Scopes | Blog |
Field Selectors | .blog-post-edit textarea[name="html"], .blog-post-edit textarea[name="content"] |
Help Text | Translate the following blog post from English to German. |
Convert output to HTML | Yes |
Use the prompt for translating a blog post
Having an active prompt for translating a blog post, in your Magento admin open the post you want to translate and click on the prompt activation button.
Since the prompt was configured to use a window mode you will see the ChatGPT output in a window. Click Apply to replace the original text with the translated text.
Summary
The ChatGPT AI-based chatbot can help you run your Magento store with less time spent on typical tasks of writing content for your product pages and blog articles, newsletters, and customer support tickets.
Using the Mirasvit AI Assistant extension, you are not limited to a set of predefined tasks. Simply create a prompt for any text-related task and see how GPT3/ChatGPT will write what you need.
For example, in addition to predefined tasks of writing SEO meta tags, product descriptions, and customer support tickets, you can check spelling, translate to other languages, get ideas for tweets, etc.
The flexibility the AI Assistant applies GPT3/ChatGPT to Magento is so great that only your imagination is the limit. There is no finite list of what this extension is capable of. ChatGPT can do any text-related task, and AI Assistant allows communication with ChatGPT from almost any page or block in your Magento store.
Check the power of AI for your online store with an AI Assistant for Magento 2 functional demo.