AI Assistant for Report Generation & Visualization
AI Development •ChatGPT •Generative AI •Telecommunication

AI Assistant for Report Generation & Visualization

Our client is a telecom company in the US. We built an AI data and reporting assistant that helps its business analysts answer ad-hoc requests: it turns a plain-language question into a database query and the result into a chart.

Facing a similar challenge? Tell us about the task, and we will show how we would build it for your business.

Build Something Like This for Me

Free 30-min call · One-page solution outline within three business days · No commitment

Business Problem

The client's business analysts depended on the IT department for ad-hoc data requests: someone had to write the query, pull the data and build the chart. The client asked us for a tool that lets analysts ask questions of the company's databases in plain language, get the data and turn it into charts themselves, with database information kept up to date.

Solution

We built a data and reporting assistant for business analysts. An analyst asks a question in plain language, the assistant writes and runs the query against the right database, and then generates the code for a chart or dashboard from the result. Analysts can answer more of their own questions, and IT spends less time on routine data pulls.

Features

  • On-the-fly translation of plain-language questions into database queries (SQL for MS SQL, PostgreSQL and AWS Redshift, and MongoDB queries)
  • Query execution on a selected schema
  • A Python code generator that turns the final data set into a web dashboard or chart
  • Slack integration, with deployment to AWS or Azure
fw-image

How It Works

The assistant is available as a chatbot in Slack and as a web application. Analysts ask questions in plain language and run queries against different databases from whichever of the two they prefer.

Once the data set is ready, the application generates Python code with standard charting libraries. The code builds a web dashboard with charts, time series plots and graphs.

Large language models, OpenAI GPT models and open-source models, also check the generated Python code. When the code fails, the error goes back to the model for a fix before the analyst sees the result.

To build a query, the application finds the relevant database schema for the question using table definitions (DDL) stored in a vector database. A Python pipeline refreshes the schema and table definitions on a schedule, so the assistant works from the current structure of each database.

Business Value

Analysts get answers to ad-hoc questions without waiting in the IT queue, and they can look at the query behind a chart to check where the numbers come from. We ran the project end to end, from discovery and a proof of concept (POC) to the final product.

How We Build Text-to-SQL Assistants

An analyst's question in plain language has to become a correct query against a real schema, then a correct chart. Each of those steps can fail quietly, so we build the assistant as a chain of small, checked steps:

  1. Schema knowledge. Table definitions, column descriptions, sample values and approved example queries are indexed and kept in sync with the databases. Business terms, such as how a metric is defined, are stored next to the tables they refer to.
  2. Schema selection. For each question, retrieval over PostgreSQL with pgvector or a vector database picks the few tables that matter, so the model is not given the whole warehouse.
  3. Query generation. The model writes SQL for the specific dialect. The query is parsed, checked against the schema and run read-only with row and time limits.
  4. Repair. Errors and empty results go back to the model with the failing query. After a fixed number of attempts the assistant asks the user to clarify.
  5. Visualization. Chart code is generated from the result set and run in a sandbox. The SQL is always shown next to the chart.

Today we build this as a LangGraph workflow with LangSmith tracing and evaluation, and give the model database access through MCP tools with read-only permissions. The web client is a TypeScript application with Next.js and Node.js.

Why Text-to-SQL Is Harder Than Benchmarks Suggest

A query that runs is not the same as a query that is right. The most dangerous result is a valid query with the wrong join or the wrong date filter, which returns a plausible number. Real warehouses make this likely: hundreds of tables, similar column names, and metrics whose definition lives in someone's head.

Benchmarks show the gap between clean and real schemas. In Spider 2.0, a benchmark built on enterprise text-to-SQL workflows, an agent based on a strong reasoning model solved only 21.3% of tasks, compared with 91.2% on the earlier Spider 1.0 and 73.0% on BIRD.

We handle this with evaluation on the client's own data. A test set of real questions with verified answers runs on every change to prompts, schema metadata or model. Results are compared by value, not by SQL text. Ambiguous questions get a clarifying question instead of a guess, and every answer shows the SQL so an analyst can check it. More on our approach: AI agent development and natural language processing services.

4

database engines supported: MS SQL, PostgreSQL, AWS Redshift, MongoDB

7 months

project timeline

7

specialists on the team

Other cases

AI Agent Platform With Governed Model Access: Many Agents, One Runtime

