---
document_id: agent.dataset.tmall.task.product_comparison
schema_version: 1
---

<!-- Generated by scripts.build_agent_guide; do not edit. -->

# Product comparison / 商品比较

Compare multiple exact Tmall product references over one time range.

在同一时间范围内比较多个精确天猫商品引用。

## Required inputs / 必要输入

- `product_references` — `exact_reference`; required (`product_id`): Exact Tmall product IDs or standard URLs
  精确天猫商品 ID 或标准链接
- `time` — `user_required`; required: Shared analysis time range
  共同分析时间范围

## Steps / 步骤

1. `query_products` · `query_metrics` — Query all products with an in filter.
   使用 in 筛选一次查询所有商品。
   - metrics: `gmv`, `units`, `asp`
   - group_by: `product_id`, `title`, `product_url`, `month`
   - result entity: `product`
   - filters: `product_id in ${product_references}`
   - time: `${time}`

## Output requirements / 输出要求

- Compare the same metrics and time range for every product and include its ID, title, and canonical URL.
  对每个商品使用相同指标和时间范围比较，并包含商品 ID、标题和标准链接。

## Limitations / 限制

- Do not resolve product names, aliases, or short links.
  不解析商品名称、别名或短链。

## Stop conditions / 停止条件

- Stop and request exact references when any product is ambiguous.
  任一商品有歧义时停止并要求精确引用。
