Uppsats

Designing a Locally Deployed Text-to-SQL Agent for Liquidity Risk

Yrkesexamen på avancerad nivå

Uppsala universitet/Avdelningen för systemteknik

Publicerad: 2026

Språk: Engelska

Nyckelord

klicka för att söka

Sammanfattning

Modern financial institutions rely on large and complex relational databases to support liquidity risk analysis. Effective use of these systems requires a combination of structured query language (SQL) proficiency, familiarity with the underlying database structure, and deep understanding of financial concepts. These skills are typically distributed across different roles rather than embodied in a single expert, creating a significant barrier for employees whose competence does not span all of these areas. Recent advances in large language models (LLMs) offer the potential to bridge this gap through natural language interfaces to databases (NLIDB), but deploying such systems in regulated, data-sensitive environments remains challenging. This thesis investigates the feasibility of designing and implementing a modular, schema-aware NLIDB agent for liquidity risk management using locally deployed LLMs, maintaining strict security, privacy, and infrastructure constraints. The NLIDB system incorporates both similarity-based schema linking, which retrieves relevant database entities using string-based and embedding-based similarity, and LLM-based schema grounding, where the model performs reasoning over structured schema descriptions. An empirical evaluation is performed on a real-world enterprise database supporting liquidity risk analysis. The study assesses both schema linking accuracy and SQL generation correctness across multiple NLIDB system configurations, varying components such as preprocessing steps, schema documentation granularity, schema linking strategies, and the use of execution-time error feedback. Results show that enriched schema documentation and retrieval-augmented grounding significantly improve linking accuracy and SQL validity, while modular orchestration enables controlled and interpretable query generation in a high-stakes financial context. Overall, the findings demonstrate that a locally deployed, schema-aware NLIDB agent can provide meaningful analytical support to liquidity risk analysts. While the system is not intended as a production-ready solution, it establishes the practical viability of modern NLIDB techniques in constrained enterprise environments and identifies key limitations and directions for future work.

Information

Lärosäte / institution
Uppsala universitet/Avdelningen för systemteknik
Publiceringsdatum
2026
Uppsatstyp
Yrkesexamen på avancerad nivå
Språk
Engelska

Utforska vidare

Liknande uppsatser

Uppsatser med liknande ämnen och nyckelord.