Goal: The goal of this project is to extract valuable insights about a shopper based on chat history
Stack:
- Weaviate VectorDB
- OpenAI
gpt-3.5-turbo-16k-0613
function calling - Streamlit
The insights could be the following attributes:
- Demographics: Age, gender, and occupation provide insights into users' backgrounds.
- Location: Local references and city mentions help determine users' geographic preferences.
- Sustainability Preference: Users' concerns about the environment and sustainability indicate their preference for eco-friendly products.
- Luxury vs. Value: Brand preferences and price sensitivity hint at users' preference for luxury or value-based shopping.
- Shopping Behavior: Insights into users' impulse vs. planned purchases and product discovery habits.
- Influence Sources: The influencers, blogs, or social media platforms users follow for shopping advice.
- Seasonal Shopping Habits: How users adapt their shopping behavior during different seasons and holidays.
- Payment Preferences: Insights into users' preferred payment methods and digital wallets.
- Product Lifecycles: Expectations regarding product durability and lifespan.
Look at this notebook for example responses
- Users engage in chat sessions with a bot.
- Initial session retrieves user context and attributes.
- Conversations occur over multiple sessions using GPT models.
- All chat data is collected, including user input and bot responses.
- Chat data is processed with GPT models to generate insights-rich text.
- Insights related to demographics, location, and preferences are extracted.
- Extracted insights are stored in Weaviate, associated with the user's ID, creating a structured knowledge graph.
This project facilitates understanding and utilizing valuable shopper information from chat interactions on the e-commerce platform.
create env with conda
conda create -n shopai python=3.8
activate env
conda activate shopai
install requirements
pip install -r requirements.txt
streamlit run src/main.py
- Weaviate intergration
- create class and object of a user
- Get properties of the object
- Add properties of the object
- LLM
- Find out best way to add context to create completion (system or assistant message)
- Given conversation history, and current properties, write function that extracts insights, outcome is update property or create new one
- chat
- on each new conversation, read in context about user
- on each session end, load in property to db
- improve prompt
- have it create new property
- have it create properties that are related to user.
Weaviate
OpenAI
- return multiple objects in function calling forum
Git
- do
git rm -r --cached .
to gitignore commited file