Open-Source LLM Text-to-SQL for Investment Insights: 75%+ Less Analyst Effort
Analysts ask questions in plain English and get SQL-backed answers, charts and explanations from the bank's own database, using open-source LLMs that run inside its environment.
Quick Summary
The Case at a Glance
Challenge
Analysts spent up to 40% of their time writing SQL, and non-technical teams depended on data specialists for every answer.
Solution
A natural language interface, built entirely on open-source LLMs, that turns plain-English questions into SQL on the bank's own database and explains the results.
Results
Human effort reduced by more than 75%, with questions answered in seconds and data kept inside the bank's environment.
The Challenge
What Was Getting in the Way
The bank's analysts juggled multiple tools, wrote their own SQL and interpreted results buried in raw tables, spending up to 40% of their time on queries. Comparing green energy stocks with oil could take hours.
Non-technical teammates had limited access to insights, query results were inconsistent, reliance on data specialists grew with every new question, and insights were often outdated by the time they reached decision-makers.
The bank needed plain-English questions answered in real time from its secure database, with explainable answers and charts, without sending its data to an external AI provider.
Pain Points
Up to 40% of analyst time spent writing queries
Limited access to insights for non-technical teams
Inconsistent query results
Growing reliance on data specialists
Insights outdated by the time they reached decision-makers
The Solution
How Tatras Built It
Tatras built a natural language analytics assistant that generates insights from the bank's SQL database, using open-source LLMs only.
Questions to accurate SQL
Open-source LLMs, including SQLCoder and Llama 3, turn plain-English questions into accurate SQL that runs on the bank's own financial database, accounting for tables, filters and date ranges.
Answers that explain themselves
Results come back as charts with a chain-of-thought explanation of how the answer was reached, and follow-ups such as “What about just January?” work without restating the question. Vector search and a RAG layer ground each answer in the bank's schema and history, reducing hallucination.
Private by design
Because every model is open-source, the whole solution runs inside the bank's own environment, with role-based access control, audit logs and activity logs, and no data leaves the bank.
The result: human effort reduced by more than 75%, plain-English questions answered in seconds, wider access to insights for non-technical teams, and full data privacy at lower operational cost.
Results
What Changed
75%+
Reduction in human effort
Seconds
Plain-English questions answered in seconds
Self-serve
Insights for non-technical teams
Private
Open-source models inside the bank's environment
Figures: more than 75% reduction in human effort, as reported in the Tatras case study record.
Tech Stack
What It Runs On
- Open-source LLMs (SQLCoder; Llama 3)
- Chain-of-thought prompting
- SQL generation
- On-premise SQL
- Vector search
- Secure RAG
- LangChain
- Containerised APIs
- Plotly
- Matplotlib
- On-premise deployment
- RBAC
- Audit logs
- Activity logs
Tap any layer to see its full stack.
AI
- Open-source LLMs (SQLCoder; Llama 3)
Machine learning
- Chain-of-thought prompting
- SQL generation
Data and retrieval
- On-premise SQL
- Vector search
- Secure RAG
Development
- LangChain
- Containerised APIs
Visualisation
- Plotly
- Matplotlib
Security
- On-premise deployment
- RBAC
- Audit logs
- Activity logs
Proven Results
More Results for Our Clients
- 97.5%Roof classification accuracyAI Hail Damage Detection on Roofs with Computer Vision: 97.5% Roof Classification AccuracyRoof classification, YOLOv8 object detection and a human-in-the-loop review app, built in Dataiku, assess hail damage on shingle roofs without climbing a ladder.Read the case study →
- Hours → minutesCountry-level analysis timeCountry-Level Investment Forecasting Using Natural Language Querying & RAG: Analysis Cut from Hours to MinutesAn AI research assistant answers plain-English questions about country-level economies by combining structured data with unstructured reports.Read the case study →
- Better liquiditySmarter trade executionAI Trading Platform with Collaborative-Filtering Recommendations for Better Liquidity & Trade ExecutionA scalable trading engine with collaborative-filtering recommendations suggests alternative instruments when assets are unavailable, improving liquidity and execution.Read the case study →
- 60%+Less manual investigation timeGenAI Fraud Investigation with Neo4j Graph Analytics & Natural Language Queries: 60%+ Less Investigation TimeInvestigators ask questions in plain English, GenAI agents query a Neo4j transaction graph, and a ReAct agent explains how suspicious transactions connect.Read the case study →
AI Hail Damage Detection on Roofs with Computer Vision: 97.5% Roof Classification Accuracy
Roof classification, YOLOv8 object detection and a human-in-the-loop review app, built in Dataiku, assess hail damage on shingle roofs without climbing a ladder.
Country-Level Investment Forecasting Using Natural Language Querying & RAG: Analysis Cut from Hours to Minutes
An AI research assistant answers plain-English questions about country-level economies by combining structured data with unstructured reports.
AI Trading Platform with Collaborative-Filtering Recommendations for Better Liquidity & Trade Execution
A scalable trading engine with collaborative-filtering recommendations suggests alternative instruments when assets are unavailable, improving liquidity and execution.
GenAI Fraud Investigation with Neo4j Graph Analytics & Natural Language Queries: 60%+ Less Investigation Time
Investigators ask questions in plain English, GenAI agents query a Neo4j transaction graph, and a ReAct agent explains how suspicious transactions connect.
FAQs
What is Text-to-SQL?
AI that turns a question in plain English into a database query, so people can get answers without writing SQL.
Which models were used?
Open-source LLMs only, including SQLCoder and Llama 3.
Why open-source models?
They run inside the bank's own environment, so sensitive financial data never leaves it.
Are the answers explained?
Yes. Each answer comes as a chart with a chain-of-thought explanation.
Can analysts ask follow-up questions?
Yes. The assistant keeps context, so follow-ups work without restating the question.
How are hallucinations reduced?
Vector search and a RAG layer ground answers in the bank's schema and data.
Who can use it?
Analysts and non-technical teams, with role-based access.
What results did the bank see?
More than 75% less human effort, with questions answered in seconds.
Get Started
Could AI Do the Same for Your Business?
Book a discovery call and we'll look at your data, your use case and the results worth aiming for.
Book a discovery call