A sophisticated, multi-service Conversational AI platform for automated mobile retail management.
MobiAssist is a production-oriented chatbot ecosystem designed to automate customer lifecycle management for an online mobile store. Developed as part of an Advanced Conversational UI module, the system moves beyond simple FAQs by integrating a Rasa-driven NLU brain with a Flask-managed relational database. It handles complex logic such as real-time order tracking, automated complaint escalation, and interactive purchase workflows.
The system is built on a Decoupled Multi-Service Architecture, ensuring scalability and separation of concerns:
- Conversational Intelligence (Rasa 3.6): Utilizes a sophisticated pipeline for intent classification and entity extraction. The dialogue management is governed by custom rules and stories that handle context-switching and digressions gracefully.
- Custom Action Layer: A dedicated action server executes complex Python logic, acting as the bridge between user intent and backend data.
- RESTful Data API (Flask): A robust backend service managing the SQLite3 persistence layer. This ensures that the chatbot’s responses are always grounded in real-time inventory and user data.
- Reactive Interface (Streamlit): A modern, high-performance frontend providing a seamless chat experience for end-users.
| Layer | Technology | Key Usage |
|---|---|---|
| Conversational Engine | Rasa Open Source | NLU, Dialogue management, and NLP pipelines. |
| Action Server | Rasa SDK | Custom logic execution and API orchestration. |
| Backend API | Flask | Relational data management and business logic. |
| Database | SQLite3 | ACID-compliant storage for orders and products. |
| Frontend UI | Streamlit | Client-side chat interface and data visualization. |
| Deployment | Docker & Compose | Containerized multi-service orchestration. |
- Real-time Order Tracking: Users can query the current status of their purchases via unique identifiers.
- Order Cancellation: Secure workflow to cancel recent orders directly through the chat interface.
- Complaint Handling: A guided, step-by-step process for filing complaints, including automated troubleshooting and escalation to human agents.
- Product Inquiries: Dynamic lookup of pricing, features, and availability for the latest mobile devices.
- Purchase Workflow: Assists users in selecting products and placing new orders without leaving the conversation.
- Natural Interaction: Handles small talk, greetings, and contextual digressions to maintain a human-like flow.
- Data Integrity: Implemented a
sample_data_seed.pyutility for reproducible database states and testing. - Service Orchestration: Fully containerized using Docker Compose, managing port mapping and internal networking across four distinct services.
- Clean NLU Design: Structured
nlu.ymlanddomain.ymlfiles with distinct entity roles and groups for high classification accuracy.
- Python 3.10
- Docker & Docker Compose (Recommended)
- Clone the Repo:
git clone https://github.com/negilbabu/retail_bot.git - Initialize Database:
cd Flask\ API/ python sample_data_seed.py
- Train AI Model:
Bash cd Rasa/ rasa train
-
Running the Ecosystem The project requires four services running simultaneously:
Action Server: rasa run actions (Port 5055)
Rasa Server: rasa run --enable-api --cors "*" (Port 5005)
Flask API: python app.py (Port 8000)
Frontend UI: streamlit run app.py (Port 3000)
📄 License
This project is licensed under the MIT License.