AI
New Method Cuts Search Query Correction Latency in Half While Maintaining Accuracy
Researchers propose Sandwich Reasoning, which generates an initial answer, reasoning, and refined answer to enable fast query correction without sacrificing quality.
Search engines need to correct user queries quickly and accurately, but traditional reasoning approaches that improve quality often slow things down. A research team has introduced a new technique called Sandwich Reasoning (SandwichR) that balances both demands by generating answers before and after reasoning—eliminating the latency penalty that typically comes with improved accuracy.
The Challenge: Speed vs. Quality#
Chain-of-Thought reasoning helps language models think through problems step-by-step, leading to more accurate query corrections. However, this reasoning process adds latency that search systems simply cannot afford in real-time scenarios. A shortcut—outputting an answer immediately without reasoning—saves time but means the model cannot apply its reasoning ability to refine the correction. This creates a bind: either users get fast but less accurate results, or accurate but slow results.
How Sandwich Reasoning Works#
SandwichR follows an Answer-Reasoning-Answer pattern:
- The model produces an initial correction quickly
- Then generates explicit reasoning about what needs fixing
- Finally, delivers a refined correction informed by that reasoning
The key innovation is aligning these three pieces so the initial answer actually benefits from the subsequent reasoning, even though they occur sequentially.
Consistency-Aware Training#
To make this alignment work, researchers designed a specialized reinforcement learning strategy with two components. A consistency reward pushes the initial and final answers toward agreement, while margin-based rejection sampling focuses training on borderline cases where reasoning creates the biggest improvement. This targeted approach ensures the model learns to make its early answers compatible with better reasoning.
The team also assembled a new high-quality dataset for query correction, filling a gap in available benchmarks for this specific task.
Results: 40-70% Faster, Same Accuracy#
Experiments show SandwichR achieves comparable accuracy to standard reasoning approaches while delivering a 40-70% latency reduction. The method effectively resolves the traditional trade-off between speed and reasoning quality in live search applications, making more sophisticated corrections feasible within strict time budgets.

