# From Item-Only to Query-Item: Query-Conditioned Generative Search with QGS in Quark

Source: [From Item-Only to Query-Item: Query-Conditioned Generative Search with QGS in Quark](<https://www.sota2.com/research/paper/6a152944dbd7150506f7e116>)

Collection index: [llms.txt](<https://www.sota2.com/research/llms.txt>)

Data updated: 2026-05-27T05:00:21.000Z

Authors: Yanglong Song, Zihao Yang, Shuo Meng, Rujun Guo, Jin Zhang, Bin Wang, Shaoyu Liu, Xiaozhao Wang, Guanjun Jiang

Published: 2026-05-25T07:18:51.000Z

## Abstract

Generative sequence models have shown strong results in recommendation. Applying them to search ranking is more challenging. Search behavior is inherently query-driven. Each query switch introduces a sharp topic shift in the user's interaction history. Existing generative methods flatten queries and items into a single token sequence. They do not distinguish query boundaries. This causes the model to mix different query intents into one prediction target, resulting in noisy supervision.   We present Query-Conditioned Generative Search (QGS). QGS encodes each interaction as a (query, item) pair token. It trains with a query-conditioned next-item objective. The prediction target changes from a noisy marginal P(item\_{t+1}\|context\_{\<=t}) to a clean conditional P(item\_{t+1}\|context\_{\<=t}, query\_{t+1}). This directly removes the semantic discontinuity caused by query switches.   Encoding long interaction histories with standard attention has quadratic cost. This is impractical under strict online latency budgets. We introduce a Linear HSTU encoder. It replaces full attention with causal linear recurrence. Per-layer complexity drops from O(L^2) to O(L) with no loss in ranking quality.   Traditional search ranking depends on hand-crafted features like text-matching scores, statistical signals, and behavioral features. We propose HFG-Attention to preserve them in the generative framework. It organizes heterogeneous features into semantic groups and fuses them through a dedicated attention block. This bridges sparse engineered signals with dense sequential representations.   QGS is deployed in the ranking module of Quark Search, a major commercial search engine in China. Online A/B tests show statistically significant gains: +0.62% CTR, +0.38% Click-Search Ratio, and +3.55% PV Duration over the production deep learning baseline.

## Recorded benchmark results

A research result applies to its stated dataset, split, metric and evaluation configuration. Compare like-for-like settings, preserve the metric's unit and direction, and distinguish paper-reported results from independent reproduction. The best result recorded here is not a claim of exhaustive, current global coverage.

- [Search Ranking on Quark Search (test)](<https://www.sota2.com/research/sota/search-ranking-on-quark-search-test.md>): Search Ranking; Quark Search (test); GAUC: 75.73.

- [CTR Prediction on Quark Search (Online A/B Test)](<https://www.sota2.com/research/sota/ctr-prediction-on-quark-search-online-a-b-test.md>): CTR Prediction; Quark Search (Online A/B Test); CTR: 0.62.

## Original sources and implementation

[Original paper](<https://arxiv.org/abs/2605.25514>)

[PDF](<https://arxiv.org/pdf/2605.25514.pdf>)
