Smart Woffie

AI Strategic Insights Agent — Walmart Customer Engagement Services (CES)

v4.0 Data-Native Database-First Architecture BigQuery-Backed Self-Contributing

Owner: Victor Chowdhury  |  Published to an internal AI agent marketplace  |  Knowledge base: a dedicated BigQuery dataset

47
Knowledge Domains
236
Validated KB Entries
3
Core Unified Tables
8
Core CES Metrics Mapped
4B+
Total Rows Covered

Purpose — What Is Smart Woffie?

Smart Woffie is an AI analytics agent built for Walmart's CES organization. It analyzes BigQuery data, builds HTML executive reports, discovers insights, and maintains a centralized knowledge base that grows with every analysis session. Unlike a typical AI assistant whose "knowledge" lives in a single chat or a static prompt, Woffie's knowledge is persistent, machine-independent, validated, and queryable — stored in BigQuery, not on any one laptop.

The Problem It Solves

  • CES metric knowledge (formulas, caveats, data quirks) lived in people's heads or scattered decks
  • Every new analyst/agent re-derived the same formulas, re-discovered the same data quality traps
  • AI assistants risk hallucinating numbers, formulas, or benchmarks with total confidence
  • Knowledge was machine/session-bound — didn't survive a laptop swap or a new teammate

Key Capabilities

  • Writes optimized SQL against CES BigQuery tables to discover and quantify patterns
  • Builds branded, executive-ready HTML reports with charts, takeaways, action items
  • Self-loads its entire "brain" from BigQuery at session start — works on any machine
  • Self-contributes new findings back to the KB (drafts → human validates → permanent)
  • Built-in anti-hallucination framework: only asserts validated facts with cited evidence

Architecture — Database-First, Not Prompt-First

Woffie's knowledge lives in a dedicated BigQuery dataset, not hard-coded in a system prompt. This makes it machine-independent and team-scalable — any user, on any machine with GCP access, loads the identical brain.

Knowledge Base Tables

TableRowsRole
Knowledge index34Master index — domain, category, maturity level
Knowledge entries171Every fact, formula, benchmark, finding (9 context types)
Workflow benchmarks10Quick-access top L1 workflow hold metrics
Tenure benchmarks4Quick-access tenure-band performance metrics

Unified Data Layer (v4.0)

Default routing — 3 canonical tables now power all 8 core CES metrics, no legacy table juggling:

  • Weekly metrics summary — pre-aggregated weekly summary, fast exec trend queries
  • Contact segments — ~2B rows, segment grain (AHT, transfers, SLA)
  • Care interactions — ~2B rows, incident grain (CPO, RCR, CSAT, NPS, appeasements)

Session Lifecycle

  1. 1. LOAD — Self-load query reads all validated/active entries from BigQuery at session start
  2. 2. ANALYZE — Writes SQL, queries CES tables, discovers patterns, builds HTML reports
  3. 3. CONTRIBUTE — Drafts new findings into the knowledge entries with validated=FALSE
  4. 4. VALIDATE — Human reviews & flips to validated=TRUE → now permanent/trusted
  5. 5. NEXT SESSION — Any user, any machine, loads the same growing brain ↻

RBAC / Access Model

  • Woffie (Agent): read all + INSERT drafts (unvalidated)
  • Analyst: above + validate/deactivate entries, add domains
  • Admin: schema changes, dataset permissions
  • Viewer: read-only query access

AI Evals & Anti-Hallucination Framework

Evaluation here isn't a one-off benchmark run — it's a structural, always-on guardrail baked into the schema itself, plus a behavioral framework in the system prompt. Dual-layer: database enforces it, prompt reinforces it.

6 Schema-Level Safeguards

Validated FlagOnly validated=TRUE entries are used for assertions; drafts stay quarantined until human review
Confidencehigh / medium / low gates how definitively Woffie speaks
Source EvidenceEvery benchmark cites source_table + source_evidence
Numerator/DenomRaw calc inputs stored so any value is independently verifiable
Maturity GatingL1–L5 scale controls confidence per domain (below)
Version ControlOld entries deactivated + superseded_by, never deleted — full audit trail

Maturity-Gated Response Examples

L5 (Hands-On): "Hold time accounts for 12.7% of total AHT (528K of 4.18M hrs). Source: hold-time table, 28.4M calls." — full confidence, cited.
L3 (Definition-Ready): "I know the CSAT formula but haven't analyzed the data yet — I need the customer survey table." — caveated.
L1 (Awareness): "I know AG escalations are tracked, but I lack definitions, formulas, or data for this metric." — explicit uncertainty.

Data Quality Rules (Always Applied — Eval-Adjacent Guardrails)

  • Hold-count outlier cap: LEAST(COALESCE(val,0),50) — uncapped, hold ratio inflates ~1,983x (true value: 0.53)
  • Active talk-time NULL handling: compute dead air only where non-null (20.7% of rows are NULL) — mishandled, dead air falsely inflates to 59s avg vs true 0.18s

Maturity Scorecard

How confidently Woffie can speak, by category (1=Awareness → 5=Hands-On)

Knowledge Base Content Mix

236 entries across 9 context types (definitions, formulas, benchmarks, findings, rules...)

Sample Findings & Strategic Impact

From Hold Time Analysis v4 (~26M calls, Feb 2025–Jan 2026) — 12 validated findings, 6 strategic action items generated and persisted to the KB.

Note: figures in this section altered for presentation.

  • 29.4% of calls involve hold — structural, not exceptional (median hold = 165s)
  • Hold = 14.8% of all handle time; without it, blended AHT drops 503s → 412s (−18.1%)
  • 20–50% hold zone = 20.6% of calls but 52.3% of hold hours — best intervention target
  • Walmart+ Cancel Membership: 69.8% hold, +581s AHT delta — most broken workflow in CES
  • Tenure dividend: AHT penalty improves 24.3% from new hires to 12+ month agents
PriorityActionImpact
CriticalRedesign Walmart+ Cancel workflow~11.2K hold hrs saved
CriticalTarget 20–50% hold-of-AHT zoneUp to 87K hold hrs reduced
High0–90 day agent enablement61s AHT reduction potential
HighAutomate WISMO hold drivers~24K hold hrs saved

Design & Development Evolution

Every layer of the stack — storage, loading, hallucination control, versioning — matured across 3 shipped releases to an internal AI agent marketplace.

v1.0 — Feb 27, 2026 SUPERSEDED
  • Knowledge hard-coded in system prompt (~3K chars)
  • File-dependent context loading (local .txt file)
  • 7 fragmented prototype BigQuery tables
  • No self-contributing, no anti-hallucination framework
v2.0 — Mar 7, 2026 SUPERSEDED
  • Database-first: knowledge moves to BigQuery (2 normalized tables)
  • Self-loading via one SQL query — machine-independent
  • Self-contributing drafts + human validation loop introduced
  • 6 schema-level anti-hallucination safeguards added
  • Consolidated 7 tables → 4 clean normalized tables
v3.0 — Mar 10, 2026 CURRENT
  • Dynamic agent ID — no hardcoded IDs, prevents spoofing
  • Full KB awareness — verifies tables exist before querying
  • 6-rule behavioral anti-hallucination layer (prompt) + schema layer = dual protection
  • Explicit brand color-contrast accessibility rules for generated reports
  • System prompt: 132 → 215 lines (+63% richer guardrails)

Since v4.0: Unified Data Layer consolidates routing to 3 canonical tables (weekly metrics summary, contact segments, care interactions) covering 8 core metrics end-to-end, 4B+ rows — reducing legacy table sprawl further.