Configuration Guide: AI RAG Assistant for nopCommerce

GuideLaus Deo

Overview

The AI RAG Assistant is a proof-of-concept extension designed to demonstrate how Retrieval-Augmented Generation (RAG) systems work inside a nopCommerce environment. This plugin is intended primarily for learning, experimentation, and understanding modern AI workflows. It is not designed or recommended for production use.

The extension allows merchants and developers to upload up to 1000 tokens (approx. 4000 characters) of text and observe the full RAG pipeline: content preparation, store creation, indexing, status checking, and interacting with the AI assistant using the processed data. This makes it an ideal tool for training, exploring how AI uses structured knowledge, and debunking common misconceptions related to “AI hallucinations” by showing how RAG systems rely strictly on the provided content.

Main components

  • AI Assistant Widget – A simple chat interface available on the storefront where users can ask questions based on the indexed content.
  • RAG Configurator – A training panel in the admin area that guides users through uploading text, creating a RAG store, importing data, checking import status, and deleting stores.

Key features

  • Upload and process up to 1000 tokens (4000 characters) of text.
  • Demonstrates the complete RAG lifecycle in a simplified form.
  • Educational tool for understanding document-based AI responses.
  • Shows how data preparation affects the accuracy of AI answers.
  • Lightweight AI chat widget for testing RAG-based conversations.
  • Token monitoring: Clear interface and logs for observing training operations and token usage.

Step-by-step configuration

Part 1: Prerequisites (getting your Google API key)

This system relies on the Google Gemini API. You will need a free API key to operate the plugin.

  1. Google account: Ensure you have a valid Gmail/Google account.
  2. Visit Google AI Studio: Go to aistudio.google.com/api-keys.
  3. Generate key: Click on "Create API key" (you can create a key in a new project).
  4. Copy the key: Copy the generated string. You will need to paste this into the plugin configuration.

Part 2: Plugin configuration

  1. Navigate to your nopCommerce Admin panel.
  2. Go to Configuration > Widgets.
  3. Find AI RAG Assistant and click Configure.
  4. Paste API key: Enter the Google API Key you copied in the previous step into the Google API Key field.
  5. Widget zone: Select where you want the chat icon to appear on your public store (e.g., body_end_html_tag_before).
  6. Click Save.

Part 3: Training the system (the RAG pipeline)

Follow the on-screen steps in the configuration panel to "train" your AI. This process is manual to help you understand the lifecycle of RAG data.

  • Step 1: Upload content. Enter the text you want the AI to learn from.
    Note: The system limits input to 4000 characters (approx. 1000 tokens). If you paste more, it will be automatically truncated.
  • Step 2: Create RAG store. Click the button to create a container (Store) on Google's servers where your data will be organized.
  • Step 3: Import file. Click to import your uploaded text into the created Store.
  • Step 4: Check status. Indexing takes time. Click this button to check if Google has finished processing your file. Once the status is "Active" or "Done," the AI is ready to answer questions.

Part 4: Monitoring token usage (learning costs)

One of the most valuable features of this plugin is the ability to understand the "cost" of AI interactions.

  • How to view usage: Go to System > Log in your nopCommerce Admin.
  • What to look for: Every time a user asks a question, the plugin logs the interaction.
  • Details: The log entry will show you exactly how many tokens were consumed for that specific query (input tokens + output tokens).

By monitoring the logs, you can develop a sense of how much data is consumed by different types of questions and answers, which is crucial knowledge if you plan to implement a commercial AI solution in the future.

Intended use

This plugin is made for experimentation and educational purposes. It enables store owners and developers to gain experience with document-grounded AI systems, learn the basics of indexing, and observe how AI answers change depending on the provided content.

Important: Although the plugin is capable of producing meaningful results, it is not intended for commercial or mission-critical use. Laus Deo does not accept responsibility for any issues, errors, or damages that may occur if the extension is used in professional environments.

Support

For questions and support, use the contact form below.

More posts

contact

Tell us what you are building

Describe where you are now and where you want to be. We reply within one business day with a concrete next step.
I'm interested in