{ "cells": [ { "cell_type": "markdown", "id": "a3634d16", "metadata": {}, "source": [ "# CX AI Advisory Diagnostic\n", "\n", "The facilitator's cockpit for the CX AI Advisory diagnostic workshop:\n", "capture capability scores across **12 competencies** in four dimensions,\n", "ingest the client's operational baseline, and watch the **value-at-stake\n", "analysis** โ bounded by the capability gaps โ recompute live in the room.\n", "\n", "**This notebook is the deliverable.** Serve it with\n", "`mercury --working-dir .` from the study root and share the screen. Work\n", "the sidebar top-to-bottom: engagement, baseline, then one competency at a\n", "time. The stage shows the current competency's card, the heatmap, the\n", "value analysis, and the unlock sequence. Click **Export JSON + CSV** at\n", "the bottom to write the structured engagement record to `exports/`.\n", "\n", "All content and math live in `diaglib/` and `configs/*.yaml` โ the\n", "notebook only arranges and renders them. Outputs are **ranges, never\n", "point estimates**, and money displays at two significant figures.\n", "\n", "Confidence legend: ๐ข known ยท ๐ก estimated ยท ๐ด unknown โ flag each\n", "baseline input; unknowns surface as explicit warnings in the analysis." ] }, { "cell_type": "code", "execution_count": 1, "id": "8196c6ba", "metadata": { "execution": { "iopub.execute_input": "2026-07-19T23:45:37.330585Z", "iopub.status.busy": "2026-07-19T23:45:37.330333Z", "iopub.status.idle": "2026-07-19T23:45:37.878564Z", "shell.execute_reply": "2026-07-19T23:45:37.877675Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "diaglib loaded โ 12 competencies ยท industries: contact_center, financial_services\n" ] } ], "source": [ "# โโ Setup โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ\n", "import sys, pathlib\n", "_ROOT = pathlib.Path.cwd()\n", "if not (_ROOT / \"diaglib\").exists(): # notebook lives in notebooks/\n", " _ROOT = _ROOT.parent\n", "sys.path.insert(0, str(_ROOT))\n", "\n", "import datetime as dt\n", "import html as _html\n", "\n", "import mercury as mr\n", "import pandas as pd\n", "from IPython.display import display\n", "\n", "# Single source of truth โ all math and content live in the library;\n", "# only presentation (and Mercury widgets) lives here.\n", "from diaglib import (\n", " BASELINE_FIELDS, CONFIDENCE_ICON, CSV_COLUMNS,\n", " OperationalBaseline, backstage, build_engagement, build_scores,\n", " configs_dir, dimension_rollup, engagement_json, evidence_coverage,\n", " heatmap_fig, heatmap_grid, list_industries, load_config, money,\n", " parse_participants, scores_dataframe, split_fig, unlock_fig,\n", " value_at_stake, value_bands_fig, write_exports,\n", ")\n", "\n", "pd.options.display.float_format = \"{:,.0f}\".format\n", "\n", "CONFIGS_DIR = configs_dir(_ROOT)\n", "EXPORTS_DIR = _ROOT / \"exports\"\n", "INDUSTRIES = list_industries(CONFIGS_DIR)\n", "# The competency model is industry-independent (overlays may not redefine\n", "# it โ the loader enforces that), so widgets can build from any config.\n", "_BASE = load_config(\"contact_center\", CONFIGS_DIR)\n", "COMPETENCIES = _BASE.competencies\n", "DIMENSION_NAME = {d.id: d.name for d in _BASE.dimensions}\n", "\n", "# โโ Brand palette (docs/brand.md, light theme) โโโโโโโโโโโโโโโโโโโโโ\n", "NAVY, INK, MUTED = \"#151d2c\", \"#2e404d\", \"#586671\"\n", "BLUE, GREEN, LINE = \"#0072bc\", \"#00a34c\", \"#e2e6e9\"\n", "CARD_BG, HAIRLINE, HILITE = \"#f8f8f8\", \"#d5d9db\", \"#dcecfa\"\n", "FONT = \"Georgia, 'Times New Roman', serif\"\n", "BODY_FONT = \"Arial, 'Helvetica Neue', Helvetica, sans-serif\"\n", "\n", "\n", "def esc(s):\n", " return _html.escape(str(s))\n", "\n", "\n", "# โโ Workshop seeds โ the gate's mock scenario; overwrite live โโโโโโ\n", "# Headless nbconvert renders every widget at its seed, so the seeds form\n", "# a coherent, gate-passing scenario (Pattern ยง3).\n", "SEED_CLIENT = \"Acme Demo Co\"\n", "SEED_DATE = \"2026-07-19\"\n", "SEED_FACILITATOR = \"Robert Helewka\"\n", "SEED_PARTICIPANTS = (\"Jane Example | VP Customer Experience | cx; \"\n", " \"Sam Sample | Contact Center Ops Director | ops\")\n", "SEED_BASELINE = {\n", " \"annual_contact_volume\": 1_200_000,\n", " \"blended_cost_per_contact\": 6.50,\n", " \"agent_headcount\": 450,\n", " \"annual_attrition_rate\": 0.30,\n", " \"current_containment_rate\": 0.20,\n", " \"average_handle_time_seconds\": 420,\n", "}\n", "CONFIDENCE_CHOICES = [\"๐ข known\", \"๐ก estimated\", \"๐ด unknown\"]\n", "SEED_CONFIDENCE = {\n", " \"annual_contact_volume\": \"๐ข known\",\n", " \"blended_cost_per_contact\": \"๐ก estimated\",\n", " \"agent_headcount\": \"๐ข known\",\n", " \"annual_attrition_rate\": \"๐ก estimated\",\n", " \"current_containment_rate\": \"๐ก estimated\",\n", " \"average_handle_time_seconds\": \"๐ข known\",\n", "}\n", "# Seed capability profile: data_readiness is the unique weakest\n", "# foundation, so the demo shows a single binding constraint.\n", "SEED_SCORES = {\n", " \"automation_ai_strategy\": (2, \"AI driven by board pressure; no written thesis\"),\n", " \"value_realization\": (2, \"Business cases pre-investment only\"),\n", " \"executive_alignment\": (3, \"COO owns CX AI; steering meets quarterly\"),\n", " \"process_discovery\": (3, \"Top 10 call reasons mapped with volumes\"),\n", " \"data_readiness\": (2, \"KB stale; interaction data siloed in recordings\"),\n", " \"technical_architecture\": (3, \"CCaaS APIs available; shared integration layer WIP\"),\n", " \"use_case_prioritization\": (3, \"Scored backlog reviewed monthly\"),\n", " \"delivery_capability\": (3, \"Two bots in production via SI partner\"),\n", " \"talent_and_skills\": (2, \"One conversation designer, contractor\"),\n", " \"ai_operations\": (2, \"Containment eyeballed weekly, no drift alerts\"),\n", " \"change_adoption\": (3, \"Agent champions for copilot rollout\"),\n", " \"governance_and_risk\": (3, \"AI policy signed; review board for voice bots\"),\n", "}\n", "# label, min, max, step per baseline field (explicit min/max โ Pattern ยง3).\n", "BASELINE_META = {\n", " \"annual_contact_volume\": (\"Annual contact volume\", 0, 100_000_000, 10_000),\n", " \"blended_cost_per_contact\": (\"Blended cost per contact ($)\", 0, 100, 0.25),\n", " \"agent_headcount\": (\"Agent headcount\", 0, 100_000, 10),\n", " \"annual_attrition_rate\": (\"Annual attrition rate (0-1)\", 0, 1, 0.01),\n", " \"current_containment_rate\": (\"Current containment rate (0-1)\", 0, 1, 0.01),\n", " \"average_handle_time_seconds\": (\"Average handle time (seconds)\", 0, 3600, 10),\n", "}\n", "\n", "backstage(f\"diaglib loaded โ {len(COMPETENCIES)} competencies ยท \"\n", " f\"industries: {', '.join(INDUSTRIES)}\")" ] }, { "cell_type": "markdown", "id": "bbfd8baf", "metadata": {}, "source": [ "## How to run this session\n", "\n", "- **Sidebar ยง1 โ Engagement.** Client, industry config, date, participants\n", " (`Name | Role | Function` separated by `;` โ functions: cx, it, ops,\n", " finance, other), and a running notes box.\n", "- **Sidebar ยง2 โ Operational baseline.** Six numbers. If unknown, best\n", " estimate is fine โ set the confidence flag and the analysis will carry\n", " the uncertainty explicitly.\n", "- **Sidebar ยง3 โ Capability scoring.** Pick **Now scoring**, read the\n", " competency card on stage with the room, set the 1โ5 slider, capture one\n", " line of evidence, move to the next. The heatmap and value analysis\n", " update live as you go.\n", "- **Export.** The button at the bottom of the page writes\n", " `exports/{engagement_id}.json` (source of truth) and `.csv` (flat\n", " scores) โ a deliberate snapshot at click time.\n", "- **Backstage** (JupyterLab / nbconvert) โ the verification gate and the\n", " machine-readable appendix; neither shows on the Mercury stage." ] }, { "cell_type": "code", "execution_count": 2, "id": "6393a965", "metadata": { "execution": { "iopub.execute_input": "2026-07-19T23:45:37.880508Z", "iopub.status.busy": "2026-07-19T23:45:37.880214Z", "iopub.status.idle": "2026-07-19T23:45:37.904951Z", "shell.execute_reply": "2026-07-19T23:45:37.904267Z" } }, "outputs": [ { "data": { "application/mercury+json": { "model_id": "5feaf4858ee043a8b09f3507ce84f49c", "position": "sidebar", "widget": "MarkdownWidget" }, "application/vnd.jupyter.widget-view+json": { "model_id": "5feaf4858ee043a8b09f3507ce84f49c", "version_major": 2, "version_minor": 0 }, "text/plain": [ "MarkdownWidget(value='
| Move | \n", "Competencies | \n", "Lift | \n", "Est. cost | \n", "Weeks | \n", "Annual value unlocked | \n", "Note | \n", "
|---|---|---|---|---|---|---|
| 1 | \n", "Data Readiness | \n", "2 โ 3 | \n", "$300K โ $600K | \n", "12 | \n", "$640K โ $1.3M | \n", "\n", " |
| 2 | \n", "Process Discovery + Data Readiness + Technical Architecture | \n", "3 โ 4 | \n", "$800K โ $1.6M | \n", "16 | \n", "$380K โ $1.0M | \n", "joint lift โ the tied competencies must move together to shift the cap | \n", "
| 3 | \n", "Process Discovery + Data Readiness + Technical Architecture | \n", "4 โ 5 | \n", "$1.0M โ $2.1M | \n", "20 | \n", "$380K โ $760K | \n", "joint lift โ the tied competencies must move together to shift the cap | \n", "
configs/{esc(INDUSTRY)}.yaml.Foundations
Sustain
Strategy & Value
| 1 | No thesis. AI driven by executive impulse or vendor pitch. |
| 2 | Aspirational vision, no operating model implications defined. |
| 3 | Documented strategy, partial linkage to operating model. |
| 4 | Strategy drives portfolio decisions and operating model changes. |
| 5 | Strategy is reviewed quarterly; operating model evolves with capability. |
Delivery
| Annual contact volume | 1,200,000 | ๐ข |
| Blended cost per contact ($) | 6.50 | ๐ก |
| Agent headcount | 450 | ๐ข |
| Annual attrition rate (0-1) | 0.30 | ๐ก |
| Current containment rate (0-1) | 0.20 | ๐ก |
| Average handle time (seconds) | 420 | ๐ข |