Book a discovery call
Book a discovery call

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

  1. Challenge

    Forecasts were buried in reports and siloed data, so comparing countries took hours or days.

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

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

  1. AI and ML

    • Custom LLM-based text-to-SQL pipeline
    • NLP sentiment classification
    • RAG
  2. Data and retrieval

    • Structured SQL database
    • Unstructured document store
    • Vector database
  3. Development

    • FastAPI
    • Predictive query prefetching
  4. Interface

    • Chatbot UI for forecast data and research papers
  5. Security

    • Controlled access to sensitive macroeconomic data
    • Audit logging
    • Query compliance checks

Proven Results

More Results for Our Clients

See all case studies

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