THOR: Transformer Heuristics for On-Demand Retrieval

📅 2025-07-13
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This paper addresses the challenge of enabling non-technical users to securely and reliably access enterprise databases via natural language. We propose a verifiable, read-only SQL generation framework. Methodologically, it employs a decoupled multi-agent architecture integrating dynamic schema injection, LLM-driven SQL generation, a self-correcting scoring loop, and a read-only guard mechanism, coupled with fine-grained read-permission control. Our key contributions are: (1) dynamic schema injection enhances contextual awareness; (2) the self-correcting loop significantly improves generation accuracy and robustness; and (3) end-to-end compliance design ensures enterprise-grade security and fault tolerance. Empirical evaluation across financial, sales, and operations domains demonstrates high-precision ad hoc querying and automated periodic reporting, with seamless integration into real-time analytics and visualization platforms.

Technology Category

Application Category

📝 Abstract
We introduce the THOR (Transformer Heuristics for On-Demand Retrieval) Module, designed and implemented by eSapiens, a secure, scalable engine that transforms natural-language questions into verified, read-only SQL analytics for enterprise databases. The Text-to-SQL module follows a decoupled orchestration/execution architecture: a Supervisor Agent routes queries, Schema Retrieval dynamically injects table and column metadata, and a SQL Generation Agent emits single-statement SELECT queries protected by a read-only guardrail. An integrated Self-Correction & Rating loop captures empty results, execution errors, or low-quality outputs and triggers up to five LLM-driven regeneration attempts. Finally, a Result Interpretation Agent produces concise, human-readable insights and hands raw rows to the Insight & Intelligence engine for visualization or forecasting. Smoke tests across finance, sales, and operations scenarios demonstrate reliable ad-hoc querying and automated periodic reporting. By embedding schema awareness, fault-tolerant execution, and compliance guardrails, the THOR Module empowers non-technical users to access live data with zero-SQL simplicity and enterprise-grade safety.
Problem

Research questions and friction points this paper is trying to address.

Transforms natural-language questions into secure SQL queries
Ensures fault-tolerant execution with self-correction mechanisms
Enables non-technical users to access enterprise data safely
Innovation

Methods, ideas, or system contributions that make the work stand out.

Decoupled orchestration/execution architecture for Text-to-SQL
Self-Correction & Rating loop for LLM-driven regeneration
Schema awareness and read-only guardrails for safety
🔎 Similar Papers
I
Isaac Shi
eSapiens Team
Z
Zeyuan Li
eSapiens Team
F
Fan Liu
eSapiens Team
W
Wenli Wang
eSapiens Team
Lewei He
Lewei He
South China Normal University
3D PrintingDeep Learning
Y
Yang Yang
eSapiens Team
Tianyu Shi
Tianyu Shi
University of Toronto
Reinforcement learningIntelligent Transportation SystemLarge Language ModelsAILLM agent