Skip to content

Data Story AI: From Static Reports to Dynamic Conversations

I built Data Story AI as a personal project to bridge the gap between data and decisions - a challenge I’ve seen repeatedly in organizations. As someone who’s worked closely with both data and business teams, I wanted a tool that automates the journey from business question to actionable insight. Data Story AI is my answer: a showcase of product thinking, system design, and hands-on coding, built to turn raw data into real decisions - instantly.

The Problem: Data Without Context

Business intelligence often stops at charts and tables. But what do those numbers mean? Why did revenue drop? What should you do about churn? The gap between data and action is real.

graph LR
    A[Raw Data] --> B[Charts & Tables]
    B --> C[❓ So What?]
    C --> D[Manual Analysis]
    D --> E[Delayed Decisions]

The Solution: Automated Data Stories

A data story isn’t just a collection of charts. It’s a bridge between information and action - combining facts, narrative, and visuals for powerful insights.

graph TD
    A[Data Story] --> B[📊 Data<br/>The Facts]
    A --> C[📖 Narrative<br/>The Context]
    A --> D[📈 Visuals<br/>The Clarity]
    B --> E[Revenue = $2M]
    C --> E[40% growth from mobile]
    D --> E[Trend charts & breakdown]
    E --> F[💡 Actionable Insight:<br/>Prioritize mobile experience]

Traditionally, creating these stories required skilled analysts and lots of manual work. Data Story AI automates the process - just ask your question in plain English.


How Data Story AI Works

Just type your business question. Data Story AI does the rest: understands your intent, generates SQL, analyzes results, and crafts a narrative with interactive charts.

graph TD
    subgraph "✅ Data Story AI Process"
        A2[Business Question] --> B2[AI Agent]
        B2 --> C2[Instant SQL Generation]
        C2 --> D2[Real-time Analysis]
        D2 --> E2[Data Story Driven Insights]
        style A2 fill:#e8f5e8
    end
    subgraph "❌ Traditional BI Process"
        A1[Business Question] --> B1[Wait for Analyst]
        B1 --> C1[Manual SQL Queries]
        C1 --> D1[Static Analysis]
        D1 --> E1[Poor Insights]
        style A1 fill:#ffebee
    end

The transformation: From weeks to seconds, from static reports to dynamic conversations, from technical barriers to plain English.


Try Data Story AI Yourself

Web App: Try the live demo - no setup required.

Sample questions:

  • "What are our top-selling product categories?"
  • "Show me monthly sales trends for 2023"
  • "Which states generate the most revenue?"

Under the Hood: Modern AI Stack

Technical Architecture

I architected Data Story AI to be modular and extensible, so adding new data sources or visualization types is straightforward. For example, integrating LangChain required custom prompt engineering and error handling, which I implemented to ensure reliable query generation. The system combines multiple AI and analytics components to turn questions into insights:

graph TB
    A[User Question] --> B[Streamlit Frontend]
    B --> C[LangChain SQL Agent]
    C --> D[Large Language Model]
    D --> E[SQL Query Generation]
    E --> F[DuckDB Execution]
    F --> G[Raw Results]
    G --> H[Story Generator]
    H --> I[LLM Analysis]
    I --> J[Executive Summary]
    G --> K[Plotly Auto-Chart Generator]
    K --> L[Interactive Charts]
    J --> M[Complete Data Story]
    L --> M
    M --> N[Streamlit Display]

Core Technology

  • Streamlit for the web interface
  • LangChain for natural language to SQL (with custom prompt engineering and validation)
  • DuckDB for fast analytics
  • Plotly for interactive charts
  • Large Language Models for narrative generation

Privacy-First by Design

  • Local Processing: All analysis happens in your session.
  • No Data Sharing: Your data stays private.
  • No SQL Required: Just ask questions in plain English.
sequenceDiagram
    participant U as User
    participant S as Streamlit Frontend
    participant L as LangChain Agent
    participant M as LLM Provider
    participant D as DuckDB
    participant G as Story Generator
    participant V as Chart Generator

    U->>S: Ask business question
    S->>L: Process natural language
    L->>M: Generate SQL query
    M-->>L: Return optimized SQL
    L->>D: Execute query
    D-->>L: Return data results
    L->>G: Send results for analysis
    G->>M: Generate business story
    M-->>G: Return insights + narrative
    L->>V: Create visualizations
    V-->>S: Interactive charts
    G-->>S: Complete data story
    S-->>U: Multi-modal response

What Makes Data Story AI Different?

  • 🗣️ Natural Language: No SQL, no jargon - just ask.
  • 📊 Complete Data Stories: Not just charts, but executive summaries and recommendations.
  • ⚡ Instant Analytics: Answers in seconds, not days.
  • 🔄 Conversational: Build on previous questions, explore deeper insights.

Open Source & Extensible

Curious how it works? The project is open source (MIT) and available on GitHub: kanad13/Data-Story-AI, where I actively maintain and develop new features.

  • Modular architecture: Easily add new data sources, visualizations, or AI models.
  • Enterprise ready: Secure, configurable, and scalable.