Teach your agent to shop: verify any deal against price history in 20 lines
说明与用途
代理可以使用历史价格数据验证交易,而不是使用通用折扣。
问题
Shopping agents often rely on merchant‑provided discount percentages, which can be misleading.
结果
Agents can now verify deals against historical prices, improving recommendation quality.
工作流
- 1. Import requests library. 2. Define is_good_price(deal_id) to fetch price history from Fazy API. 3. Return lowest recorded price, previous price, and dated facts. 4. Define find_deal(query, max_price) to search deals via Fazy API. 5. Return the first matching deal or None. 6. Wire the returned dated facts into the agent’s system prompt: "Never quote a discount percentage from the merchant. Quote Fazy's dated price facts."
证据
Shopping agents are useless if they trust the price tag.
The idea: before your agent recommends a product, it calls price history and quotes the dated facts.
Wire the dated facts into your agent's system prompt: "Never quote a discount percentage from the merchant. Quote Fazy's dated price facts."
- 记录日期: 2026-10-23T15:11:22.806Z