How JD Retail Integrates LLMs with SFT, RAG, and AI Agents for Real-World Impact
This article examines JD Retail's end‑to‑end large language model framework that combines supervised fine‑tuning, retrieval‑augmented generation, and ReAct‑based AI agents to overcome retail‑specific challenges, improve model accuracy, reduce hallucinations, and enable autonomous multi‑step business workflows.
Introduction
Large language models (LLMs) have rapidly reshaped intelligent systems, yet the key to commercial success lies in translating their capabilities into tangible business value. In the retail sector, JD Retail’s Technology Center introduced a comprehensive LLM application framework that fuses AI agents, supervised fine‑tuning (SFT), and retrieval‑augmented generation (RAG) to address three core challenges.
Retail‑Specific Challenges
Domain Knowledge Gap: General LLMs lack retail‑specific expertise, making domain‑focused fine‑tuning costly.
Hallucination & Retrieval Cost: Model outputs can be inaccurate, and retrieving massive business information is expensive.
Complex Multi‑Step Scenarios: Tasks such as merchant Q&A require autonomous planning, which current chat‑style models cannot provide without heavy human intervention.
Solution Overview
JD Retail’s framework integrates three techniques:
AI Agent (ReAct): Enables reasoning and acting loops for autonomous decision‑making.
SFT (Supervised Fine‑Tuning): Injects retail domain knowledge into a pre‑trained LLM.
RAG (Retrieval‑Augmented Generation): Retrieves up‑to‑date external knowledge to supplement the model.
1. Efficient Fine‑Tuning (SFT)
The SFT pipeline consists of four stages: data production, model selection, fine‑tuning, and evaluation.
Data Production
Retail data (marketing strategies, consumer behavior, product catalogs) are noisy and heterogeneous. JD Retail builds high‑quality training sets by standardizing formats and filtering noise.
Model Selection
Multiple open‑source LLMs (e.g., Llama, ChatGLM, Yanxi) are evaluated for Chinese support, parameter scale, and performance. Adaptation work is required to align them with enterprise standards.
Fine‑Tuning
Key hyper‑parameters (learning rate, batch size, epochs) are tuned while monitoring loss and accuracy. Resource‑constrained environments demand optimal compute utilization.
Evaluation
A dedicated validation set measures performance using loss, accuracy, and custom business metrics.
2. Retrieval‑Augmented Generation (RAG)
RAG mitigates hallucinations and provides up‑to‑date knowledge without retraining the base model. The workflow includes data enrichment, enhanced retrieval, and result refinement.
Data Enrichment
Construct a knowledge base by extracting raw data, vectorizing text, creating indexes, and loading them into a vector database (e.g., Milvus, Vearch, Pinecone).
Enhanced Retrieval
Queries are rewritten using reasoning and keyword extraction, then matched against the index via hybrid lexical‑vector similarity. Top‑K documents are filtered, ranked, and summarized using prompt engineering.
Result Enhancement
Both objective metrics (precision, recall) and subjective user feedback are collected to iteratively improve retrieval and generation quality.
3. AI Agent (ReAct Framework)
The AI Agent equips the LLM with perception, planning, and execution capabilities, enabling it to handle multi‑step business processes autonomously.
Planning: Decomposes complex tasks into sub‑tasks and devises execution strategies.
Profile: Defines the agent’s role, goals, abilities, and knowledge.
Memory: Stores contextual information for future actions.
Action: Translates decisions into concrete operations (e.g., API calls).
Two agent architectures are discussed:
Single Agent: Focused on a specific task such as data lookup or scheduling.
Multi‑Agent System: Multiple specialized agents collaborate, sharing information or competing to refine decisions.
Retail Use Cases
JD Retail applies the integrated framework to three scenario categories:
Human‑Scene: Intelligent assistants for merchants and consumers (e.g., merchant help desk, user growth).
Product‑Scene: Knowledge‑based Q&A for product information.
Venue‑Scene: Smart operations such as sentiment risk mining and data analysis.
The merchant‑assistant example demonstrates how an AI Agent parses a merchant’s request to boost product sales, queries product APIs, and returns tailored recommendations.
Conclusion
The JD Retail LLM framework—combining ReAct‑based AI agents, SFT, and RAG—significantly improves the efficiency and effectiveness of large‑model deployments in retail. By automating knowledge injection, real‑time retrieval, and autonomous planning, the solution enhances user experience, optimizes operations, and supports the broader digital transformation of the retail industry.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
JD Retail Technology
Official platform of JD Retail Technology, delivering insightful R&D news and a deep look into the lives and work of technologists.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
