You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

首次使用LUIS构建电商意图:商品分类与属性识别需求咨询

Got it, let’s walk through setting up your LUIS model for this e-commerce use case—since it’s your first time, I’ll keep this practical and aligned exactly with your two core needs.

1. First, Create a Core Intent

Start by making a single intent (let’s call it ShowProducts) that covers all your user’s product-request queries. This is the trigger for your system to fetch and display products. Add all your example utterances here, like:

  • Show me some jeans
  • Show me some bootcut jeans
  • Show me some dark jeans
  • Show me straight leg dark wash jeans

The more varied these examples are, the better LUIS will learn to generalize to new user inputs.

2. Model Category Hierarchies (Main + Subcategories)

For distinguishing main categories (like "jeans") and their subcategories (like "bootcut"), hierarchical entities are perfect here—they let you define parent-child relationships between category types. Here’s how:

  • Create a parent entity named ProductCategory (this is your main category level)
  • Add a child entity under it called SubCategory
  • Populate each entity with relevant values:
    • ProductCategory: jeans, shirts, shoes, dresses
    • SubCategory (linked to jeans): bootcut, straight leg, skinny, relaxed fit, flare
  • Go back to your utterances and manually tag these entities. For example, in "Show me some bootcut jeans", tag jeans as ProductCategory and bootcut as SubCategory.

LUIS will learn to recognize this hierarchy over time, so even if a user types a less common subcategory (as long as it’s logically linked), it’ll pick up the relationship. If you have a long list of subcategories, add a phrase list for each category group to boost recognition accuracy.

3. Capture Non-Category Product Attributes

For attributes like "dark" (that aren’t part of your category hierarchy), you have two solid options depending on how fixed your attributes are:

  • List Entities: If your attributes are predefined (e.g., colors: dark, light, blue, black; washes: acid wash, stone wash), use this. You can even add synonyms (like mapping "dark wash" to "dark") to cover user variations. Create an entity named ProductAttribute of type List Entity, then group related attributes under it.
  • Simple Entities: If you need flexibility for unforeseen attributes, use a Simple Entity. Pair it with a phrase list (e.g., "color terms" or "fabric terms") to teach LUIS which words fall into this attribute bucket.

Whichever you choose, make sure to tag these attributes in your example utterances—like marking dark in "Show me some dark jeans" as ProductAttribute.

4. Train, Test, and Refine

Once your entities and intent are set up:

  1. Train your LUIS model (hit the "Train" button in the portal)
  2. Test with sample queries to check if entities are being recognized correctly. If LUIS misses an attribute or category, add that exact utterance to your training set and retrain.
  3. Iterate—keep adding more diverse utterances (mixing categories and attributes) to make the model more robust.

On the backend side, when you get the LUIS response, you’ll extract the ProductCategory, SubCategory, and ProductAttribute values, then use those to filter your product database and return the right items.

内容的提问来源于stack exchange,提问作者jonhobbs

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.22 08:50:32