😫 The Pain Point
You have a sales Excel file. You want to send a “Thank You” gift to customers who spent over $5000, and a “Discount Code” to those who haven’t bought anything in 6 months. Filtering manually in Excel is tedious and prone to errors.
🚀 Agentic Solution
Automated Classification: Apply business rules to segment 10,000 customers in seconds.
Key Features:
- RFM Analysis: Classifies based on Recency (Last buy), Frequency (Count), and Monetary (Total spend).
- Tagging: Adds a “Segment” column to your Excel file.
⚔️ Phase 1: Commander (Quick Fix)
For a one-time segmentation.
Prompt:
“I have
sales.xlsxwith ‘Customer’, ‘Amount’, and ‘Date’. Calculate total spending per customer. If Total > 5000, label them ‘VIP’. If Total > 1000, label ‘Regular’. Otherwise ‘New’. Save the result tosegmented_customers.xlsx.”
Result: A tagged customer list.
🏗️ Phase 2: Architect (Permanent Tool)
For Marketing Managers.
Engineering Prompt:
**Role:** Python Data Analyst
**Task:** Create a "Customer Segmentation App".
**Requirements:**
1. **GUI:**
* Select Sales Data File.
* Input Thresholds: e.g., VIP Limit ($), Risk Days (days since last buy).
* "Segment" button.
2. **Logic:**
* Group by Customer ID.
* Calculate Sum(Amount) and Max(Date).
* Apply conditional logic to assign tags: 'VIP', 'Loyal', 'At Risk', 'Lost'.
* Export Report.
3. **Deliverables:** `classifier.py`, `run.bat` (Windows), `run.sh` (Mac).
🧠 Prompt Decoding
- RFM Model: This is the gold standard in retail marketing. Even a simple Python script implementing RFM is more powerful than hours of looking at spreadsheets.
🛠️ Instructions
- Copy Prompt -> Paste -> Run.
- Load Sales Data -> Segment.