Recente Projetcs

AI-Powered Data Assistant for the Central Reporting Data Warehouse

This project involves the development of an intelligent assistant capable of interpreting natural language questions and converting them into valid and optimized SQL Server queries. The goal is to simplify access to business data stored in a centralized reporting Data Warehouse enabling users with no technical background to explore data, extract insights, and support decision-making through a conversational interface.

The assistant also delivers descriptive analyses and performs data interpretation tasks, generating textual summaries and recommendations automatically based on query results.

Architecture and AI Capabilities

The AI assistant was designed to combine natural language processing with real-time data querying and analysis. It supports the following capabilities:

- Natural Language to SQL: Translates user questions into optimized T-SQL 2019+ queries.
- Descriptive Analysis: Provides automated summaries and key insights based on dataset results.
- Vector Search (RAG): Enhances understanding of user intent by retrieving relevant examples using vector similarity via Azure AI Search.

All logic was implemented in a serverless environment using Azure Functions, and the interaction with the OpenAI model is optimized for performance and cost by dynamically choosing between GPT-4.1 GPT-4.1 Mini and GPT-4.1 Nano, depending on the task.

Components and Flow

The assistant follows a multi-stage flow to ensure reliable and context-aware responses:

Step 1 – Session Management and Prompt Engineering
Each user request is tracked with session control to maintain conversational context. Prompts are structured according to task type (query generation, explanation, or analysis) and incorporate schema metadata to guide the LLM.

Step 2 – SQL Query Generation and Execution
When the user asks a question involving data extraction, the assistant generates a SQL query using strict formatting rules aligned with the Data Warehouse schema. The generated query is validated and executed against the SQL Server database, returning the result to the assistant.

Step 3 – Analytical or Descriptive Response
Based on the returned dataset, the assistant determines whether a simple response or a detailed analytical explanation is needed. In the case of larger or grouped datasets, it generates business-oriented summaries with actionable insights.

Step 4 – Result Display and Graph Options
The front-end interface renders the table results, and if the data meets graphable criteria (e.g., categorical vs. numeric values), the assistant suggests graphical visualizations. If analysis is available, a "Show Analysis" button is displayed to reveal insights.

Results

This solution provides a user-friendly way for business teams to explore complex datasets without writing SQL. It reduces the dependency on analysts for routine data requests and shortens the feedback loop for decision-making.

By combining natural language understanding, prompt engineering, and real-time data access, the assistant empowers teams to work more independently and make faster, data-driven decisions.

Stack

  • Azure OpenAI (GPT-4.1 / GPT-4.1 Mini/ GPT-4.1-nano / text-embedding-ada-002)
  • Azure AI Search (Vector Search for RAG)
  • Azure Functions (.NET, C#)
  • SQL Server 2019+
  • HTML/CSS/JS Front-end Interface
  • Azure Blob Storage (for prompt assets and file logs)

© Copyright 2025- All Rights Reserved