---
# System prepended metadata

title: Product Tagging Document(First Phase)

---


### Tagging generated process
1. We adopt **Crazy Eights** method to come up with our ideas seperately
- ![](https://hackmd.io/_uploads/HkJwjrC53.png)
- ![](https://hackmd.io/_uploads/BJ6JhBRc3.png)
- ![](https://hackmd.io/_uploads/Bkrl2S0qh.png)
- ![](https://hackmd.io/_uploads/B1J-hB05n.png)
2. From these 34 tags we group the similar tags into different groups
![](https://hackmd.io/_uploads/rkrZ2H0c2.png)
3. Filter the tags specified on user behavior, because we only focus on product tagging. Then we choose 7 of them by voting.
- ![](https://hackmd.io/_uploads/HJnWnBCqh.png)
- 7 tags chosen by us:
    | Title               | Description |
    | ------------------- | ----------- |
    | **Culture life**    | Individuals tagged with "Culture Life" have a deep fascination with the diverse forms of human expression and thought. They continuously seek intellectual stimulation and have a passion for personal growth through knowledge acquisition... |
    | **Parents with baby** | "Parents with baby" tag is designated for individuals who are invested in creating a nurturing and stimulating environment for their children... |
    | **Food Lover**        | The "Food Lover" tag characterizes individuals with a deep appreciation for seeing food as more than just a food... |
    | **Tech Lover**        | "Tech Lover" is a tag that identifies individuals who are passionate about the latest advancements in technology and digital entertainment... |
    | **Nature Lover**      | The "Nature Lover" tag is attributed to those who have a profound admiration for the natural world... |
    | **Health Enthusiastic** | The "Health Enthusiastic" tag describes individuals with a keen interest in fostering physical fitness and overall wellness... |
    | **Beauty Seeker**     | The "Beauty Seeker" tag identifies individuals who appreciate aesthetics in their everyday life... |
### Product Tagging Method Description
1. **Problem Statement:**
    - Classify the segmentations to products(商品貼標).
    - Input: products(top 10000 from 7/11), 7 segmentations.
    - Output: product with segmentations
    - For example: fashion T-shirt -> Beauty Seeker.
    - A product with multi-segmentations is allowed.
2. **First Method: Pattern Matching**
    - For each segmentation(tag), defining rules to filter the products which conforms to the lv1 and lv2 categories.
    - Rules are defined by chatGPT:
        | Title               | Rules |
        | ------------------- | ----------- |
        | **Culture life**    | 1. lv1_name == "女裝/男裝/牛仔休閒" and lv2_name in ["牛仔休閒上衣", "男裝上衣", "牛仔休閒下著"] 2. lv1_name == "女鞋/男鞋/箱包/配件" and lv2_name == "流行女包" 3. lv1_name == "寵物/餐廚/開運/生活" and lv2_name in ["杯壺酒器", "咖啡/茶具"] 4. lv1_name == "日用清潔/洗沐/美髮" and lv2_name == "開架品牌美髮染護" 5. lv1_name == "運動/休閒/健身/戶外" and lv2_name in ["泳裝/比基尼", "休閒女鞋", "休閒男鞋"] 6. lv1_name == "食品/飲料/零食/生鮮" and lv2_name == "蛋糕/甜點/冰品" 7. lv1_name == "婦幼/童鞋/玩具/樂器" and lv2_name == "樂器" 8. lv1_name == "精品/黃金/珠寶/手錶" and lv2_name == "國際名牌飾品" 9. lv1_name == "電腦/電競/遊戲/週邊" and lv2_name in ["筆記型電腦", "鍵盤/滑鼠/繪圖板"] 10. lv1_name == "養生/保健/美體/醫療" and lv2_name in ["美體/美顏/健身", "養生/營養補充品"] 11. [title / description] contain ["書籍", "文學", "哲學", "攝影", "繪畫", "詩", "美術", "展覽", "博物館", "音樂", "電影", "劇院", "舞蹈", "歷史", "文化", "藝術"] |
        | **Parents with baby** | 1. lv1_name == "婦幼/童鞋/玩具/樂器" and lv2_name in ["童鞋", "玩具/積木", "孕衣用品", "濕巾/清潔/保養", "書包/兒童包", "童裝", "安全座椅/推車/背巾", "嬰幼兒食品", "奶瓶/消毒鍋/吸乳器", "嬰童寢具", "兒童防護/成長用品", "餐具/餐椅/調理用品", "樂器"] 2. lv1_name == "食品/飲料/零食/生鮮" and lv2_name in ["熟食/小吃", "蛋糕/甜點/冰品", "泡麵/食材", "生鮮食品", "飲料/沖泡", "休閒零食/糖果"] 3. lv1_name == "日用清潔/洗沐/美髮" and lv2_name in ["開架品牌美髮染護", "個人衛生小物", "口腔/牙齒保健", "專業沙龍美髮染護", "洗衣用品", "身體清潔", "衛生紙", "家用清潔", "尿布/濕紙巾", "衛生棉墊"] 4. lv1_name == "寵物/餐廚/開運/生活" and lv2_name in ["杯壺酒器", "濾水器材", "烘焙用具", "咖啡/茶具", "碗盤/餐具", "鍋具", "保鮮盒/罐", "刀具/砧板", "料理器具"] 5. lv1_name == "女裝/男裝/牛仔休閒" and lv2_name in ["牛仔休閒上衣", "專櫃女裝上衣", "中大尺碼下著洋裝", "專櫃女裝下著", "流行女裝下著", "牛仔休閒下著", "穿搭配件", "流行女裝上衣", "牛仔休閒鞋包/家居", "流行飾品/配件", "流行女裝洋裝", "中大尺碼上衣"] 6. lv1_name == "女鞋/男鞋/箱包/配件" and lv2_name in ["旅遊週邊", "流行女包", "男包", "行李箱", "流行女鞋", "專櫃女鞋", "專櫃女包"] 7. [title / description] contain ["學習玩具", "教育玩具", "安全座椅", "嬰幼兒食品", "奶瓶", "消毒鍋", "吸乳器", "嬰童寢具", "兒童防護", "成長用品", "繪本", "兒童書", "故事書", "安全門", "玩具收納", "防撞條", "奶嘴", "學步車"] |
        | **Food Lover**        | 1. lv1_name == "寵物/餐廚/開運/生活" and lv2_name in ["杯壺酒器", "烘焙用具", "咖啡/茶具", "碗盤/餐具", "鍋具", "料理器具"] 2. lv1_name == "食品/飲料/零食/生鮮" and lv2_name in ["熟食/小吃", "蛋糕/甜點/冰品", "泡麵/食材", "生鮮食品", "飲料/沖泡", "休閒零食/糖果"] 3. lv1_name == "養生/保健/美體/醫療" and lv2_name in ["保健/維他命", "醫療/藥品", "養生/營養補充品"] 4. lv1_name == "家電/電視/冷氣/冰箱" and lv2_name in ["按摩家電", "美容家電", "音響劇院", "生活家電", "電視", "投影機", "洗衣機", "咖啡機/咖啡壺", "除濕機/清淨機"] 5. lv1_name == "書籍/文具/影音/票券" and lv2_name == "美食餐券" 6. [title / description] contain ["料理", "烹飪", "美食", "食譜", "葡萄酒", "手工啤酒", "咖啡", "有機食品", "全素食品", "全食物", "農場直送", "地方特產", "進口食品"] |
        | **Tech Lover**        | 1. lv1_name == "電腦/電競/遊戲/週邊" and lv2_name in ["DIY零組件", "主機板/顯示卡", "品牌桌上型電腦", "電腦螢幕", "電腦週邊", "儲存設備", "DIY桌上型電腦", "筆記型電腦", "內接儲存設備", "鍵盤/滑鼠/繪圖板", "CPU/記憶體", "電玩遊戲/主機"] 2. lv1_name == "手機/相機/耳機/穿戴" and lv2_name in ["相機配件", "智能家居", "相機", "手機", "耳機", "行動電源/電池", "手機配件", "數位週邊配件", "居安監控", "攝影機/空拍機", "相機鏡頭", "智慧穿戴"] 3. lv1_name == "家電/電視/冷氣/冰箱" and lv2_name in ["按摩家電", "美容家電", "音響劇院", "生活家電", "電視", "投影機", "洗衣機", "咖啡機/咖啡壺", "除濕機/清淨機"] 4. lv1_name == "食品/飲料/零食/生鮮" and lv2_name == "休閒零食/糖果" 5. lv1_name == "女裝/男裝/牛仔休閒" and lv2_name == "牛仔休閒鞋包/家居" 6. lv1_name == "養生/保健/美體/醫療" and lv2_name in ["美體/美顏/健身", "養生/營養補充品"] 7. [title / description] contain ["電競椅", "人體工學椅", "VR", "虛擬實境", "智慧家居", "無人機", "AI", "人工智能", "機器人", "3D列印", "穿戴科技", "網路安全", "智慧家電", "物聯網", "程式開發", "雲端儲存", "AR", "擴增實境", "深度學習", "資料科學", "區塊鏈", "無線充電"] |
        | **Nature Lover**      | 1. lv1_name == "運動/休閒/健身/戶外" and lv2_name in ["運動用品", "男性戶外鞋服", "女性戶外鞋服", "戶外露營器材", "運動戶外配件", "健身瑜珈器材"] 2. lv1_name == "女裝/男裝/牛仔休閒" and lv2_name in ["專櫃女裝上衣", "男裝上衣", "流行女裝上衣", "流行女裝下著", "牛仔休閒下著"] 3. lv1_name == "女鞋/男鞋/箱包/配件" and lv2_name in ["旅遊週邊", "流行女鞋", "專櫃女鞋", "男鞋"] 4. lv1_name == "寵物/餐廚/開運/生活" and lv2_name in ["狗貓用品", "料理器具", "水族/鳥類/小動物"] 5. lv1_name == "食品/飲料/零食/生鮮" and lv2_name in ["生鮮食品", "飲料/沖泡"] 6. [title / description] contain ["露營", "登山", "自然", "戶外", "環保", "徒步", "野鳥", "觀察", "野生動物", "綠色產品", "生態", "環境友善", "徒步旅行", "攝影", "地理", "地形", "地質", "氣候變遷", "保育", "野生生物", "生物多樣性", "廢物減少", "可再生能源", "永續生活", "淨灘", "自然保護區", "野生動物保護", "植物", "動物"] |
        | **Health Enthusiastic** | 1. lv1_name == "運動/休閒/健身/戶外" and lv2_name in ["運動用品", "女性戶外鞋服", "男性戶外鞋服", "運動女服", "運動男服", "運動女鞋", "運動男鞋", "健身瑜珈器材"] 2. lv1_name == "女鞋/男鞋/箱包/配件" and lv2_name in ["運動女鞋", "運動男鞋"] 3. lv1_name == "女裝/男裝/牛仔休閒" and lv2_name in ["男裝上衣", "男裝下著", "女裝上衣", "女裝下著"] 4. lv1_name == "食品/飲料/零食/生鮮" and lv2_name in ["泡麵/食材", "生鮮食品"] 5. lv1_name == "養生/保健/美體/醫療" and lv2_name in ["美體/美顏/健身", "養生/營養補充品"] 6. lv1_name == "電腦/電競/遊戲/週邊" and lv2_name == "智能家居" 7. lv1_name == "手機/相機/耳機/穿戴" and lv2_name == "智慧穿戴" 8. [title / description] contain ["瑜珈", "運動鞋", "健身器材", "運動服", "跑步機", "健康飲食", "營養補充品", "跑步鞋", "運動手錶", "健身手環", "智能手錶", "運動耳機"] |
        | **Beauty Seeker**     | 1. lv1_name == "女裝/男裝/牛仔休閒" and lv2_name in ["牛仔休閒上衣", "流行女裝上衣", "流行飾品/配件", "牛仔休閒鞋包/家居", "流行女裝洋裝"] 2. lv1_name == "女鞋/男鞋/箱包/配件" and lv2_name in ["流行女包", "流行女鞋", "專櫃女鞋", "專櫃女包"] 3. lv1_name == "寵物/餐廚/開運/生活" and lv2_name in ["杯壺酒器", "咖啡/茶具", "碗盤/餐具"] 4. lv1_name == "日用清潔/洗沐/美髮" and lv2_name in ["開架品牌美髮染護", "專業沙龍美髮染護", "身體清潔"] 5. lv1_name == "運動/休閒/健身/戶外" and lv2_name == "泳裝/比基尼" 6. lv1_name == "食品/飲料/零食/生鮮" and lv2_name == "休閒零食/糖果" 7. lv1_name == "精品/黃金/珠寶/手錶" and lv2_name in ["國際名牌飾品", "專櫃飾品", "手錶/時鐘"] 8. lv1_name == "內衣/睡衣/塑身衣" and lv2_name in ["塑身/調整型", "居家睡衣", "性感/情趣睡衣", "女性內衣"] 9. [title / description] contain ["美容", "裝飾", "美甲", "配件", "美髮", "護膚", "時尚", "流行", "設計", "DIY", "手作", "藝術", "精品", "攝影"] |
        
    - **Pattern Matching Method Framework**
    - ![](https://hackmd.io/_uploads/HJ8GhBC5h.png)
        
3. **Second Method: Prompt Engineering by GPT-3.5**
    - we adopt GPT to make detailed description for each segmentation as detailed as possible
    - Then we ask GPT to classify each product to the segmentations we defined above:
    ```
    I have the following segmentations and your goal is to classify the products below.
    noted: you can classify the products into multiple tags:

    Here are the segmentations(format: title:description):

    Segmentation title: Culture life
    Segmentation description:
    Individuals tagged with "Culture Life" have a deep fascination with the diverse forms of human expression and thought. They continuously seek intellectual stimulation and have a passion for personal growth through knowledge acquisition, often exploring literature that challenges conventional thinking. Their hobbies extend beyond just reading. They relish immersing themselves in diverse cultural experiences such as visiting museums, attending exhibitions, or engaging in philosophical conversations.

    They are drawn to the literary and artistic style, appreciating the romanticized, intellectual charm of this aesthetic. These individuals are likely to explore different artistic forms, even  amateur photography, sketching, or poetry writing.

    They appreciate products that resonate with their cultural and intellectual interests. This can range from books, documentaries, art supplies, to tickets for local art exhibitions or museum tours. The Culture Life tag identifies those with an insatiable thirst for knowledge and a love for all things artistic and cultural.

    Usually, they tend to wear some plain color clothes.

    Segmentation title:Parents with baby
    Segmentation description:
    "Parents with baby" tag is designated for individuals who are invested in creating a nurturing and stimulating environment for their children. As parents or guardians, they prioritize the health, growth, and overall well-being of their young ones. Their interests often intertwine with their children's needs, making them keen on discovering and purchasing a variety of child-related products.

    Potential hobbies for this demographic may include family-friendly activities such as reading children's books, playing educational games, exploring the outdoors, and engaging in creative arts and crafts projects. They also might show interest in cooking or baking nutritious meals and treats for their families.

    The products that appeal to them range from baby care items, educational toys, children's books, and family health and wellness products, to home safety equipment. The "Parents and Families" tag identifies those who are committed to ensuring a safe, enriching, and joy-filled family life.

    Segmentation title:Food Lover
    Segmentation description:
    The "Food Lover" tag characterizes individuals with a deep appreciation for seeing food as more than just a food. This group enjoys exploring different cuisines and flavors, often motivated to travel far and wide to satisfy their culinary curiosity. Their hobbies could encompass experimenting with global recipes, indulging in food photography, or even writing about their food adventures.

    They may prefer the convenience of delivered meals or ingredients over supermarket shopping, leading to frequent purchases and subscriptions for food delivery services. Despite a like for food and drinks, they could also show interest in high-quality, organic, and specialty food products.

    Products that cater to their interests range from subscription-based meal kits, international food and drink, cooking equipment, to food and travel literature. The "Food Lover" tag identifies those who revel in the joy of eating, drinking, and exploring the world through its flavors.

    Segmentation title:Tech Lover
    Segmentation description:
    "Tech Lover" is a tag that identifies individuals who are passionate about the latest advancements in technology and digital entertainment. They are not just users but enthusiasts, often seeking out cutting-edge gadgets, computer hardware, and immersive gaming experiences.

    Their hobbies may involve playing multiplayer online games, engaging in strategy discussions, and staying updated on the latest tech trends and reviews. The unique combination of gaming and music points to an interest in a high-quality auditory experience that enhances their gaming enjoyment.

    Potential product interests for Tech Lovers include the latest computers, gaming consoles, headphones, and other audio-visual devices that enrich their tech-centric lifestyle. They may also be interested in virtual reality equipment, smart home devices, and subscriptions to gaming or tech magazines. The "Tech Lover" tag marks those individuals who are on the cutting edge of technology, constantly seeking to integrate the newest innovations into their digital lifestyle.

    Segmentation title:Nature Lover
    Segmentation description:
    The "Nature Lover" tag is attributed to those who have a profound admiration for the natural world. These individuals often seek comfort, inspiration, and adventure in the great outdoors. They cherish experiences like hiking in the woods, camping under the stars, bird-watching, or just soaking in landscapes.

    Their hobbies typically align with outdoor pursuits and could include camping, hike, and nature photography. They are also likely to possess a strong conservation ethic, showing interest in environmental sustainability and practices that help protect the planet.

    They invest in quality outdoor and camping equipment. Products that cater to their needs include camping gear, hiking equipment, nature guidebooks, outdoor clothing, and eco-friendly products. The "Nature Lover" tag identifies individuals who thrive in the embrace of the wilderness and are enthusiastic about preserving it.


    Segmentation title:Health Enthusiastic
    Segmentation description:The "Health Enthusiastic" tag describes individuals with a keen interest in fostering physical fitness and overall wellness. They value routine workouts, and while they may not join in dynamic sports like basketball, they enjoy watching games and keeping up with the sports world.

    Their hobbies might extend to calmer fitness routines such as yoga, pilates, or morning jogs, indicating a preference for more controlled, steady exercise. An early riser, the Health Enthusiastic individual likely integrates exercise into their morning routine, using it to kick-start their day.

    This group shows a particular interest in limited-edition sports shoes, suggesting a taste for fashion-forward, performance-oriented workout gear. Thus, they might engage with products like fitness equipment, health supplements, sports apparel, and high-quality sports shoes. They might also invest in wearable tech for health tracking. The "Health Enthusiastic" tag is for those who blend style, fitness, and a sports enthusiast's spirit into their lifestyle.

    Segmentation title:Beauty Seeker
    Segmentation description:
    The "Beauty Seeker" tag identifies individuals who appreciate aesthetics in their everyday life. They are inclined to purchase items not just for their functionality but also for their appeal, often gravitating towards objects that are cute or aesthetically pleasing, even if they aren't necessarily practical.

    Their hobbies might include exploring beauty trends, experimenting with makeup and skincare routines, or accessorizing their outfits. They may also enjoy activities like interior decorating, DIY craft projects, or photography, all of which allows them to express their eye for beauty.

    In terms of products, Beauty Seekers are likely to engage with a wide range of beauty products, unique accessories, and feminine care items. They might also show interest in stylish home decor, arts and crafts supplies, and trendy clothing. The "Beauty Seeker" tag characterizes those individuals who pursue beauty in all aspects of life, transforming the 'standard' into the beautiful.

    Here is the product:
    Product Name:
    愛心食物箱10件組【受贈對象：社團法人中華安得烈慈善協會】(您不會收到商品)(公益)
    Product category:
    食品/飲料/零食/生鮮 and 泡麵/食材

    you need to generate in following Json format:

    {"product name":""
    "product segmentation titles":[]}
    ```
    - **Prompt Engineering Method Framework**
    - ![](https://hackmd.io/_uploads/rJCMhHRch.png)
### **Two Methods Result Comparison**
- **Segmentation Count Barchart**
  ![](https://hackmd.io/_uploads/ByyJpm09h.png)
  - Left part is the result from pattern matching and right part is from prompt engineering.
  - We can find out the distribution of 7 segmentations we define is significantly different between two methods.
  - For pattern matching, top 2 segmentations with most products are Parents with Baby and Beauty Seeker; for prompt engineering, top 2 segmentations are Beauty Seeker and Culture Life.
  - To our knowledge, if the segmentation has too many products in its group, it means that the scope of this segmentations is very vague, which can't reflect the unique property we intend to find if the user does belong to this segmentation. From the results of these two methods, we can find out **Beauty Seeker** is the segmentation with many products for both of the methods, which means Beauty Seeker might not be a moderate segmentation for us to do classify.
- **Number of Segmentation in a Product Count barchart**
    - ![](https://hackmd.io/_uploads/SJd014Cch.png)
    - Left part is the result from pattern matching and right part is from prompt engineering.
    - 0 means number of products doesn't have any tag; 1 means number of 1 tag product and so on...
    - The result from pattern matching shows that there are about 16% of products with 0 tag, which means that these products won't be seen by any user group.
    - The product with multiple tags means that this product shares multiple properties provided by different segmentations. If we intend to identify user group by the products they share together, some products with multiple tags will blur the border between different user groups. From this perspective, we want the products with single tag as much as possible. Therefore, we can see the result from prompt engineering conforms to our perspective.
- **Tag Combination Heatmap**
    - ![](https://hackmd.io/_uploads/Sk7vXEC53.png)
    - Left part is the result from pattern matching and right part is from prompt engineering.
    - If the color in a block become hotter, it means the frequency of two tags combination is higher.
    - From pattern matching we see the number of products with Parents and Baby & Beauty Seeker are on the top 1, which means from pattern matching method, Parents with Baby & Beauty Seeker share similar properties. On the other hand, from the view of prompt engineering, Beauty Seeker share similar properties with Culture Life.
### **Evaluation**
- **Evaluating Method**: We random sample 50 products and their classified segmentations by pattern matching and prompt engineering respectively. For each product, we team members will vote for the method which is better for us.
- **Voting Process** (p for pattern matching and c for prompt engineering)
  ![](https://hackmd.io/_uploads/ByrnO4R92.png)
- **Voting result**
  ![](https://hackmd.io/_uploads/By6MY4A93.png)
  From the voting result, we can see team member show more preference on Prompt Engineering than Pattern Matching, although the difference between two methods is not obvious. In this way, we decide to use Prompt Engineering to do our product tagging.
### **Rejection of First Phase Product Tagging**
- Problem of Segmentation Scope:
    1. Beauty Seeker can be divided into decoration and outfit -> its scope is too big.
    2. Nature Lover and Health Enthusiastic have similar definition -> they could be merged into one user group.
    3. Segmentation should be in the same scope and clear definition.
    4. Segmentation should show the uniqueness and not overlap with other segmentation.
- Problem of Pattern Matching:
    1. Performance is not as good as prompt engineering, evaluated by random sampling.
    2. Number of products with 0 tag occupies the most part of number of products(16%).
- Problem of Prompt Engineering:
    1. Output without reasoning may make gpt select wrong answer.
    2. Output without multiple prompts may capture the unstable answer from gpt.
    3. Calling api will cost our budget.







