NL2KQL: From Natural Language to Kusto Query

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Tang, Xinye, Abdi, Amir H., Eichelbaum, Jeremias, Das, Mahan, Klein, Alex, Pakis, Nihal Irmak, Blum, William, Mace, Daniel L, Raja, Tanvi, Padmanabhan, Namrata, Xing, Ye
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866929679021113344
author Tang, Xinye
Abdi, Amir H.
Eichelbaum, Jeremias
Das, Mahan
Klein, Alex
Pakis, Nihal Irmak
Blum, William
Mace, Daniel L
Raja, Tanvi
Padmanabhan, Namrata
Xing, Ye
author_facet Tang, Xinye
Abdi, Amir H.
Eichelbaum, Jeremias
Das, Mahan
Klein, Alex
Pakis, Nihal Irmak
Blum, William
Mace, Daniel L
Raja, Tanvi
Padmanabhan, Namrata
Xing, Ye
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2404_02933
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle NL2KQL: From Natural Language to Kusto Query
Tang, Xinye
Abdi, Amir H.
Eichelbaum, Jeremias
Das, Mahan
Klein, Alex
Pakis, Nihal Irmak
Blum, William
Mace, Daniel L
Raja, Tanvi
Padmanabhan, Namrata
Xing, Ye
Databases
Artificial Intelligence
Computation and Language
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.
title NL2KQL: From Natural Language to Kusto Query
topic Databases
Artificial Intelligence
Computation and Language
url https://arxiv.org/abs/2404.02933