NL2KQL: From Natural Language to Kusto Query
Not on the map. Why?
Abstract (arXiv)
Data is growing rapidly in volume and complexity. Proficiency in database query languages is pivotal for crafting effective queries. As coding assistants become more prevalent, there is significant opportunity to enhance database query languages. The Kusto Query Language (KQL) is a widely used query language for large semi-structured data such as logs, telemetries, and time-series for big data analytics platforms. This paper introduces NL2KQL an innovative framework that uses large language models (LLMs) to convert natural language queries (NLQs) to KQL queries. The proposed NL2KQL framework includes several key components: Schema Refiner which narrows down the schema to its most pertinent elements; the Few-shot Selector which dynamically selects relevant examples from a few-shot dataset; and the Query Refiner which repairs syntactic and semantic errors in KQL queries. Additionally, this study outlines a method for generating large datasets of synthetic NLQ-KQL pairs which are valid within a specific database contexts. To validate NL2KQL's performance, we utilize an array of online (based on query execution) and offline (based on query parsing) metrics. Through ablation studies, the significance of each framework component is examined, and the datasets used for benchmarking are made publicly available. This work is the first of its kind and is compared with available baselines to demonstrate its effectiveness.
Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 22 of its 94 references that are in the map. First posted on arXiv 3 Apr 2024.
Builds on
22 of 94 references.
References · 22
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,824
- 2016Matching Networks for One Shot Learningcited by 2,255
- 2018FEVER: a large-scale dataset for Fact Extraction and VERificationcited by 1,375
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,139
- 2020Approximate Nearest Neighbor Negative Contrastive Learning for Dense Text Retrievalcited by 849
- 2017Reading Wikipedia to Answer Open-Domain Questionscited by 777
- 2021Retrieval Augmentation Reduces Hallucination in Conversationcited by 692
- 2017Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learningcited by 687
- 2019RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parserscited by 424
10 more
- 2020Distilling Knowledge from Reader to Retriever for Question Answeringcited by 226
- 2021Cutting Down on Prompts and Parameters: Simple Few-Shot Learning with Language Modelscited by 139
- 2017SQLNet: Generating Structured Queries From Natural Language Without Reinforcement Learningcited by 135
- 2022Few-shot training LLMs for project-specific code-summarizationcited by 129
- 2017Simple and Effective Multi-Paragraph Reading Comprehensioncited by 120
- 2022Productivity Assessment of Neural Code Completioncited by 98
- 2019Multi-passage BERT: A Globally Normalized BERT Model for Open-domain Question Answeringcited by 96
- 2020PyMT5: multi-mode translation of natural language and Python code with transformerscited by 80
- 2018SyntaxSQLNet: Syntax Tree Networks for Complex and Cross-DomainText-to-SQL Taskcited by 74
- 2019Bridging the Semantic Gap with SQL Query Logs in Natural Language Interfaces to Databasescited by 15
Built on by
Citing papers per year: 2025: 2; 2026: 1.
3 papers.
- 2025StepFly: Agentic Troubleshooting Guide Automation for Incident Diagnosiscited by 5
- 2025Effective and Efficient Threat Hunting with Small Language Modelscited by 1
- 2026Like a Hammer, It Can Build, It Can Break: Large Language Model Uses, Perceptions, and Adoption in Cybersecurity Operations on Redditcited by 1
- 2026Like a Hammer, It Can Build, It Can Break: Large Language Model Uses, Perceptions, and Adoption in Cybersecurity Operations on Reddit11 Apr 2026
- 2025Effective and Efficient Threat Hunting with Small Language Models7 Dec 2025
- 2025StepFly: Agentic Troubleshooting Guide Automation for Incident Diagnosis11 Oct 2025