Introduction
When building conversational AI for an e-commerce platform, a major challenge is connecting product data with natural customer questions. This becomes even more challenging when users communicate in Bangla, Banglish, and English.
I designed TonuAI, a specialized conversational AI system for Tonu's Shop, a skincare e-commerce platform in Bangladesh. The system combines automated product-data processing, multilingual keyword retrieval, multi-intent query handling, and a conversational AI layer.
The goal was simple: allow customers to ask natural questions about skincare products and receive relevant recommendations quickly.
System Architecture
TonuAI is divided into two main layers:
1. Data Processing Layer
The Python-based pipeline collects and combines information from multiple sources:
- Product descriptions
- SEO content
- Product specifications
- MySQL database data
- Product prices and stock
- Product images
The pipeline converts these different sources into a unified product database that can be used by the AI application.
One challenge was that product information was not always stored in the same format. To solve this, I implemented normalization and matching logic using product names, slugs, tokens, and brand information.
A brand protection rule was also added to prevent incorrect matching between products from different brands.
2. RAG and Application Layer
The application layer uses Next.js and a custom retrieval system.
Instead of depending entirely on vector embeddings, TonuAI uses a lightweight multilingual keyword-scoring approach for product retrieval.
The scoring system considers several factors:
const SCORE_WEIGHTS = {
BRAND_MATCH: 35,
SKIN_TYPE_MATCH: 30,
CATEGORY_MATCH: 25,
CONCERN_MATCH: 20,
NAME_WORD_MATCH: 15,
INGREDIENT_MATCH: 5
};
This approach works particularly well for a relatively structured e-commerce catalog where product names, brands, ingredients, categories, and skin concerns are known in advance.
It also reduces the processing overhead associated with embedding-based retrieval for simple product searches.
Handling Bangla, Banglish and English
A major requirement was supporting how customers actually communicate.
For example, users may ask:
"Oily skin er jonno kon cleanser ta valo?"
or:
"তৈলাক্ত ত্বকের জন্য কোন cleanser ভালো?"
or:
"Which cleanser is good for oily skin?"
The retrieval system maps relevant terms across Bangla, Banglish, and English and uses them to identify relevant products.
This makes the system more practical for a Bangladeshi e-commerce environment.
Multi-Intent Queries
Customers do not always ask one question at a time.
For example:
"Which cleanser is good for oily skin, how much is it, and do you deliver to Chittagong?"
This contains multiple intents:
- Product recommendation
- Price information
- Delivery information
TonuAI separates these intents before retrieving the relevant information.
The splitIntoSegments() component breaks the original message into smaller intent segments, allowing each part of the request to be processed independently.
Automated Product Matching
Another interesting part of the project was combining structured and unstructured product information.
The system processes:
- Markdown product documentation
- SEO content
- MySQL data
- Product images
A matching process combines these sources into a single product record.
For image matching, additional rules were implemented to prevent incorrect product-form matches. For example, a serum image should not accidentally be assigned to a cream simply because their product names contain similar words.
Duplicate images are also detected using file hashes.
Conversational AI
The AI assistant, Ira (ঈরা), is designed specifically for Bangladeshi skincare customers.
It communicates primarily in conversational Bangla while also understanding Banglish and English.
The system is restricted to skincare-related conversations so that it can remain focused on its intended purpose rather than behaving like a general-purpose chatbot.
Results
The current system contains:
- 55+ verified products
- 30+ mapped product images
- Bangla, Banglish and English support
- Automated product-data processing
- Multi-intent query handling
- Real-time admin support session tracking
- Fast keyword-based product retrieval
The optimized retrieval layer can return product candidates in under 5ms in the tested environment.
What I Learned
The biggest lesson from this project is that a RAG system does not always need to be complicated.
For a structured domain such as e-commerce, combining good data processing, domain-specific retrieval rules, multilingual normalization, and an LLM can produce a fast and practical system.
The architecture can also be extended later with vector search or hybrid retrieval when the knowledge base becomes larger or more unstructured.
Conclusion
TonuAI is an example of building a domain-specific AI system around the actual requirements of a regional market.
Instead of treating Bangla as an additional language layer, the system was designed around the way Bangladeshi customers naturally communicate — including Bangla, Banglish, and English.
The project demonstrates how domain-specific RAG, automated data processing, and multilingual conversational AI can be combined to build practical e-commerce AI applications.
Project: ira.tonusshop.com
Author: S M ASIF ANAM
Master System Architect & AI Researcher
Specializing in AI systems, IoT, cybersecurity, local LLMs, and enterprise software architecture.
Top comments (0)