用嵌入模型分类比大模型提示更准更快更便宜。
Beyond the Hype: Embeddings vs. Prompting for Multiclass Classification Tasks
- 用嵌入向量+Softmax做多分类,不依赖大模型提示。
- 准确率高49.5%,图像和文本处理分别快14倍和81倍。
- 结果稳定可用,适合有私有数据的工程落地场景。
在基于拇指匠(Thumbtack)用户提供的家装项目描述(含文本与图像)的多类别分类任务中,我们构建了基于嵌入的Softmax模型,用于预测对应的专业类别(如修理工、浴室翻新)。该方法与使用先进大模型进行提示(prompting)的方式对比,结果显示:嵌入模型在准确率、校准度、延迟和成本方面均显著更优。嵌入方法准确率比提示方法高49.5%,且在仅文本、仅图像及图文混合场景下表现一致优越。其输出概率校准良好,可作为部署时的置信度信号;而提示得分则信息不足。此外,嵌入方法处理图像和文本的速度分别为提示的14倍和81倍,在实际部署下成本最高可低至提示的十分之一。通过A/B测试验证,所部署的嵌入变体表现与离线分析一致。研究表明,对于可利用专有数据的多分类任务,嵌入方法能提供明确更优的结果,为科研人员、工程师与决策者提供了超越大模型炒作的实用参考。
原文摘要 · Abstract (English)
Are traditional classification approaches irrelevant in this era of AI hype? We show that there are multiclass classification problems where predictive models holistically outperform LLM prompt-based frameworks. Given text and images from home-service project descriptions provided by Thumbtack customers, we build embeddings-based softmax models that predict the professional category (e.g., handyman, bathroom remodeling) associated with each problem description. We then compare against prompts that ask state-of-the-art LLM models to solve the same problem. We find that the embeddings approach outperforms the best LLM prompts in terms of accuracy, calibration, latency, and financial cost. In particular, the embeddings approach has 49.5\% higher accuracy than the prompting approach, and its superiority is consistent across text-only, image-only, and text-image problem descriptions. Furthermore, it yields well-calibrated probabilities, which we later use as confidence signals to provide contextualized user experience during deployment. On the contrary, prompting scores are overly uninformative. Finally, the embeddings approach is 14 and 81 times faster than prompting in processing images and text respectively, while under realistic deployment assumptions, it can be up to 10 times cheaper. Based on these results, we deployed a variation of the embeddings approach, and through A/B testing we observed performance consistent with our offline analysis. Our study shows that for multiclass classification problems that can leverage proprietary datasets, an embeddings-based approach may yield unequivocally better results. Hence, scientists, practitioners, engineers, and business leaders can use our study to go beyond the hype and consider appropriate predictive models for their classification use cases.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。