BGS|Raw Data to Reliable Systems
Back to Selected Work

Detailed project walkthrough

BI Agent

Analytics, forecasting & AI assistant that combines data validation, KPI analysis, machine-learning forecasts, cloud-stored files & model artifacts, LLM-assisted queries, and interaction monitoring (observability).

Deployed aplication prototypeRetail analytics and forecastingBuilt with demonstration data

The problem

Businesses need to analyse sales, track KPIs, and prepare forecasts, but this often requires several separate tools and may involve sending business data to external services.

What the application does

BI Agent combines retail analysis, charts, KPI forecasts, and natural-language questions in one application. Machine-learning models generate the forecasts, while the AI assistant helps users ask questions about the data.

Why it may be useful

It makes sales results and forecasts easier to explore and keeps the data process, model files, and AI-assisted interactions more organised and easier to review.

System design

Analytics, forecasting, and AI in one workflow

The project connects data preparation, forecasting models, cloud files, an application interface, and AI-assisted questions while keeping the main parts separated and reviewable.

System thinking

  • Raw data is validated before it is used for analysis or forecasting.
  • Data preparation, model training, saved model files, and application serving are handled as separate stages.
  • Business users can explore results manually or ask questions using everyday language.
  • AI-assisted questions are traced so the application behaviour can be reviewed during development.

Architecture

Cloud dataSchema validationData preparationFeature engineeringForecasting modelsModel filesStreamlit applicationAI assistantLangfuse tracing

Application walkthrough

Three ways to explore the retail data

The application combines AI-assisted questions, controlled forecasting, and technical model information in one interface.

01

Ask questions about sales and KPIs

The AI Assistant tab lets the user ask questions in everyday language about recent sales, products, countries, rankings, forecasts, and model capabilities.

BI Agent AI Assistant tab showing a natural-language sales question and the returned KPI summary
02

Create a controlled forecast

The Manual Forecast tab lets the user select a country and KPI, compare the latest observed value with the next-week prediction, and review the recent trend.

BI Agent Manual Forecast tab showing forecast controls, predicted revenue, recent values, and a trend chart
03

Review the model and data setup

The Model & Data Details tab explains how the application loads data, validates it, creates features, stores model files, and serves forecasts.

BI Agent Model and Data Details tab showing the application data and forecasting architecture

Analytics workflow

How the application works

The workflow moves from stored retail data to validated analysis, forecasts, and AI-assisted questions.

  1. 01

    Load business data

    Retail transaction data is loaded from cloud storage to Streamlit app. Keeping the data outside the application code makes the project easier to organise and update.

  2. 02

    Check the data structure

    The validation stage checks that the expected columns and data types are present before the analysis and forecasting process continues.

  3. 03

    Prepare the data

    The application cleans and restructures the transaction data, then creates the weekly measures and features needed for reporting and forecasting.

  4. 04

    Generate KPI forecasts

    Machine-learning models create forecasts for selected business measures. The trained models are stored as separate files and loaded by the application.

  5. 05

    Explore results in the application

    The Streamlit interface presents sales analysis, charts, KPI results, and forecasts in one place.

  6. 06

    Ask questions in everyday language

    The AI assistant helps users ask questions about the available business data without needing to write code or database queries.

  7. 07

    Review AI interactions

    Langfuse records AI-assisted interactions so prompts, responses, and application behaviour can be reviewed during development.

Application outputs

Different ways to explore business results

The application supports both standard analytics views and AI-assisted interaction.

Descriptive analytics

Users can review sales performance, KPIs, charts, and changes over time.

Forecasting

Saved machine-learning models generate forecasts for selected business measures.

AI-assisted questions

Users can ask questions in natural language, while interactions are recorded for review during development.

My contribution

What I worked on

  • Designed the data, forecasting, and application workflow
  • Created the data-validation stage
  • Prepared transaction data and weekly business features
  • Built and tested KPI forecasting models
  • Separated source code, data, models, and secrets
  • Configured cloud storage for data and model files
  • Built the Streamlit analytics application
  • Added natural-language question handling
  • Added Langfuse tracing for AI-assisted interactions
  • Prepared automated tests and deployment configuration

Technology used

Main tools

  • Python
  • Streamlit
  • Pandas
  • Scikit-learn
  • Machine learning
  • DigitalOcean Spaces
  • OpenAI API
  • Langfuse
  • Automated tests
  • Git and GitHub

Current limitation

BI Agent is a portfolio prototype built with demonstration retail data. Its forecasts and AI-assisted answers have not been tested as part of a real company’s reporting or decision-making process.

* Free hosted demo — it may take a moment to wake if inactive.