Skip to content

Demonstration of using LLMs and Retail Specific Embedding Models to build product bundles and generate marketing copy for them.

Notifications You must be signed in to change notification settings

Ionio-io/Smart-Product-Bundling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›οΈ AI-Powered Product Bundle Generator

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.

πŸ‘€ Sneak Peek

πŸš€ 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

πŸ€” How It Works?

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.

πŸš€ Getting Started

πŸ›  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-Bundling

2️⃣ Install Dependencies

pip install openai streamlit pandas numpy sentence-transformers scikit-learn python-dotenv

3️⃣ Set Up API Key

Create a .env file and add your OpenAI API key:

OPENAI_API_KEY=your_openai_api_key

4️⃣ Run the Streamlit App

streamlit run ui.py

πŸ“‚ Project Structure

πŸ“¦ 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)

About

Demonstration of using LLMs and Retail Specific Embedding Models to build product bundles and generate marketing copy for them.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages