Abstract
LLaMA-E is a specialized suite of large language models (LLMs) tailored for e-commerce authoring tasks such as advertisement generation and product classification. By employing a novel "object-interleaved" instruction-tuning approach, the models effectively bridge the requirements of sellers, customers, and platforms. LLaMA-E consistently outperforms general-purpose LLMs in domain-specific applications, achieving state-of-the-art results while providing a high-performing, open-source alternative for sensitive e-commerce data.
Introduction
While general-purpose large language models (LLMs) have demonstrated remarkable capabilities across various domains, they often struggle with the specialized requirements of e-commerce. Content creation in this field, termed "authoring," requires a delicate balance between three primary stakeholders: the Seller (who emphasizes product features), the Customer (whose search intent must be met), and the Platform (which enforces taxonomy and policy).
Existing models frequently treat these aspects in isolation, leading to generic content or "hallucinations" that fail to drive consumer conversion. Furthermore, the reliance on closed-source APIs raises privacy concerns regarding proprietary product data. LLaMA-E addresses these challenges by fine-tuning open-source architectures specifically for the multi-faceted nature of e-commerce.
Methodology
The LLaMA-E framework is built upon the LLaMA architecture, specifically the 7B, 13B, and 30B parameter versions. The core of the approach is a three-stage pipeline designed to instill domain-specific knowledge.
Object-Interleaved Instruction Formulation
The researchers developed instructions that interleave features from three essential e-commerce "objects":
- Seller ($S$): Incorporates product titles, styles, and brand information.
- Customer ($C$): Integrates explicit search queries and implicit purchase intent.
- Platform ($P$): Utilizes official product taxonomies and platform-specific background knowledge (e.g., advertising policies).
By forcing the model to connect these entities within a single instruction—such as rewriting a title ($S$) to match a query ($C$) while adhering to a category ($P$)—the model achieves superior knowledge alignment compared to isolated task training.
Instruction Expansion and Fine-Tuning
To scale the training data, the team began with 300 expert-defined "seed" instructions. These seeds were expanded using GPT-3.5-turbo as a teacher model to generate a diverse dataset of 120,000 instruction-response pairs.
To ensure computational efficiency, the models were trained using Parameter-Efficient Fine-Tuning (PEFT) via LoRA (Low-Rank Adaptation). This method allows the model to adapt to the e-commerce domain by updating only a small fraction of its parameters, significantly reducing the hardware requirements for deployment.
Evaluation and Results
The models were evaluated on a curated dataset of nearly 20,000 unseen product instances and 30 authentic platform Q&A pairs. Performance was measured using a Geometric Mean (GM) of BLEU, ROUGE, F1-score, and Perplexity.
Quantitative Performance
LLaMA-E-7b achieved a GM score of 17.41, a dramatic improvement over the base LLaMA-7b (6.31) and notably higher than GPT-3.5 (15.06) in these specialized tasks. The results indicate that domain-specific tuning can allow smaller models to outperform much larger general-purpose counterparts.
Human Preference and Qualitative Insights
Blind human evaluations confirmed the quantitative findings. Annotators rated LLaMA-E's outputs higher in terms of readability, feature coverage, and persuasiveness. The model demonstrated a unique ability to use "persuasive" language (e.g., "Perfect for home decor") that aligns with consumer psychology, even when such phrases were absent from the source text.
The evaluation also highlighted a "gradual enhancement" effect: while the 7B model is highly competitive for generative tasks, larger versions (13B and 30B) show marked improvements in complex reasoning tasks like product classification.
Conclusion and Future Directions
LLaMA-E demonstrates that interleaving stakeholder perspectives during instruction tuning is a powerful strategy for domain-specific LLM development. While the current models excel in English-language text authoring, future work will focus on expanding multilingual support and integrating multimodal data (images and video) to better reflect the visual nature of e-commerce. Additionally, implementing continual learning mechanisms will be essential to keep pace with rapidly evolving market trends.
Summary updated