DualES: Internalizing Query-Text Duality for Text-to-ES via Bidirectional Reasoning-Enhanced Supervision

Dongge Xue, Yuxiang Wang, Tong Ruan


Abstract
Text-to-ES aims to translate natural language into executable Elasticsearch(ES) queries. Unlike more open-ended reasoning tasks, such as mathematical reasoning, this problem is defined over a constrained domain-specific language, where the synergy between forward reasoning and backward reasoning can be more explicitly realized under strict structural constraints. While recent work has explored reasoning-oriented training and prompting in text-to-SQL, forward and backward reasoning have not been systematically studied in text-to-ES. In this paper, we systematically study the bidirectional duality of the text-to-ES task by establishing a bidirectional reasoning perspective across both training and prompting stages. We introduce two large-scale datasets, TERD and ETRD, for forward and backward reasoning, respectively, and propose DualES, a unified framework that combines the two. Experimental results show that our DualES-CoRE strategy sets a new State-of-the-Art(SOTA), achieving 69.23% on LED and 50.14% on BirdES. This corresponds to absolute execution accuracy gains of 6.92% and 7.34% over previous benchmarks, outperforming both open-source and closed-source baselines. We will release the datasets in the future.
Anthology ID:
2026.findings-emnlp.1777
Volume:
Findings of the Association for Computational Linguistics: EMNLP 2026
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Hung-Yi Lee, Sunipa Dev, Jessy Li, Desmond Elliott
Venue:
Findings
SIG:
SIGDAT
Publisher:
Association for Computational Linguistics
Note:
Pages:
38006–38024
Language:
URL:
https://aclanthology.org/2026.findings-emnlp.1777/
DOI:
Bibkey:
Cite (ACL):
Dongge Xue, Yuxiang Wang, and Tong Ruan. 2026. DualES: Internalizing Query-Text Duality for Text-to-ES via Bidirectional Reasoning-Enhanced Supervision. In Findings of the Association for Computational Linguistics: EMNLP 2026, pages 38006–38024, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
DualES: Internalizing Query-Text Duality for Text-to-ES via Bidirectional Reasoning-Enhanced Supervision (Xue et al., Findings 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.findings-emnlp.1777.pdf