AI Agent Platform With Governed Model Access: Many Agents, One Runtime

Read more ›
AI Candidate Screening That Checks CV Claims Against Public Evidence

AI Candidate Screening That Checks CV Claims Against Public Evidence

Read more ›
ChatGPT-Powered Content Generation Platform

ChatGPT-Powered Content Generation Platform

Read more ›
AI Data Analyst in Microsoft Teams: Answers From Live Operational Data

AI Data Analyst in Microsoft Teams: Answers From Live Operational Data

Read more ›
AI Data Verification Layer for Property Data: Rules First, a Person on Borderline Cases

AI Data Verification Layer for Property Data: Rules First, a Person on Borderline Cases

Read more ›
AI Delegation Agent for Executive Teams: Assignments, Statuses and Scores in One Loop

AI Delegation Agent for Executive Teams: Assignments, Statuses and Scores in One Loop

Read more ›
AI Image Annotation Solution for Medical Assessment

AI Image Annotation Solution for Medical Assessment

Read more ›
ML/Computer Vision + Data Annotation for ADAS

ML/Computer Vision + Data Annotation for ADAS

Read more ›
AI/ML-Driven Telecom Network Optimization

AI/ML-Driven Telecom Network Optimization

Read more ›
Custom GenAI Medical Drug Search Accelerator

Custom GenAI Medical Drug Search Accelerator

Read more ›
ML/Computer Vision-Powered Data Annotation for Sports

ML/Computer Vision-Powered Data Annotation for Sports

Read more ›
OCR Retail Receipt Data Extraction Tool

OCR Retail Receipt Data Extraction Tool

Read more ›
Computer Vision + Image Annotation for Insurance

Computer Vision + Image Annotation for Insurance

Read more ›
AI Presale Assistant for a Marketing Agency: From Meeting Transcript to Sourced Draft

AI Presale Assistant for a Marketing Agency: From Meeting Transcript to Sourced Draft

Read more ›
AI Pricing Engine for an Equipment Distributor: The Model Proposes, a Person Approves

AI Pricing Engine for an Equipment Distributor: The Model Proposes, a Person Approves

Read more ›
AI Trade Contractor Sourcing: Verified Profiles and Pre-Screening for a Home Builder

AI Trade Contractor Sourcing: Verified Profiles and Pre-Screening for a Home Builder

Read more ›
Cinema Scheduling and Pricing Optimization: A Week of Showtimes, Computed

Cinema Scheduling and Pricing Optimization: A Week of Showtimes, Computed

Read more ›
Computer Vision + ChatGPT-Powered Recommendations

Computer Vision + ChatGPT-Powered Recommendations

Read more ›
Data Annotation for AI-Driven Sports Analytics

Data Annotation for AI-Driven Sports Analytics

Read more ›
Generative AI Bot for Customer Service

Generative AI Bot for Customer Service

Read more ›
Generative AI Solution for Code Compliance

Generative AI Solution for Code Compliance

Read more ›
SaaS Marketing Content Generation Platform for Healthcare

SaaS Marketing Content Generation Platform for Healthcare

Read more ›
Interactive Chatbot with an Animated Avatar

Interactive Chatbot with an Animated Avatar

Read more ›
Managed Video Annotation Pipeline for a Client's Own Human-Motion Footage

Managed Video Annotation Pipeline for a Client's Own Human-Motion Footage

Read more ›
ML/AI Technical Due Diligence for Startup Acquisition

ML/AI Technical Due Diligence for Startup Acquisition

Read more ›
OCR Solution for Invoice Processing

OCR Solution for Invoice Processing

Read more ›
Property Management Platform With an AI Voice Assistant for Multiple HOAs

Property Management Platform With an AI Voice Assistant for Multiple HOAs

Read more ›
AI-Powered Platform for Real Estate

AI-Powered Platform for Real Estate

Read more ›
Sitecore Migration

Sitecore Migration

Read more ›
ML/AI Technical Due Diligence for SporTech

ML/AI Technical Due Diligence for SporTech

Read more ›
Voice Interview to Social Posts: AI Content in the Professional's Own Voice

Voice Interview to Social Posts: AI Content in the Professional's Own Voice

Read more ›

Let's talk about your project

We'll help you harness AI and ML technologies to create innovative software solutions

File requirements: pdf, doc, docx, rtf, ppt, pptx — max 15 MB

No file selected