作者解释 AI-SQL 中的分类操作,给定一组文档和标签列表,目标是为每个文档选择最合适的标签,例如客服团队可将每条来件消息归入 billing、refund request、shipping delay 等类别,并强调完整标签列表在查询运行前已知。图片中的 SQL 示例使用 AI.CLASSIFY 对 messages 表的 m.body 分类并输出 topic,标签数组包含 billing、refund request、refund status、shipping delay、shipping damage、shipping address change、product defect、two-factor authentication issue、praise、other 共 10 个标签。
To answer this, let's first look at what classification needs. Classification is one of the most common AI-SQL operations. Given a set of documents and a list of labels, the goal is to pick the label that best fits each document. E.g., a support team might sort every incoming message into "billing", "refund request", "shipping delay", and so on. Importantly, the full list of labels is known before the query runs.
来源:Shreya Shankar · x.com