RedParrot: Accelerating NL-to-DSL for Business Analytics via Query Semantic Caching
Tong Wang, Yongqin Xu, Jianfeng Zhang, Lingxi Cui, Wenqing Wei, Suzhou Chen, Huan Li, Ke Chen, Lidan Shou

TL;DR
RedParrot is a framework that accelerates natural language to DSL conversion for business analytics by using semantic caching and pattern matching, significantly reducing latency and improving accuracy.
Contribution
It introduces a novel semantic cache-based approach with skeleton matching, contrastive embedding, and RAG techniques to enhance NL-to-DSL conversion efficiency and robustness.
Findings
Achieves 3.6x speedup in inference time.
Improves accuracy by 8.26% on enterprise datasets.
Boosts accuracy by 34.8% on public benchmarks.
Abstract
Recently, at Xiaohongshu, the rapid expansion of e-commerce and advertising demands real-time business analytics with high accuracy and low latency. To meet this demand, systems typically rely on converting natural language (NL) queries into Domain-Specific Languages (DSLs) to ensure semantic consistency, validation, and portability. However, existing multi-stage LLM pipelines for this NL-to-DSL task suffer from prohibitive latency, high cost, and error propagation, rendering them unsuitable for enterprise-scale deployment. In this paper, we propose RedParrot, a novel NL-to-DSL framework that accelerates inference via a semantic cache. Observing the high repetition and stable structural patterns in user queries, RedParrot bypasses the costly pipeline by matching new requests against cached "query skeletons" (normalized structural patterns) and adapting their corresponding DSLs. Our core…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
