Skip to main content

How to moderate reviews and comments with AI

The Advanced Reviews extension for Magento 2 can ask AI whether each new review or comment is genuine or spam. Genuine submissions are approved right away, spam is held for you or rejected, and anything the AI is unsure about stays pending for a human. Every decision is recorded in a log, so you can always see why a review was approved or rejected.

AI moderation checks:

  • reviews submitted on the storefront;
  • reviews a customer edits from their account (the new text is checked again);
  • comments posted on the storefront (see Comments settings); this needs the Comments module (mirasvit/module-comment) 1.4.1 or newer.

Reviews and comments created or edited by an admin are not checked.

1. Connect an AI provider​

AI moderation uses the AI provider configured in Stores -> Configuration -> Mirasvit Extensions -> Advanced Reviews -> AI-powered review features. Make sure a provider and its API key are set there before you turn moderation on.

The text of each checked review and comment is sent to this AI provider. Each check is one request to the provider. To keep the cost under control, set the daily limits described in the next step, and a usage or spending limit in your AI provider account.


2. Turn on AI moderation​

Go to Stores -> Configuration -> Mirasvit Extensions -> Advanced Reviews -> Spam protection.

  • Set AI moderation to one of these modes:
    • Flag only: approve genuine, hold spam for review: a safe start. Nothing is rejected automatically; spam waits for you in Pending Reviews, or in the Comments grid for comments.
    • Full: approve genuine, reject spam: spam is rejected without your involvement.
  • Set Minimum AI confidence. The AI returns a confidence from 0 to 1 with each verdict. A verdict below this value is not acted on, and the submission stays pending. The default 0.80 suits most stores; raise it if you see genuine reviews being rejected.
  • Set AI checks per IP address per day (default 20) and AI checks per day (default 0). They cap how many reviews and comments are sent to the AI over the last 24 hours: from one IP address, and from the whole store. A submission over a limit is not sent to the AI and is not logged; as with AI moderation set to Off, a review stays pending and a comment keeps the status it was posted with. 0 means no limit. Both limits are set in the Default Config scope.
  • Click Save Config.

The table below shows what happens to a submission:

AI verdictFlag onlyFull
GenuineApprovedApproved
SpamLeft pendingRejected
Uncertain, or confidence below the minimumLeft pendingLeft pending

With each review or comment, the AI is told whether its author already has an approved review in your store, or for a comment, an approved review or comment. The author is matched by customer account or email address. Only this yes or no is sent, never the email address or the earlier texts. Returning authors are more often genuine, but a guest can type any email address, so the AI still judges the text itself.

note

Moderation runs in the background through the Magento message queue consumer mirasvit.review.ai_moderation, which Magento cron starts. A review shows as pending for a short while after it is submitted, until the consumer processes it.

A running consumer keeps the settings it started with. If your server keeps consumers running all the time, changes to AI moderation and Minimum AI confidence apply only after the consumer restarts: stop the running mirasvit.review.ai_moderation process, and cron starts it again with the new settings.

tip

With AI moderation on, the Enable email alerts for new reviews email is sent only for reviews that are still pending after the AI check, so you are not alerted about reviews that were already approved or rejected.


3. Exclude products from AI moderation​

Some products attract reviews that look unusual but are genuine. To keep their reviews for manual moderation:

  • Go to Catalog -> Products and open the product.
  • In the Reviews group, set Skip AI moderation for this product to Yes.
  • Click Save.

Reviews of this product and comments on them are not sent to the AI and do not appear in the log. Reviews stay pending; comments keep the status they were posted with.


4. See the AI verdict on a review​

  • In Marketing -> Advanced Reviews -> All Reviews and Pending Reviews, the AI verdict column shows Genuine, Spam or Uncertain for each checked review. Use the column filter, for example, to list all reviews marked as spam.
  • Open a review to see the AI verdict field with the reason the AI gave. The field is shown only for reviews the AI has checked.

If the AI got it wrong, change the review status and save it. A rejected review is not deleted, so you can approve it at any time. A status that contradicts the AI verdict (approving or un-rejecting a review marked Spam, or rejecting or un-approving a review marked Genuine) is recorded in the log as an Override entry with the name of the admin who made it. Agreeing with the AI and deciding on an Uncertain review are not logged.

The same applies to comments. If you change a comment's status in the Comments grid, with a row action or the Change status bulk action, and the new status contradicts the AI verdict (approving a comment marked Spam or setting it back to pending, or rejecting a comment marked Genuine or setting it back to pending), the log records an Override entry with your name. Agreeing with the AI, deciding on an Uncertain comment and changing a comment the AI has not decided on are not logged.


5. Review the AI moderation log​

Go to Marketing -> Advanced Reviews -> AI moderation log. Each row is one AI check or one admin override:

  • Type: Review or Comment.
  • Review / comment ID: the checked submission.
  • Verdict: Genuine, Spam, Uncertain (also an AI answer that could not be read, with no confidence), Error (the AI provider could not be reached or returned an error, or the result could not be saved; the submission keeps the status it was posted with: pending for a review, approved for a comment when comment auto-approve is on) or Override (an admin set a status that contradicts the AI verdict).
  • Confidence: how sure the AI was.
  • Action: Approved, Rejected or Left pending.
  • Reason: the AI's explanation, the error, or the admin who made the override.
  • IP and Excerpt: the submitter's IP address and the start of the text.

The Email and Product ID columns can be added with the Columns control.

Log entries are deleted automatically once a day after the number of days set in Keep AI moderation log entries, days (default 30).

Who can open the log is set by the AI moderation log permission of the admin role, in System -> Permissions -> User Roles.

note

If AI moderation is set to Off or no AI provider is configured, the log page shows a notice that no new entries are being added.