Examples as the Prompt: A Scalable Approach for Efficient LLM Adaptation in E-Commerce
Prompting LLMs offers an efficient way to guide output generation without explicit model training. In the e-commerce domain, prompt-based applications are widely used in 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). 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 EaPlite, which entirely replaces the natural language components of prompts with labeled examples. EaPlite improves LLM inference speed by up to 70% without compromising performance. The online A/B test shows that using EaP and EaPlite for data labeling can bring significant composite revenue gain by 0.06%.
Authors
- Zhongao Liu
- Samarth Varshney (ORCID: https://orcid.org/0000-0002-3841-0799)
- Zhen Li (ORCID: https://orcid.org/0009-0008-1247-0284)
- Jingying Zeng (ORCID: https://orcid.org/0000-0002-6993-7999)
- Qi He (ORCID: https://orcid.org/0000-0001-5257-6843)
- Xianfeng Tang (ORCID: https://orcid.org/0000-0003-1554-2761)
- Chen Luo (ORCID: https://orcid.org/0000-0001-5339-5817)
- Hui Liu (ORCID: https://orcid.org/0009-0008-9032-6413)
- Zhenwei Dai (ORCID: https://orcid.org/0000-0001-9200-687X)
Institutions
- Amazon (United States) (US)
Publication Details
- Published
- 2025-07-13
- DOI
- https://doi.org/10.1145/3726302.3731941
- Citations
- 1
- Primary Topic
- Digital Rights Management and Security
- Type
- article
- Field-Weighted Citation Impact
- 3.25