TLDR: OnePiece is a new framework that applies Large Language Model (LLM) concepts like context engineering and multi-step reasoning to industrial search and recommendation systems. It uses a Transformer backbone with structured input, block-wise reasoning, and progressive multi-task training. Deployed at Shopee, it significantly improved key business metrics like GMV/UU and advertising revenue in both retrieval and ranking tasks, demonstrating better efficiency and scalability than previous methods.
Large Language Models (LLMs) have transformed many areas of artificial intelligence, but their core mechanisms—context engineering and multi-step reasoning—have largely been underexplored in industrial search and recommender systems. While many efforts have focused on adopting Transformer architectures, these have often led to only minor improvements over existing Deep Learning Recommendation Models (DLRMs).
A new research paper titled “OnePiece: Bringing Context Engineering and Reasoning to Industrial Cascade Ranking System” introduces a unified framework that aims to bridge this gap. Authored by Sunhao Dai, Jiakai Tang, Jiahua Wu, Kun Wang, Yuxuan Zhu, Bingjun Chen, Bangyang Hong, Yu Zhao, Cong Fu, Kangle Wu, Yabo Ni, Anxiang Zeng, Wenjie Wang, Xu Chen, Jun Xu, and See-Kiong Ng, the paper proposes a novel approach to integrate LLM-style context engineering and reasoning into both the retrieval and ranking stages of industrial cascaded pipelines.
The OnePiece framework is built on a pure Transformer backbone and introduces three key innovations:
Structured Context Engineering
This innovation enriches raw input queries by augmenting user interaction history with preference and scenario signals. These diverse signals are then unified into a structured, tokenized input sequence that can be used by both retrieval and ranking models. This includes Interaction History (IH), Preference Anchors (PA) derived from expert knowledge, Situational Descriptors (SD) like user profiles and query features, and for ranking, a Candidate Item Set (CIS) allowing items to be jointly visible for comparison.
Block-wise Latent Reasoning
OnePiece equips the model with a multi-step refinement process for representations. Unlike approaches that recycle a single hidden state, block-wise reasoning iteratively transfers and refines a set of hidden states across multiple steps. This design offers adjustable reasoning bandwidth, balancing information compression and retention more effectively, and encouraging specialized roles for different tokens.
Also Read:
- Advancing Conversational Search with Intelligent Query Reformulation and Result Merging
- Smart Location Predictions: A New Approach to Next Destination Recommendations
Progressive Multi-Task Training
To effectively supervise the multi-step reasoning process, OnePiece leverages natural user feedback chains—such as clicks, add-to-carts, and orders—as staged supervision signals. This progressive approach provides structured guidance for intermediate reasoning steps, allowing the model to gradually align with deeper levels of user preference, from initial engagement to final conversion.
The effectiveness of OnePiece has been rigorously tested through extensive offline experiments and large-scale online A/B tests. Offline results showed that OnePiece not only achieved higher sample efficiency but also continued to improve with larger training datasets, outperforming strong baselines. For instance, context engineering alone improved Recall@100 by +0.110 and click-AUC by +0.109, with block-wise reasoning adding further gains.
Crucially, OnePiece has been successfully deployed in Shopee’s main personalized search scenario, serving billions of users. Online A/B testing confirmed significant business gains: retrieval mode led to over +1.08% increase in Gross Merchandise Volume per Unique User (GMV/UU) and a +0.98% increase in Paid Orders per Unique User. The ranking mode delivered a +1.12% GMV/UU gain and a substantial +2.90% increase in advertising revenue. The system also demonstrated superior recall coverage, subsuming existing recall routes and providing a 2x higher exclusive contribution than traditional DLRM methods.
Furthermore, efficiency analysis revealed that OnePiece exhibits superior hardware utilization and faster inference times compared to DLRM, making it a practical solution for large-scale industrial deployment. The framework’s ability to achieve these improvements while maintaining computational efficiency highlights its potential to set a new standard for reasoning-driven ranking models in real-world environments. For more details, you can read the full research paper here.


