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.
Quick Summary
The Case at a Glance
Challenge
Forecasts were buried in reports and siloed data, so comparing countries took hours or days.
Solution
A hybrid AI pipeline: LLM-driven text-to-SQL, LLM parsing of reports into sentiment-tagged forecasts, and a RAG knowledge base behind a chatbot.
Results
Country-level analysis cut from hours to minutes, with structured data and reports answering questions together.
The Challenge
What Was Getting in the Way
Forecasting country-level macroeconomic performance is high-stakes and data-heavy. To compare three emerging markets, an analyst had to search PDFs, spreadsheets, World Bank data and proprietary forecasts, extract tables by hand, score sentiment in Excel and write up the findings. Each country took hours, sometimes days.
A follow-up question, such as “How did Vietnam's Q2 GDP sentiment compare with Thailand's?”, meant starting again. Forecasts sat in inconsistent, unstructured reports, structured databases and documents lived in silos, sentiment analysis was manual and subjective, and only users who knew SQL could query the data directly.
The client, a US financial intelligence platform, wanted one engine that could forecast economic factors, interpret the sentiment behind them and let analysts and clients ask natural-language questions about countries and markets, with real-time answers that scale as new data sources are added.
Pain Points
Hours or days per country comparison
Forecasts buried in unstructured reports
Structured data and documents in silos
Manual, subjective sentiment scoring
Only SQL users could query the data
The Solution
How Tatras Built It
Tatras built a hybrid AI pipeline that combines forecasting, document intelligence and text-to-SQL, delivered through a conversational interface on the client's research platform.
Forecasts read and tagged by LLMs
LLM-based parsing reads economic reports, extracts quantitative trends and classifies each forecast as positive, neutral or negative, so every forecast arrives ready for strategic use.
Questions to answers, from data and documents together
A custom LLM-driven text-to-SQL pipeline translates plain-English questions into SQL, so business users can query structured data without writing code. Retrieval-augmented generation then combines the SQL results with context from unstructured reports and research papers, giving one grounded answer to complex questions.
Fast, conversational research
Predictive query prefetching anticipates likely follow-up questions and runs them in advance, reducing latency and keeping conversational context. Analysts, strategists and clients explore trends, compare countries and screen investments in one chatbot, with controlled access, audit logging and query compliance checks.
The result: time to analysis for country-level research cut from hours to minutes, structured data and economic reports answering questions together, sentiment-tagged forecasts, and much faster, better-informed decisions across countries and timeframes.
Results
What Changed
Hours → minutes
Country-level analysis time
One view
Structured data and reports answer together
Sentiment-tagged
Every forecast labelled for strategic use
Faster decisions
Across countries and timeframes
Figures: time-to-analysis cut from hours to minutes, as reported in the Tatras case study record.
Tech Stack
What It Runs On
- Custom LLM-based text-to-SQL pipeline
- NLP sentiment classification
- RAG
- Structured SQL database
- Unstructured document store
- Vector database
- FastAPI
- Predictive query prefetching
- Chatbot UI for forecast data and research papers
- Controlled access to sensitive macroeconomic data
- Audit logging
- Query compliance checks
Tap any layer to see its full stack.
AI and ML
- Custom LLM-based text-to-SQL pipeline
- NLP sentiment classification
- RAG
Data and retrieval
- Structured SQL database
- Unstructured document store
- Vector database
Development
- FastAPI
- Predictive query prefetching
Interface
- Chatbot UI for forecast data and research papers
Security
- Controlled access to sensitive macroeconomic data
- Audit logging
- Query compliance checks
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 →
- 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 →
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.
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
How does AI speed up country-level investment research?
It answers plain-English questions by combining structured economic data with insights from unstructured reports, in minutes rather than hours.
What does text-to-SQL do here?
It turns analysts' questions into SQL queries, so they can use structured data without writing code.
How are forecasts tagged with sentiment?
LLMs parse economic reports and classify each forecast as positive, neutral or negative.
Why combine SQL with RAG?
Figures live in databases and context lives in reports. RAG brings both into one grounded answer.
What is predictive query prefetching?
The system anticipates likely follow-up questions and runs them in advance, so answers come back faster.
Who uses the assistant?
Analysts, strategists and the platform's clients, through a chatbot on the research platform.
How is the data protected?
With controlled access to sensitive data, audit logging and query compliance checks.
What changed for the platform?
Country-level analysis went from hours to minutes, with faster, better-informed decisions.
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