Draft-Refine-Optimize: Self-Evolved Learning for Natural Language to MongoDB Query Generation
Fuente:
arXiv
Salvato in:
| Autori principali: | , , , , , |
|---|---|
| Natura: | Preprint |
| Pubblicazione: |
2026
|
| Soggetti: | |
| Accesso online: | |
| Tags: |
Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
|
| _version_ | 1866915937659125760 |
|---|---|
| author | Ye, Mingwei Zhuang, Jiaxi Xu, Mingjun Zhang, Linfeng Ke, Guolin Cai, Hengxing |
| author_facet | Ye, Mingwei Zhuang, Jiaxi Xu, Mingjun Zhang, Linfeng Ke, Guolin Cai, Hengxing |
| contents | Natural Language to MongoDB Query Language (NL2MQL) is essential for democratizing access to modern document-centric databases. Unlike Text-to-SQL, NL2MQL faces unique challenges from MQL's procedural aggregation pipelines, deeply nested schemas, and ambiguous value grounding. Existing approaches use static prompting or one-shot refinement, which inadequately model these complex contexts and fail to systematically leverage execution feedback for persistent improvement. We propose EvoMQL, a self-evolved framework that unifies evidence-grounded context construction with execution-driven learning through iterative Draft-Refine-Optimize (DRO) cycles. Each cycle uses draft queries to trigger query-aware retrieval, dynamically building compact evidence contexts that resolve schema ambiguities and ground nested paths to concrete values. The model then undergoes online policy optimization with execution-based rewards and curriculum scheduling, with refined models feeding back into subsequent cycles for progressive evolution. Overall, EvoMQL achieves state-of-the-art execution accuracy of 76.6% on the EAI in-distribution benchmark and 83.1% on the TEND out-of-distribution benchmark, outperforming the strongest open-source baselines by up to 9.5% and 5.2%, respectively. With only 3B activated parameters, this closed-loop paradigm enables scalable, continuous improvement of NL2MQL systems in production. |
| format | Preprint |
| id |
arxiv_https___arxiv_org_abs_2604_13045 |
| institution | arXiv |
| publishDate | 2026 |
| record_format | arxiv |
| spellingShingle | Draft-Refine-Optimize: Self-Evolved Learning for Natural Language to MongoDB Query Generation Ye, Mingwei Zhuang, Jiaxi Xu, Mingjun Zhang, Linfeng Ke, Guolin Cai, Hengxing Databases Natural Language to MongoDB Query Language (NL2MQL) is essential for democratizing access to modern document-centric databases. Unlike Text-to-SQL, NL2MQL faces unique challenges from MQL's procedural aggregation pipelines, deeply nested schemas, and ambiguous value grounding. Existing approaches use static prompting or one-shot refinement, which inadequately model these complex contexts and fail to systematically leverage execution feedback for persistent improvement. We propose EvoMQL, a self-evolved framework that unifies evidence-grounded context construction with execution-driven learning through iterative Draft-Refine-Optimize (DRO) cycles. Each cycle uses draft queries to trigger query-aware retrieval, dynamically building compact evidence contexts that resolve schema ambiguities and ground nested paths to concrete values. The model then undergoes online policy optimization with execution-based rewards and curriculum scheduling, with refined models feeding back into subsequent cycles for progressive evolution. Overall, EvoMQL achieves state-of-the-art execution accuracy of 76.6% on the EAI in-distribution benchmark and 83.1% on the TEND out-of-distribution benchmark, outperforming the strongest open-source baselines by up to 9.5% and 5.2%, respectively. With only 3B activated parameters, this closed-loop paradigm enables scalable, continuous improvement of NL2MQL systems in production. |
| title | Draft-Refine-Optimize: Self-Evolved Learning for Natural Language to MongoDB Query Generation |
| topic | Databases |
| url | https://arxiv.org/abs/2604.13045 |