Abstract
A computer-implemented method of generating database queries includes receiving, at a server, a query input and determining whether the query input is to be processed in a structured-query mode or a natural-language mode. In response to determining that the query input is to be processed in the structured-query mode, a database query statement may be generated by deterministically parsing the query input into a set of filter tokens and a set of pipeline commands, without invoking a language model. In response to determining that the query input is to be processed in the natural-language mode, the query input may be transmitted together with a schema-derived system prompt to a language model and a database query statement may be extracted from a response of the language model. The database query statement may be validated against a set of safety constraints regardless of which mode generated the database query statement. The validated database query statement may be executed against a distributed log database over a secured connection, and a set of columns and a set of rows retrieved from the distributed log database may be returned.
Creative Commons License

This work is licensed under a Creative Commons Attribution 4.0 License.
Recommended Citation
Mullangi, Kishore, "AI-POWERED NATURAL LANGUAGE TO SQL QUERY GENERATOR WITH DETERMINISTIC SPL PARSING", Technical Disclosure Commons, (October 28, 2026)
https://www.tdcommons.org/dpubs_series/12520