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
Challenge
Vintage curves needed manual SQL and spreadsheet charting, so every new cohort or filter took hours and depended on analysts.
Solution
Open-source LLMs turn plain-English questions into SQL and the LIDA library draws the vintage curves, fully on-premise.
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.
AI
- Open-source LLMs (SQLCoder; Code Llama)
- Conversational agents
Data and retrieval
- SQL databases
- Vector databases
- LLM-driven table and column selection
Development
- PyTorch
- LangChain
- LIDA (automated visualisation generation)
Visualisation
- Graph generation via LIDA with embedded filters
Security
- On-premise deployment
- Secure data handling
- Role-based access control
Proven Results
More Results for Our Clients
- 75%+Less analyst effortOpen-Source LLM Text-to-SQL for Investment Insights: 75%+ Less Analyst EffortAnalysts 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.Read the case study →
- 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 →
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.
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.
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