Welcome to the Moonflour_Bean Chat Agent repository! This project contains the full-stack implementation of an AI-powered Multi-agent app designed to enhance customer experiences in a coffee shop application by simulating real-world interactions.
The chatbot utilizes Large Language Models (LLMs), Natural Language Processing (NLP), RunPod’s infrastructure, and Firebase to assist customers with:
✅ Taking orders
✅ Answering detailed menu-related queries
✅ Providing personalized product recommendations
This chatbot is integrated within a React Native mobile app (currently under development).
The goal of this project is to develop an intelligent, agent-based chatbot capable of:
- Handling real-time customer interactions – Allowing customers to place orders seamlessly.
- Answering menu-related questions – Providing details on ingredients, allergens, and other menu information using a Retrieval-Augmented Generation (RAG) system.
- Offering personalized recommendations – Utilizing a market basket analysis recommendation engine to suggest complementary items.
- Ensuring structured order placement – Guiding customers through an efficient ordering process for accuracy.
- Filtering inappropriate queries – Using a Guard Agent to block irrelevant or harmful inputs.
- Serves as the first line of defense by monitoring all incoming queries.
- Blocks inappropriate, harmful, or irrelevant messages before they reach other agents.
- Ensures safe and meaningful interactions with the chatbot.
- Guides users through the entire order placement process using chain-of-thought reasoning.
- Captures all customer preferences and order details in a structured, logical manner.
- Ensures orders are complete and accurate before processing.
- Uses Retrieval-Augmented Generation (RAG) to provide detailed answers on menu items, including:
- Ingredients
- Allergens
- Nutritional information
- Retrieves relevant data from a vector database and generates accurate responses.
- Works alongside the Order Taking Agent to suggest complementary products based on the user’s order history.
- Uses a market basket analysis model to enhance upselling opportunities and help users discover new products.
- Analyzes user intent and directs queries to the appropriate agent.
- Ensures queries are handled efficiently, whether they relate to:
- Order placement
- Menu details
- Product recommendations
-
User Query Processing:
- A customer sends a message to the chatbot.
- The Guard Agent filters out any harmful or irrelevant content.
-
Intent Classification:
- The Classification Agent determines the purpose of the query (e.g., ordering, menu details, recommendations).
-
Task Delegation:
- The query is sent to the most relevant agent:
- Order Taking Agent for order-related queries.
- Details Agent for menu-related questions.
- Recommendation Agent for product suggestions.
- The query is sent to the most relevant agent:
-
Upselling Process:
- Before finalizing an order, the Order Taking Agent may request recommendations from the Recommendation Agent to enhance the customer’s experience.
coffee_shop_customer_service_chatbot/
│ ├── Frontend/ # React Native app code (Coming soon)
│ ├── python/ (Backend)
│ ├── API/ # Backend API for the agent-based chatbot system
│ ├── dataset/ # Dataset for training the recommendation engine
│ ├── products/ # Product details (names, prices, descriptions, images)
│ ├── vector_database.ipynb # Builds the vector database for the RAG model
│ ├── firebase_uploader.ipynb # Uploads product data to Firebase
│ ├── recommendation_engine.ipynb # Trains the recommendation system
Ensure you have the following installed on your system:
- Python 3.8+
- Node.js & npm
- React Native
- Firebase CLI (for data management)
- RunPod API Key (for cloud-based inference)
# Clone the repository
git https://github.com/buriihenry/Moonflour_Bean.git
# Install dependencies
pip install -r requirements.txt
# Navigate to the frontend directory
cd ../Frontend
# Install dependencies
npm install
cd python
python main.py
cd ../Frontend
npm start
Contributions are welcome! If you'd like to contribute, please follow these steps:
- Fork the repository.
- Create a feature branch (
git checkout -b feature-name
). - Commit your changes (
git commit -m 'Add feature'
). - Push to your branch (
git push origin feature-name
). - Open a pull request.
This project is licensed under the MIT License – see the LICENSE file for details.
For any inquiries or support, feel free to reach out: 📌 GitHub: buriihenry
Happy coding! ☕🤖