Skip to content

raduga256/flower-shop-customer-supp-chatbot

Repository files navigation

flower-shop-customer-supp-chatbot

This project focuses on building a customer support agent/chatbot in python for an online flower shop using:

Probably be used for ordering flowers for an anniversay or valentine. Customers can also ask about the business processes such as order deliveries

  1. Streamlit (frontend)
  2. LangGraph (agent logic)
  3. Chromadb (local vector database)
  4. HuggingFace (RAG embedding model)
  5. LlamaIndex (local hosting)

Features to Build:

I will build features into the chatbot such as:

  • Managing customer profiles
  • Getting customer order updates
  • Placing customer orders
  • Answering customer FAQ
  • Getting product reccommendations

Project Breakdown:

  • Part 1: Project folders setup and Streamlit

Libraries Needed: langchain-openai python-dotenv langchain-groq langgraph

  • Part 2: FAQ and product Recommendation

Major Goal: Create a local RAG database

Create and Ultilize a Local RAG

we will setup a local RAG database with ChromaDB, HuggingFace and LlamaIndex in order to be able to retrieve relevant products and FAQ questions. We will also connect it to the frontend we built in the previous episode to test it interactively.

In this part we created a vector database with ChromaDB, and connected it to our streamlit frontend. With this setup we were able to ask FAQ style questions and also ask for product recommendations for our Flower Shop. Within the chroma database we created two knowledge base collections: IMAGE 2 knowledge bases

FAQ Question and Answer pairs Product descriptions We also updated the front end to choose between which knowledge base e.g Inventory to query:

Objectives

    • What to will build;
    • Setting up FAQs & Product reccommendations
    • New packages
    • Finding RAG embedding model
    • Local Vector Database (Chroma)
    • LlamaIndex Embeddings
    • Ingest FAQs into Vector DB
    • Querying Vector DB
    • Update Streamlit Frontend
    • Tidy up python
    • Adding Product Inventory
    • Adding Radio Button to guide user on which knowledge base to query i.e FAQ or Inventory descriptions
  • Part 3: Langgraph

Libraries Needed: langchain-openai python-dotenv langchain-groq langgraph

will setup LangGraph to act as an an Agentic Chatbot. We will connect our Agent with the RAG database we setup in the last chapter with two tools that the Agent can use to retrieve information on demand. We will use few shot prompting in our tool definition to teach our language model how to use them effectively Image

LLM-Autonomous-Agent

LLM-Autonomous-Agent

Processes
  • What we will build

  • Package Setup

  • Setup LangGraph without prompt

  • Test with single node

  • Create Prompt

  • ChatTemplate

  • Create LLM Intialisation

  • Use LLM in node

  • Cmd line test of script

  • Connect to frontend

  • Test Frontend

  • Create tool for Querying Knowledge base ---> tools.py

  • Product Reccommendation tool ---> tools.py

  • Bind tools to LLM + ChatPrompt

  • Add tools to LangGraph Agent

  • LangGraph Conditional Edge

  • Updating frontend & testing

  • Part 4: Customer Management

Customer Management Tools

Create customers database and give our LangGraph chatbot the ability to manage it with two new agent tools:

  1. Retrieving customer details with a DPA check
  2. Creating a new customer

Customer-management

Validate-Customer-Details

  • What we will build

  • Creating customers database

  • Creating tools

  • Data protection check tool

  • Create new customer tool

  • Connecting tools to LangGraph

  • Updating prompt

  • Updating frontend

  • Demo and wrapup

  • Part 5: Order Management

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages