How abdullahtarek/coffee_shop_customer_service_chatbot works
Project Type and Purpose
• This is a full-stack, agent-based chatbot project integrated into a React Native coffee shop mobile app. It leverages AI, NLP, and recommendation systems to handle customer inquiries and orders.
• The README emphasizes key functions such as order placement, detailed menu queries via a Retrieval-Augmented Generation system, personalized recommendations (market basket analysis), and safe query filtering via a Guard Agent.
File Structure
• Notice two primary components:
• The “coffee_shop_app” directory, containing the React Native mobile app code (with pages, components, assets, configuration, etc.), which forms the frontend.
• The “python_code” directory, which contains the chatbot’s backend and service components. This includes an “api” folder (with various specialized agent modules like classification, order taking, details fetching, etc.), datasets for training, and scripts/notebooks for building the vector database and training recommendation engines.
• The top-level organization clearly separates the mobile frontend from the agent-based backend system, suggesting a microservices-style architecture where components can be deployed, scaled, and managed independently.
Insights from the README
• The README details the agent roles: Guard Agent, Order Taking Agent, Details (RAG) Agent, Recommendation Agent, and Classification Agent. It explains how these agents interact sequentially (or in a pipeline) for processing customer queries.
• There is clear emphasis on integrating third-party services and technologies like RunPod for LLM deployment, Pinecone for the vector database, and Firebase for data storage.
a. Main Components:
• Frontend: React Native Coffee Shop Mobile App (UI screens like Landing Page, Home, Item Details, Cart, Chatbot Interface)
• Backend API: Python-based chatbot API hosting various specialized agents.
• Specialized Agents:
– Guard Agent (first filter for queries)
– Classification Agent (routing requests)
– Order Taking Agent (guided order placement)
– Details (RAG) Agent (menu and product information retrieval using a vector database)
– Recommendation Agent (providing product recommendations via market basket analysis)
• Database / External Services:
– Vector Database (e.g., Pinecone) for the RAG component.
– Firebase (for app data management).
– Datasets and training components (as seen from notebooks and dataset files).
b. Relationships and Interactions:
– The mobile app sends customer queries to the API.
– The Guard Agent first inspects the query; valid queries flow to the Classification Agent.
– The Classification Agent routes the query to either the Order Taking Agent, the Details Agent, or the Recommendation Agent (with possible feedback loops—for example, an order may trigger a recommendation).
– Communication between the Details Agent and the vector database should be indicated.
– Firebase service can be shown as a separate data store linked to the app for order management/credits.
• That the Python API is a central hub that integrates the specialized agents and supports the chatbot’s logic.
c. Important Architectural Patterns and Design Principles:
• Modular, agent-based architecture where each agent has a dedicated responsibility.
• Pipeline processing of incoming queries — from validation (Guard), categorization (Classification), and then specific query handling (Order, Details, Recommendation).
• Clear separation of concerns between the frontend mobile app and the AI-driven backend, enabling independent deployment and scaling.
• Use of microservices ideas within the API agent modules that can be independently updated or replaced.
d. Relevant Technologies:
• Frontend: React Native
• Backend: Python (APIs, Flask/FastAPI if applicable, plus agent modules)
• AI and NLP: Large Language Models, RAG system
• External services: RunPod, Firebase, Pinecone
• Toolchaining: Docker, build scripts, and configurations (like environment files)
• Additional supporting libraries and configuration files (found in the file tree)
Detailed Capture
• Don’t shy away from breaking down the system into as many relevant parts as possible. Even if some components (like utility scripts or hooks) are not central, the main architectural flow must be captured with precision.