An intelligent product bundling tool that leverages Large Language Models (LLMs) to dynamically generate complementary product bundles based on a given main product. This tool ensures that businesses can optimize product recommendations, enhance customer experience, and increase sales by offering the most relevant product combinations.
π Automatically generate product bundles based on the main product
π― Identify top similar products using AI-driven embeddings & similarity analysis
π Create highly optimized bundles using LLM-generated marketing strategies
β‘ Build dynamic UI with Streamlit for an interactive experience
1οΈβ£ Get the Main Product Input
Users enter the main product (e.g., "Flax Seeds"), and the system begins analyzing potential complementary products.
2οΈβ£ Generate Complementary Products (LLM Call #1)
The tool queries GPT-4o to generate a list of 5 complementary products that are frequently bought together with the main product.
3οΈβ£ Find Similar Products using Embeddings
The system generates text embeddings for the LLM-suggested products. It compares them with a product database to identify top 5 most similar products using cosine similarity.
4οΈβ£ Generate Final Bundles (LLM Call #2)
A second LLM call takes the top similar products and formulates 3 highly optimized bundles.
Each bundle includes:
β Bundle Name
β Bundle Description
β 5 carefully selected products
β Marketing Copy to boost sales
5οΈβ£ Display Bundles in the Streamlit UI
The generated bundles are presented in a visually appealing and easy-to-navigate dashboard, ensuring a seamless user experience.
π Prerequisites
Python 3.10+
OpenAI API Key
Streamlit
SentenceTransformers for embeddings
π» Installation
1οΈβ£ Clone the Repository
git clone https://github.com/Ionio-io/Smart-Product-Bundling.git
cd Smart-Product-Bundling2οΈβ£ Install Dependencies
pip install openai streamlit pandas numpy sentence-transformers scikit-learn python-dotenv3οΈβ£ Set Up API Key
Create a .env file and add your OpenAI API key:
OPENAI_API_KEY=your_openai_api_key4οΈβ£ Run the Streamlit App
streamlit run ui.pyπ¦ Smart-Product-Bundling
β-- π main.py # Main pipeline for product bundling
β-- π utils.py # LLM interactions, embeddings, similarity calculations
β-- π ui.py # Streamlit UI for bundle visualization
β-- π .env # Stores OpenAI API Key
β-- π requirements.txt # Dependencies list (if available)