Source-linked AI summary
QP-OneModel: A Unified Generative LLM for Multi-Task Query Understanding in Xiaohongshu Search
Jianzhao Huang, Xiaorui Huang, Fei Zhao, Yunpeng Liu, Hui Zhang, Fangcheng Shi, Congfeng Li, Zechen Sun, Yi Wu, Yao Hu, Yunhan Bai, Shaosheng Cao
TL;DR
Existing SNS query-processing systems fragment heterogeneous tasks and struggle with semantic synergy, informal language, data scarcity, and intricate business rules. QP-OneModel unifies these tasks in sequence generation, uses progressive alignment with multi-reward reinforcement learning, and adds intent descriptions. It reports a 7.35% overall gain over BERT-based baselines, 7.60% higher unseen-task accuracy than Qwen3-32B, and a 0.21% DCG 0/1 improvement online.
Problem
Existing SNS QP pipelines and generative approaches separately optimize tasks, while general LLMs struggle with SNS language, scarce data, and precise business rules.
Method
QP-OneModel unifies heterogeneous QP tasks in sequence generation using the RedOne backbone, progressive three-stage alignment, and multi-reward reinforcement learning.
Results
7.35% overall improvement over BERT-based baselines, 7.60% higher Document Intent accuracy than Qwen3-32B under ICL, and 0.21% DCG 0/1 improvement online.
Takeaways & Limitations
Intent Descriptions provide a high-fidelity semantic signal for downstream query rewriting and ranking, while unified modeling supports generalization to unseen QP tasks.
Takeaways & Limitations
Unified QP training is constrained by scarce real-time human-annotated data covering all sub-tasks jointly, with approximately 10^5 samples.
Abstract
from arXiv · showhide
Query Processing (QP) bridges user intent and content supply in large-scale Social Network Service (SNS) search engines. Traditional QP systems rely on pipelines of isolated discriminative models (e.g., BERT), suffering from limited semantic understanding and high maintenance overhead. While Large Language Models (LLMs) offer a potential solution, existing approaches often optimize sub-tasks in isolation, neglecting intrinsic semantic synergy and necessitating independent iterations. Moreover, standard generative methods often lack grounding in SNS scenarios, failing to bridge the gap between open-domain corpora and informal SNS linguistic patterns, while struggling to adhere to rigorous business definitions. We present QP-OneModel, a Unified Generative LLM for Multi-Task Query Understanding in the SNS domain. We reformulate heterogeneous sub-tasks into a unified sequence generation paradigm, adopting a progressive three-stage alignment strategy culminating in multi-reward Reinforcement Learning. Furthermore, QP-OneModel generates intent descriptions as a novel high-fidelity semantic signal, effectively augmenting downstream tasks such as query rewriting and ranking. Offline evaluations show QP-OneModel achieves a 7.35% overall gain over discriminative baselines, with significant F1 boosts in NER (+9.01%) and Term Weighting (+9.31%). It also exhibits superior generalization, surpassing a 32B model by 7.60% accuracy on unseen tasks. Fully deployed at Xiaohongshu, online A/B tests confirm its industrial value, optimizing retrieval relevance (DCG) by 0.21% and lifting user retention by 0.044%.
1 Introduction
QP-OneModel addresses fragmented, weakly semantic SNS query-processing pipelines by unifying heterogeneous tasks and progressively aligning a domain-specific generative model with business rules. It adds intent descriptions and reports gains over discriminative and larger-model baselines.
- Motivation: Traditional SNS QP uses isolated discriminative models for NER, segmentation, term weighting, and taxonomy, limiting semantic understanding and increasing maintenance overhead.These limitations are especially relevant for nuanced, long-tail queries and distribution shifts.
- Motivation: Existing generative approaches optimize sub-tasks separately, while general LLMs struggle with SNS linguistic shifts, data scarcity, and complex business definitions.SNS queries contain sparse, rapidly evolving language such as emerging slang.
- Approach: QP-OneModel reformulates heterogeneous QP tasks as one sequence-generation task using a domain-specific backbone and three-stage progressive alignment.The alignment proceeds from knowledge injection to target-distribution alignment and multi-reward reinforcement learning.
- Approach: Intent Descriptions provide a natural-language account of the user’s search goal and augment downstream query rewriting and ranking.They are derived from joint modeling of structural and semantic QP information.
- Results: 7.35% overall improvement over BERT-based baselines and 7.60% superiority over Qwen3-32B summarize the reported offline gains.The cited comparisons are reported in the introduction’s contribution summary.
2 Related Work
Related work moves from statistical and Transformer-based QP components toward LLM-assisted retrieval and unified text-to-text learning. However, production QP remains constrained by cascaded pipelines, domain shift, and evolving social-media vocabulary.
- QP systems: Transformer-based pretrained language models became dominant QP backbones after earlier statistical approaches such as CRFs.The supplied passage introduces this historical progression but is truncated after describing Transformer-based methods.
- QP systems: Production QP commonly uses independently trained cascaded components, creating system overhead and error propagation.These pipelines are also sensitive to domain shift and long-tail traffic.
- LLM-based retrieval: LLMs have been applied to query rewriting, expansion, relevance modeling, and generative retrieval, including expansions that mitigate query-document lexical mismatch.Vertical-search studies also report relevance-estimation gains from LLM reasoning.
- Unified modeling: Unified text-to-text learning casts diverse NLP tasks as sequence generation, enabling a common interface and joint optimization for search applications.Industrial studies have explored unified frameworks for query suggestion and search modeling.
3 Preliminaries
QP transforms raw queries into structured semantic signals for retrieval through four established sub-tasks and a newly introduced generative task. The framework specifies operational outputs for entities, terms, weights, taxonomy labels, and intent descriptions.
- QP role: QP is the search engine’s foundational layer, converting raw user inputs into structured semantic representations for information retrieval.The supplied figure passages identify the broader QP-OneModel framework but add no preliminary definitions.
- Core sub-tasks: NER identifies semantic spans in a query and assigns them labels from a predefined ontology.This is one of the four core QP sub-tasks defined for the industrial environment.
- Core sub-tasks: Word Segmentation partitions delimiter-free character sequences into discrete lexical units.The operation is defined for languages lacking explicit word delimiters.
- Core sub-tasks: Term Weighting assigns each segmented term a discrete relevance level from 0 to 3, with Level 3 representing core intent carriers.The hierarchy governs mandatory matching logic in the search engine.
- Core sub-tasks: Query Taxonomy maps a query to multiple relevant categories in ranked order, prioritizing the Top-1 label as the dominant intent.The labels support vertical-specific retrieval strategies.
- Generative task: Intent Description generates a natural-language representation of the user’s search goal as an additional generative QP task.The supplied passage introduces this task but ends before completing its description.
4 Methodology
QP-OneModel reformulates heterogeneous query-processing tasks as one structured sequence-generation problem, using business-aware context and progressive alignment to jointly model task dependencies and business logic.
- Business-Aware Prompt Design: The model conditions generation on the query, task instructions, configurable business rules, and dynamic contexts such as rewrite history and candidate notes.The final prompt concatenates these components with appropriate delimiters.
- Unified Sequence Generation: QP-OneModel generates one structured JSON output containing entities, segments, weights, category, and intent_desc for all QP sub-tasks.The autoregressive output follows the order NER, Word Segmentation, Term Weighting, Query Taxonomy, and Intent Description.
- Unified Sequence Generation: Sequential execution lets downstream tasks use upstream results, so entity recognition can refine segmentation and both can improve term weighting.This design is intended to maximize task synergy within the unified generation process.
- Business-Aware Prompt Design: Business-aware prompting encodes operational knowledge as explicit instructions that operations staff can update for emerging scenarios or new policies without retraining.Rules cover entity definitions, segmentation, term weighting, category taxonomy, and intent analysis.
- Business-Aware Prompt Design: User rewrite history supplies temporal context for disambiguating vague inputs, while candidate notes anchor ambiguous, time-sensitive, or platform-specific queries in platform content.Both contexts are injected dynamically into the prompt.
- Progressive Alignment: The training strategy progresses from broad auxiliary knowledge and limited unified annotations to real-time supervised fine-tuning, followed by reinforcement learning with a composite multi-task reward.The mixed-training objective balances the human-annotated unified dataset against task-specific auxiliary datasets, while the reward stage targets business logic internalization.
5.1 Experimental Settings
The evaluation uses a manually constructed Golden Test Set and task-specific metrics, including an overall average across all sub-tasks.
- Test Set Construction: Approximately 2,500 queries were randomly sampled from recent production traffic for the Golden Test Set.The set used expert-driven guidelines, specialized annotator training, and iterative verification.
- Evaluation Metrics: Word Segmentation and NER are evaluated with standard F1, while NER requires exact entity-span and entity-type matches.
- Evaluation Metrics: Term Weighting uses joint F1 over ⟨term, weight⟩ units, requiring both term boundaries and importance levels to match.This accounts for Term Weighting’s dependence on preceding Word Segmentation.
- Evaluation Metrics: Query Taxonomy is evaluated by averaging Top-1 Accuracy and standard F1, while the overall score averages all sub-task scores.The composite taxonomy metric reflects the dominant intent and recall of relevant categories.
5.2 Offline Evaluation
QP-OneModel is evaluated against discriminative pipelines through main-result, synergy, ablation, and unseen-task generalization experiments. Across these evaluations, unified modeling and progressive training show improvements in overall performance and semantic QP tasks.
- Main Results: RQ1 compares QP-OneModel with the industry-standard cascaded BERT-based discriminative pipeline.
- Main Results: +7.35% overall score is achieved by QP-OneModel-8B over the discriminative baseline, with NER F1 and Term Weighting F1 gains of +9.01% and +9.31%.
- Main Results: +5.83% overall score is achieved by QP-OneModel-0.6B over the baseline, including a +8.59% Term Weighting F1 gain.The result is reported as an overall score of 78.37%, with Term Weighting F1 increasing from 56.86% to 65.45%.
- Synergy of Unified Modeling: 79.36% versus 78.11% overall score shows unified modeling outperforming task-isolated training on synergistic QP tasks.The reported gains concentrate on NER, Word Segmentation, and Term Weighting, which have strong mutual dependencies.
- Synergy of Unified Modeling: The unified approach models joint task probability and turns upstream outputs into explicit downstream context.This design is reported to improve performance and efficiency relative to isolated models.
- Ablation Study: RedOne-based initialization consistently outperforms Qwen3, including +0.25% in Word Segmentation and +0.69% in Taxonomy.The comparison is conducted during Stage 1 training for the 8B model.
- Ablation Study: Stage 2 raises the 8B overall score to 79.44%, while Stage 3 improves semantic tasks by +1.26% Term Weighting and +0.24% NER.For the 0.6B model, Stage 3 increases Term Weighting by +1.35%, from 64.10% to 65.45%.
- Generalization on Emerging Tasks: 82.40% Document Intent accuracy lets QP-OneModel-8B surpass RedOne-8B at 75.80% and Qwen3-32B at 74.80% in few-shot prompting.For Authority Intent, it achieves 71.56% accuracy, performing on par with the 32B model.
5.3 Online Evaluation
Online A/B tests evaluated QP-OneModel’s fundamental query signals and its Intent Descriptions in downstream query rewriting at Xiaohongshu. Replacing baseline signals improved relevance, while Intent Descriptions improved engagement and retention.
- Experimental setup: 5% treatment and 5% control traffic were tested for at least 14 days using Xiaohongshu’s online A/B platform.The experiments evaluated both fundamental signals and downstream Intent Description utility.
- Fundamental Signal Performance: 0.21% lower DCG 0/1 exceeded the 0.15% significance threshold after replacing BERT-based baseline signals with QP-OneModel outputs.The tested signals included NER, taxonomy, and term weights.
- Fundamental Signal Performance: 0.4631% lower Zero/Few-Result Rate accompanied the improved fundamental-signal performance.This metric tracks queries returning extremely few results.
- Downstream Application Performance: +0.17% NECTR exceeded the 0.1% significance threshold when Intent Descriptions augmented the production query rewriter.Intent Descriptions served as training supervision and inference inputs.
- Downstream Application Performance: +0.044% SAU-Retention accompanied the downstream query-rewriting improvement using Intent Descriptions.The result supports the reported online utility of the generated intent signal.
5.4 Qualitative Analysis
Qualitative cases show QP-OneModel recovering implicit semantics from sparse queries and resolving ambiguity by adding contextual or actionable interpretations.
- Overcoming Semantic Sparsity via Latent Linking: For “1c1,” QP-OneModel inferred the unmentioned Estée Lauder brand and the user’s implicit shade-comparison goal.The case illustrates latent linking for an alphanumeric query.
- Resolving Polysemy and Enhancing Granularity: For “163 Guards Tank Regiment,” the model captured both the explicit military fact and a latent gaming context.The output distinguishes multiple interpretations of the query.
- Resolving Polysemy and Enhancing Granularity: For “retro-x,” the model expanded the product entity into wind-resistance and price attributes for downstream ranking.These attributes provide richer semantic signals than the product name alone.
6 Conclusion
QP-OneModel unifies heterogeneous query-processing tasks through sequence generation, domain adaptation, and progressive multi-reward reinforcement learning. It outperforms discriminative baselines, generalizes to unseen tasks, and delivers online gains after deployment at Xiaohongshu.
- Framework: QP-OneModel reformulates heterogeneous query-processing sub-tasks into one sequence-to-sequence generation paradigm.The framework uses the RedOne backbone and progressive multi-reward reinforcement learning.
- Offline results: 7.35% higher overall score and F1 gains of 9.01% for NER and 9.31% for Term Weighting were reported over discriminative baselines.These are the paper’s principal offline performance improvements.
- Generalization: 7.60% higher Document Intent accuracy than Qwen3-32B was achieved under the ICL setting on unseen QP tasks.The result indicates robust generalization beyond the evaluated training tasks.
- Industrial deployment: Online deployment improved DCG 0/1 by 0.21% and user retention by 0.044% at Xiaohongshu.The model was fully deployed for Search Results Page traffic.