Talking to Enterprise Data

Article visual

Imagine it is Monday morning. Your MBR is in 3 hours. You open the dashboard and one key product metric is down 8%. You click every breakdown you can, but it still does not tell you the root cause. You ping BI, but the queue is already full and SLA is 1 to 5 business days. So you start the usual scramble: old SQL files, partial table access, unfamiliar columns, and a spreadsheet of guesses. By the time you have a maybe, meeting time is here. You walk in with a number, not an answer.

That was the exact friction I set out to solve. I led the end-to-end development of a conversational Natural Language (NL) to SQL copilot for recurring diagnostic questions. A user can ask, Why did product X sales dip? The system asks clarifiers like geography and time window, writes inspectable SQL, runs it, returns a table and chart, and suggests the next drilldown across reviews, CSAT, price sensitivity, inventory, or competitor movement. I also owned governance and iteration loops by enforcing permission-aware schema access, SQL transparency, and bi-weekly failure mode reviews, aligned with emerging enterprise guidance on schema grounding and evaluation discipline.

The shift showed up as a clear contrast. Earlier, business owners were scrambling through datasets and ticket queues. Now they could interact with data from their mobile phones while waiting for their coffee and enter meetings with evidence, not assumptions. Within 90 days, activation crossed target levels, time-to-answer shrunk to under 2 minutes, and I unlocked meaningful BI capacity for higher-judgment work. My biggest takeaway is that adoption compounds when one owner drives product experience, governance, and feedback cadence together.

Architecture

Legend

Blue: deterministic components
Green: guardrails and controls
Yellow: probabilistic LLM reasoning
Purple: feedback loop
flowchart LR
    U["User"] --> Q["NL Query"]
    Q --> UI["Chat UI"]
    UI --> O["Orchestration"]
    O --> G["Scope Gate"]
    G -- High risk --> C["Clarify"]
    C --> UI
    G -- Low risk --> P["Query Plan"]
    P --> LLM["LLM"]
    LLM --> S["SQL Draft + Data Visualization"]
    S --> A["User Feedback"]
    A --> L["Learn Loop"]
    L --> O

    class U,Q,UI,S deterministic;
    class O,G,P,C guardrail;
    class LLM probabilistic;
    class A,L feedback;

    classDef deterministic fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#0f172a;
    classDef guardrail fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#0f172a;
    classDef probabilistic fill:#fef9c3,stroke:#ca8a04,stroke-width:1.5px,color:#0f172a;
    classDef feedback fill:#f3e8ff,stroke:#7c3aed,stroke-width:1.5px,color:#0f172a;

    linkStyle 0,1,2,3,4,5,6,7,8 stroke:#334155,stroke-width:2.5px;
    linkStyle 9,10 stroke:#7c3aed,stroke-width:2.5px;

Key Outcomes

  1. Activation Rate: 80%+ in 90 days
  2. Time-to-answer: 1-5 days → <2 minutes
  3. Resources Unlocked: 1.25 FTE