Abstract
Reliably generating accurate structured query language (SQL) queries from natural language (NL) inputs is a difficult task due to challenges such as schema ambiguity, uncertainty regarding table relationships, complex business logic makes, etc. LLM-based solutions are often unable to operate reliably within complex, real-world enterprise environments with complex datasets. This disclosure describes the use of agentic artificial intelligence (AI) for NL-to-SQL query transformations. A semantic data layer leverages a three-tiered model - attributes, entities and cubes. Attributes define dimensions within a table, entities represent a logical view of data, and cubes act as business objects that abstract the complexity of identifying a source of truth and model domain-specific datasets. An agentic workflow with an orchestration agent and sub-agents dedicated to individual data cubes is used. A predefined cube configuration is passed to a large language model (LLM) to enable accurate identification of relevant data entities and consistent application of business logic. The namespace of the semantic model is extended to capture agentic guardrails with predefined metadata or prompts, and to control agent behavior and scope, providing context-sensitive information while actively preventing LLM hallucination.
Publication Date
2026-01-05
Creative Commons License

This work is licensed under a Creative Commons Attribution 4.0 License.
Recommended Citation
Aliminati, Janga; Munoz, Manny Sanchez; Narravula, Sundeep; and Singh, Robin, "Dynamic AI Agent Orchestration for NL-to-SQL Query Generation", Technical Disclosure Commons, (January 07, 2026)
https://www.tdcommons.org/dpubs_series/9137