An analyst-led, AI-agent-backed platform that turns a small retailer's messy weekly business data into a human-verified, AI-optimized decision brief — in 1–2 business days.
Brand principle: Human First. AI Next. This is not "paste a spreadsheet into ChatGPT and trust the answer." AI drafts evidence-based claims; a human verifies every claim; the final report is built only from approved claims.
📌 This repository is a public case study. The production codebase is private (it holds client data connections and proprietary logic). This document covers the problem, the product, and the architecture.
Small and midsize retail operators (≈1–100 locations) sit on sales, inventory, promotion, and product data — but rarely have an analytics team to turn it into decisions. The two existing options both fail them:
- Hire an analyst / agency → too expensive and slow for a 3-store operator.
- "Upload a file, let AI decide" → confidently wrong, no accountability, no one will stake a decision on it.
Vizwin is the middle path: an affordable analytics department that pairs AI agents with human review at the start, where quality and trust matter most.
A retailer uploads their weekly files. Behind the scenes:
- Files are parsed and ingested into structured datasets.
- An agentic Analyst Org computes findings with real SQL over that data — it doesn't guess.
- Every finding becomes a claim carrying evidence, source, confidence, and risk.
- A human reviewer approves, edits, or rejects each claim.
- The report is assembled only from approved/edited claims and delivered as a decision brief with tracked action items.
The core insight is an enforced data invariant, not a marketing line:
- AI generates claims first, never the report directly.
- A claim with no evidence is automatically
UNSUPPORTEDand can never enter a report. REJECTEDclaims never enter a report. OnlyAPPROVED/EDITEDclaims do.- The report builder reads claims, not raw files — so every sentence delivered to a client traces back to verified evidence.
This makes the output defensible: an operator can act on it because a human already stood behind every claim.
flowchart TD
A[Retailer uploads weekly files] --> B[Parse + structured ingestion]
B --> C[(Datasets — read-only SQL layer)]
C --> D[Agentic Analyst Org<br/>domain specialists compute findings via SQL]
D --> E[Tiered Claims<br/>evidence · confidence · risk · assumptions]
E --> F{Human review}
F -- approve / edit --> G[Approved claims]
F -- reject --> X[Excluded — never in report]
G --> H[Report builder<br/>approved claims only]
H --> I[Decision brief + tracked action items]
Three surfaces, one workflow: the system proves the full loop from the client (signup, guided intake, multi-file upload), the admin reviewer (claim approve/reject/edit, report send), and report delivery (expandable evidence, report chat grounded only in approved claims, PDF, action tracking).
- Agentic analysis that computes, not hallucinates — specialist agents write read-only SQL over the structured data (model-written SQL is treated as untrusted), self-critique, and emit tiered claims with quantified prescriptions.
- Graceful degradation — with no AI key, the system falls back to a deterministic mock engine so the entire workflow still runs and demos offline.
- Evidence-bound report chat — answers come only from the report + approved claims; if the data isn't there, it says what's missing instead of inventing an answer.
- Security by default — server-only AI calls, signed httpOnly sessions, rate limiting on auth/upload, and a hard rule that no untrusted input reaches the database directly.
Next.js 14 (App Router) · React 18 · TypeScript · Tailwind · Prisma + Postgres (Supabase) · Zod · OpenAI (agentic, server-only) · Vitest
Working prototype with seeded demo data and a live pilot deployment path. The model — AI drafts, humans verify, operators act — is enforced in the data model and covered by tests.
Built by Austin Stevens — Applied AI & Data Analytics, University of Tennessee, Knoxville. Source code private; this is a product/architecture case study.