Book a discovery call
Book a discovery call

GenAI Text-to-SQL Assistant for Credit Risk Vintage Curve Analysis: From Hours to Seconds

Open-source LLMs turn plain-English questions into SQL and LIDA draws vintage curves instantly, so risk teams analyse loan cohorts without code.

Quick Summary

The Case at a Glance

  1. Challenge

    Vintage curves needed manual SQL and spreadsheet charting, so every new cohort or filter took hours and depended on analysts.

  2. Solution

    Open-source LLMs turn plain-English questions into SQL and the LIDA library draws the vintage curves, fully on-premise.

  3. Results

    Vintage curve analysis cut from hours to seconds, with business users evaluating credit risk themselves.

The Challenge

What Was Getting in the Way

Vintage curve analysis is vital to credit risk management: it tracks how loan performance changes over time across customer cohorts. But generating the curves required deep knowledge of the data schema and the ability to write and debug SQL, which created a bottleneck for analysts, product managers and risk teams.

Comparing the 6-month delinquency curve for Q1 2022 and Q1 2023 loans meant writing SQL, verifying joins and filters, exporting to Excel and charting by hand, and then starting again for every new filter or cohort. Each analysis took hours, and business teams could not get answers for themselves.

The institution needed a faster way to get vintage curves from its loan data, simply by asking questions in plain English.

Pain Points

  • Vintage curves needed SQL and schema knowledge

  • Manual export and charting in Excel

  • Every new filter or cohort meant starting again

  • Hours per analysis

  • Business teams could not self-serve

The Solution

How Tatras Built It

Tatras built an assistant that turns natural language into SQL, runs it on the institution's loan data and generates vintage curves in real time.

Questions to accurate SQL

Open-source LLMs, SQLCoder and Code Llama, turn each question into SQL that accounts for filters, date ranges, cohorts and the data schema. A vector database helps the LLM select the right tables and columns.

Curves drawn instantly

The LIDA library turns the query results into accurate, labelled vintage curves with embedded filters. The assistant keeps context, so follow-ups such as “Now show me the same for only high-risk customers” work without repeating the question.

Private and built into the workflow

All models and data stay on-premise, with role-based access control. The assistant sits inside the institution's risk analytics tools, and the visuals update as parameters change.

The result: vintage curve analysis time cut from hours to seconds, real-time credit risk analysis, far less reliance on SQL-literate analysts, and lower costs from the open-source LLM stack and faster workflows.

Results

What Changed

  • Hours → seconds

    Vintage curve analysis time

  • Real time

    Credit risk analysis through vintage curves

  • Self-serve

    Less reliance on SQL-literate analysts

  • Lower cost

    Open-source LLM stack and faster workflows

Figures: analysis time reduced from hours to seconds, as reported in the Tatras case study record.

Tech Stack

What It Runs On

    • Open-source LLMs (SQLCoder; Code Llama)
    • Conversational agents
    • SQL databases
    • Vector databases
    • LLM-driven table and column selection
    • PyTorch
    • LangChain
    • LIDA (automated visualisation generation)
    • Graph generation via LIDA with embedded filters
    • On-premise deployment
    • Secure data handling
    • Role-based access control

Tap any layer to see its full stack.

  1. AI

    • Open-source LLMs (SQLCoder; Code Llama)
    • Conversational agents
  2. Data and retrieval

    • SQL databases
    • Vector databases
    • LLM-driven table and column selection
  3. Development

    • PyTorch
    • LangChain
    • LIDA (automated visualisation generation)
  4. Visualisation

    • Graph generation via LIDA with embedded filters
  5. Security

    • On-premise deployment
    • Secure data handling
    • Role-based access control

Proven Results

More Results for Our Clients

See all case studies

FAQs

What is a vintage curve?

A chart that tracks how loan performance, such as delinquency, changes over time for groups of loans issued in the same period.

How does the assistant create vintage curves?

An LLM turns the question into SQL, the query runs on the loan data, and the LIDA library draws the curve.

Which models are used?

Open-source LLMs: SQLCoder and Code Llama.

Do users need to know SQL?

No. They ask questions in plain English.

Can users refine a question?

Yes. Follow-ups such as limiting to high-risk customers work without restating the question.

Where does the data stay?

On-premise. All models and data stay in the institution's environment, with role-based access.

How much faster is it?

Vintage curve analysis went from hours to seconds.

Who uses it?

Risk teams, analysts and product managers, inside their existing risk analytics tools.

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