Book a discovery call
Book a discovery call

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

  1. Challenge

    Analysts spent up to 40% of their time writing SQL, and non-technical teams depended on data specialists for every answer.

  2. 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.

  3. 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.

  1. AI

    • Open-source LLMs (SQLCoder; Llama 3)
  2. Machine learning

    • Chain-of-thought prompting
    • SQL generation
  3. Data and retrieval

    • On-premise SQL
    • Vector search
    • Secure RAG
  4. Development

    • LangChain
    • Containerised APIs
  5. Visualisation

    • Plotly
    • Matplotlib
  6. Security

    • On-premise deployment
    • RBAC
    • Audit logs
    • Activity logs

Proven Results

More Results for Our Clients

See all case studies

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