Case study

Querying a database in natural language.

Clait built a conversational business intelligence platform: staff type a question in plain language, the system turns it into an optimised SQL query and returns an interactive chart, with no SQL knowledge needed.

Published

01

The context

Managing a complex database of courses, participants and performance metrics often takes technical skills and a long wait for every single analysis. The goal: make the data accessible to everyone, in real time.

02

The challenges

  1. Reliance on IT

    Every chart or analysis meant writing an SQL query by hand.

  2. Long turnaround

    Analyses were not instant, which slowed decisions down.

  3. Technical barrier

    Only people who knew SQL could get insights from the data.

  4. Rigidity

    Every new question needed ad hoc development.

  5. Operational scale

    More requests meant more load on IT.

03

The solution

A conversational business intelligence platform that turns the database into an intelligent tool, in four steps.

  1. Plain-language chat

    Staff type their questions in natural language.

  2. Translation into SQL

    The AI engine picks the tables and columns, works out aggregation, filtering and sorting, and generates correct, efficient SQL.

  3. Chart-ready data

    The data is reshaped for visualisation; the chart type, from multi-line to scatter to heatmap, is chosen from the shape of the data and the request, within the interface’s limits.

  4. Interactive charts

    The result is a dynamically generated, interactive chart.

04

Technology

Frontend
Vue.js 3, D3.js, Chart.js, amCharts
Backend
Django, FastAPI
LLM
OpenAI models through Azure AI
Database
PostgreSQL
Infrastructure
Azure VPC
Languages
Python (LLM), TypeScript (frontend)

FAQ

Frequently asked questions.

Do users need to know SQL?

No. The user types the question in plain language; the system generates the SQL query and returns the chart.

How does it choose the chart type?

From the shape of the extracted data and the user’s request, within the interface’s dimensionality limits: multi-line, scatter, heatmap and more.

What infrastructure does it run on?

An Azure VPC, with OpenAI models provided through Azure AI, a Django and FastAPI backend and a PostgreSQL database.

Contact

We find a solution for everyone.
We'll find yours too.

Tell us what you'd like to improve, even if for now it's only an idea. We'll start from there and build the rest together.

Your data will be processed as described in our privacy policy.