Query correction is a critical entry point in modern search pipelines, demanding high accuracy strictly within real-time latency constraints. Chain-of-Thought (CoT) reasoning improves accuracy but incurs prohibitive latency for real-time query correction. A potential solution is to output an answer before reasoning to reduce latency; however, under autoregressive decoding, the early answer is independent of subsequent reasoning, preventing the model from leveraging its reasoning capability to improve accuracy. To address this issue, we propose Sandwich Reasoning (SandwichR), a novel approach that explicitly aligns a fast initial answer with post-hoc reasoning, enabling low-latency query correction without sacrificing reasoning-aware accuracy. SandwichR follows an Answer-Reasoning-Answer paradigm, producing an initial correction, an explicit reasoning process, and a final refined correction. To align the initial answer with post-reasoning insights, we design a consistency-aware reinforcement learning (RL) strategy: a dedicated consistency reward enforces alignment between the initial and final corrections, while margin-based rejection sampling prioritizes borderline samples where reasoning drives the most impactful corrective gains. Additionally, we construct a high-quality query correction dataset, addressing the lack of specialized benchmarks for complex query correction. Experimental results demonstrate that SandwichR achieves SOTA accuracy comparable to standard CoT while delivering a 40-70% latency reduction, resolving the latency-accuracy trade-off in online search.
Figures & tables
Figure 1. Comparison of reasoning paradigms: traditional Chain-of-Thought (CoT) reasoning vs the proposed sandwich reasoning in this paper.
Figure 2. Examples of three types of query errors including wrong words, missing words, disorder words.
Figure 3. The overall workflow of the proposed SandwichR. It consists of two stages: (1) SandwichR Ability Acquisition via Supervised Fine-Tuning (SFT), and (2) Consistency-Aware Reinforcement Learning (RL).
Dataset
#Train
#Dev
#Test
Tra_Len
Dev_Len
Tes_Len
E-commerce
90,511
1,000
1,000
6.43
6.39
6.45
Video
88,736
1,000
1,000
7.09
7.14
7.12
Medical
94,176
1,000
1,000
16.08
16.19
16.34
Table 1. Statistics of our datasets. #Train , #Dev , #Test denote the number of the train, development and test datasets, while Tra_Len , Dev_Len and Tes_Len represent their average query lengths, respectively.
E-commerce
Video
Medical
Category
Models
F 0.5
Acc
F 0.5
Acc
F 0.5
Acc
Traditional Model
mT5 SFT
0.09
0.079
0.198
0.165
0.166
0.117
BART SFT
0.150
0.124
0.303
0.27
0.377
0.35
Trained Base LLM (1.5B)
Rea-Ans SFT
0.178
0.164
0.278
0.255
0.347
0.309
Ans-Rea SFT
0.199
0.181
0.280
0.250
0.366
0.312
SandwichR SFT
0.202
0.187
0.293
0.253
0.376
0.338
Table 2. Performance comparison between SandwichR and the baseline on the three datasets, with the best performance among the trained LLMs is highlighted in bold, and the second-best method is underlined.
Method
Setting
E-commerce
Video
Medical
Acc
Time (s)
Acc
Time (s)
Acc
Time (s)
Rea-Ans
Full Budget
0.207
1.959
0.301
1.143
0.364
1.550
Limited Budget
0.000
0.457
0.000
0.484
0.009
0.900
Δ (%)
-100.00
-76.67
-100.00
-57.66
-97.53
-41.94
Ans-Rea
Full Budget
0.200
1.487
0.292
2.182
0.363
1.089
Limited Budget
0.200
0.464
0.292
0.446
0.359
0.893
Table 3. Robustness under Strict Token Budgets. Time in seconds per sample. Full budget allows 256 tokens; Limited budget simulates low-latency constraints. Δ indicates the change from Full to Limited Budget.
Dataset
Model
Wrong Words
Missing Words
Disorder Words
Medical
Ans-Rea
0.3904
0.3003
0.3982
Rea-Ans
0.3694
0.3003
0.4222
SandwichR
0.3934
0.3153
0.4162
E-commerce
Ans-Rea
0.1862
0.1317
0.2823
Rea-Ans
0.1532
0.1407
0.3273
SandwichR
0.1892
0.1467
0.3033
Table 4. Analysis of accuracy of Different Error Types for SFT+RL Models on Three Datasets.Best performance among each error type and dataset is highlighted in bold.
Method
E-commerce
Video
Medical
Ans-Rea
0.5980
0.5000
0.5560
Rea-Ans
0.6010
0.4990
0.5520
SandwichR
0.6150
0.5180
0.5630
Table 5. Downstream retrieval Recall@1000 of SFT+RL Models across three domains
Models
E-commerce
Video
Medical
F 0.5
Acc
F 0.5
Acc
F 0.5
Acc
SandwichR SFT+RL
0.221
0.213
0.325
0.307
0.396
0.375
w/o Reject Sampling
0.217
0.196
0.313
0.293
0.383
0.351
SandwichR SFT
0.202
0.187
0.293
0.253
0.376
0.338
Table 6. Ablation Study on Training Components
Figure 4. Performance Comparison of SandwichR with different RL training data sizes on E-commerce Dataset. The X-axis represents the RL training data size.
Domain
Total
Valid Format
Cinit=Cfinal
Cinit=Cfinal
Agreement α
Medical
1,000
997
993
4
0.9960
E-commerce
1,000
1,000
984
16
0.9840
Video
1,000
1,000
994
6
0.9940
Table 7. Agreement analysis on SFT+RL checkpoints (1,000 test samples per domain). α=P(Cinit=Cfinal) denotes the empirical agreement rate between the initial and final corrections.
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
Training Strategy
E-commerce
Video
Medical
F 0.5
Acc
F 0.5
Acc
F 0.5
Acc
Mixed-Domain (Single Model)
0.209
0.201
0.343
0.334
0.425
0.407
Domain-Specific (Three Models)
0.221
0.213
0.325
0.307
0.396
0.375
Appendix
Table 8. Performance Comparison: Single Mixed-Domain Model trained on combined data vs. Three Domain-Specific Models trained separately on each dataset using the same two-stage training strategy.
Method
F 0.5
Acc
Rea-Ans
0.134
0.102
Ans-Rea
0.145
0.112
SandwichR
0.148
0.114
Appendix
Table 9. Zero-shot evaluation under high error density on the E-commerce dataset.
Method
F 0.5
Qwen2.5-7B → 1.5B Distillation
0.1610
Direct SFT on Ground-Truth Answers
0.2010
SandwichR (SFT+RL)
0.2210
Appendix
Table 10. Comparison with direct answer-only SFT and teacher distillation baselines on the E-commerce dataset.
Scaling test-time computation enhances LLM reasoning ability but faces a uniform computation paradox. Allocating identical resources leads to over-correction on simple tasks and insufficient refinement on complex ones. To address this, we propose CoFiCot, a coarse-to-fine adaptive framework that dynamically tailors inference strategies to problem difficulty. Specifically, we implement a multi-metric classifier that triages queries by synthesizing semantic entropy, consensus reliability, and predicted reasoning depth . This enables a differentiated refinement stage that applies efficient aggregation for simple queries while routing complex ones to a context-aware correction loop . We formalize correction as a stateful sequential propagation process , where each repair is strictly conditioned on the verified history of prior rectifications. By integrating Process Reward Models (PRMs) within this state-dependent trajectory, CoFiCot effectively bridges the gap between granular error localization and global logical coherence, preventing the context fragmentation typical of stateless refinement methods.
Dongxu Zhang, Hongqiang Lin, Yiding Sun +4
Xi’an Jiaotong University · Zhejiang University · The Chinese University of Hong Kong (Shenzhen) +1
The emergence of Chain-of-Thought (CoT) reasoning has significantly enhanced the ability of large language models (LLMs) to tackle complex, multi-step tasks. However, when errors occur, current interaction approaches typically involve re-generating another response that may make mistakes again, or users laboriously flag the faulty step in follow-up turns that may get responses <You are right, I made a mistake here> followed by similar errors recurring. To address this issue, we propose an efficient human intervention mechanism for precisely correcting reasoning errors in LLMs, termed Deep Interaction. Our approach enables direct editing of the original response, allowing erroneous parts to be corrected while preserving accurate reasoning steps. We refine the edited CoT into a distilled prompt, which then steers the LLM along the corrected reasoning path. Experimental results show that our method achieves over a 25% improvement in correction success rate and reduces token usage by approximately 40% on STEM tasks reasoning compared to baseline approaches.
Hefeng Zhou, Jinxuan Zhang, Jiong Lou +4
Shanghai Artificial Intelligence Laboratory · Shanghai Jiao Tong University
Large language models produce fluent but often incorrect multi-step reasoning, and naive correction methods risk degrading already-correct answers. We introduce Denoising Iterative Self-Correction (DISC), a test-time procedure that treats verification question outputs as noisy measurements of where a solution may be corrupted. Using these signals, DISC progressively reduces errors across multiple verify-judge-correct passes, analogous to traditional iterative denoising. A binary judgment gate controls correction precision by blocking rewrites that would damage already-correct answers while the verifier and corrector together repair errors. We evaluate this trade-off using two paired diagnostics: an improvement-to-degradation ratio (precision) and a repair rate (recall). Across three benchmarks (BIG-Bench Mistake, HotpotQA, GPQA Diamond) and four models, DISC dominates Chain-of-Verification and Self-Refine on the precision-recall trade-off, reaching 81.6% accuracy with 13x more improvements per degradation than Chain-of-Verification and 5x more than Self-Refine on BIG-Bench Mistake (Sonnet~4.5). On GPQA Diamond, we identify a capability floor below which judges acknowledge contradictions in evidence but cannot translate that recognition into a correction. We further show that cross-model role allocation -- assigning verification and judgment to a model different from the generator -- mitigates self-confirmation bias.