用标注样本自动优化提示,让电商大模型适应更快更准。
Examples as the Prompt: A Scalable Approach for Efficient LLM Adaptation in E-Commerce
- 用无监督方法选最具代表性的样本增强提示,提升少样本效果。
- 在4个真实场景中表现媲美甚至超越人工设计提示,提速最高达70%。
- 适合需要快速迭代、降低人工成本的电商场景应用。
提示工程为大模型生成提供了高效引导方式,无需显式训练。在电商领域,提示广泛用于查询理解、推荐系统和客服等任务。但不同任务的适配常需领域专家投入大量精力进行提示设计,且难以及时响应业务变化。此外,人类难以构建完全无偏的自然语言提示。为此,我们提出新框架「示例即提示」(EaP),利用标注数据增强提示。EaP通过自动选择最具代表性示例,最大化大模型的少样本能力,具备高效性与对数据分布变化的适应性。我们在四个真实生产场景验证,结果表明其性能可媲美甚至优于专家手工设计的提示。我们进一步提出EaP_lite,完全以标注示例替代自然语言提示,推理速度提升最高达70%,性能无损。最新线上A/B测试显示,使用EaP和EaP_lite进行数据标注可带来0.06%的复合收入增长。
原文摘要 · Abstract (English)
Prompting LLMs offers an efficient way to guide output generation without explicit model training. In the e-commerce domain, prompting-based applications are widely used for tasks such as query understanding, recommender systems, and customer support. However, adapting LLMs to different tasks often requires extensive prompt engineering by domain experts, along with frequent updates to align with evolving business needs. Additionally, crafting fully unbiased natural language prompts remains a challenge for humans. To address these challenges, we propose a novel framework, Examples as the Prompt (EaP) which leverages labeled data to enhance prompts. Specifically, EaP automatically selects the most representative examples to maximize the few-shot capability of LLMs. It is efficient due to its unsupervised example selection and adaptive to potential data distribution shifts. We validate EaP on four real-world production use cases, demonstrating that it achieves comparable or even superior performance comparing to hand-crafted prompts designed by domain experts. Additionally, we introduce EaP_lite, which entirely replaces the natural language components of prompts with labeled examples. EaP_lite improves LLM inference speed by up to 70% without compromising performance. Latest online A/B test shows that using EaP and EaP_lite for data labeling can bring significant composite revenue gain by 0.06%.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。