{
  "date": "2026-06-14",
  "timezone": "Asia/Shanghai",
  "window_start": "2026-06-14T00:00:00+08:00",
  "window_end": "2026-06-15T00:00:00+08:00",
  "granularity": "daily",
  "data_status": "complete",
  "source": {
    "kind": "grafana_prometheus_and_prod_sqlite",
    "grafana_datasource": "DevOps-prometheus",
    "grafana_datasource_id": 80,
    "prometheus_labels": {
      "cluster": "prod-devops",
      "namespace": "investibook",
      "job": "backend",
      "prometheus": "monitoring/o11y-vmagent"
    },
    "prod_backend_sqlite": "/data/db/investibook.db",
    "notes": [
      "Cost comes from prod SQLite interaction_token_usage with runtime-aware accounting: OpenCode ses_* rows use cumulative session deltas; PI UUID and image-parse rows use per-row increments.",
      "workspace_count in summary is cost-derived distinct positive-cost workspaces.",
      "Prometheus is used for ACP interaction counts only; investigatory PI sessions made investibook_acp_session_cost unsuitable as the cost source for mixed-runtime weekly reporting.",
      "message categories are rule-based user-message classifications.",
      "scenario labels are added to split daily workspace_changes rows."
    ]
  },
  "summary": {
    "total_cost": 8.5141,
    "total_acp_interactions": 9,
    "active_users": 7,
    "workspace_count": 7,
    "created_workspace_count": 8,
    "new_workspace_count": 7,
    "updated_existing_workspace_count": 6,
    "changed_workspace_count": 13,
    "message_count": 51,
    "user_message_count": 21,
    "assistant_message_count": 28,
    "unknown_user_count": 0,
    "unknown_cost": 0.0
  },
  "teams": [
    {
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
      "team": "Intelligent Support Enablement",
      "cost": 3.8347,
      "acp_interactions": 0,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 48,
      "user_message_count": 16,
      "cost_per_ws": 3.8347,
      "cost_per_acp": null,
      "acp_per_ws": 0.0,
      "message_per_ws": 48.0,
      "message_per_acp": null,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Database Service Engineering / Intelligent Query Processing Service / SQL Optimization & Execution",
      "team": "SQL Optimization & Execution",
      "cost": 2.0552,
      "acp_interactions": 7,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 14,
      "user_message_count": 7,
      "cost_per_ws": 2.0552,
      "cost_per_acp": 0.2936,
      "acp_per_ws": 7.0,
      "message_per_ws": 14.0,
      "message_per_acp": 2.0,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "team": "Intelligent Support",
      "cost": 1.4492,
      "acp_interactions": 1,
      "workspace_count": 2,
      "active_users": 2,
      "message_count": 6,
      "user_message_count": 3,
      "cost_per_ws": 0.7246,
      "cost_per_acp": 1.4492,
      "acp_per_ws": 0.5,
      "message_per_ws": 3.0,
      "message_per_acp": 6.0,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Storage Service Engineering / KV Service",
      "team": "KV Service",
      "cost": 0.4611,
      "acp_interactions": 1,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 6,
      "user_message_count": 2,
      "cost_per_ws": 0.4611,
      "cost_per_acp": 0.4611,
      "acp_per_ws": 1.0,
      "message_per_ws": 6.0,
      "message_per_acp": 6.0,
      "correction_message_ratio": null
    },
    {
      "team_path": "Engineering Group / Enterprise Customer Engineering",
      "team": "Enterprise Customer Engineering",
      "cost": 0.4581,
      "acp_interactions": 1,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 5,
      "user_message_count": 3,
      "cost_per_ws": 0.4581,
      "cost_per_acp": 0.4581,
      "acp_per_ws": 1.0,
      "message_per_ws": 5.0,
      "message_per_acp": 5.0,
      "correction_message_ratio": null
    },
    {
      "team_path": "Product / AI Lab",
      "team": "AI Lab",
      "cost": 0.2526,
      "acp_interactions": 1,
      "workspace_count": 1,
      "active_users": 1,
      "message_count": 6,
      "user_message_count": 2,
      "cost_per_ws": 0.2526,
      "cost_per_acp": 0.2526,
      "acp_per_ws": 1.0,
      "message_per_ws": 6.0,
      "message_per_acp": 6.0,
      "correction_message_ratio": null
    },
    {
      "team_path": "(unknown)",
      "team": "(unknown)",
      "cost": 0.0,
      "acp_interactions": 0,
      "workspace_count": 1,
      "active_users": 0,
      "message_count": 0,
      "user_message_count": 0,
      "cost_per_ws": 0.0,
      "cost_per_acp": null,
      "acp_per_ws": 0.0,
      "message_per_ws": 0.0,
      "message_per_acp": null,
      "correction_message_ratio": null
    }
  ],
  "users": [
    {
      "user_email": "wangkang@pingcap.com",
      "name": "王康",
      "en_name": "Kang Wang",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
      "team": "Intelligent Support Enablement",
      "mapping_source": "investibook-usage-team-overrides.csv",
      "cost": 3.8347,
      "acp_interactions": 0,
      "workspace_count": 1,
      "message_count": 24,
      "user_message_count": 8,
      "channel_breakdown": {},
      "frequency_bucket": "低频",
      "depth_bucket": "低轮次",
      "behavior_mode": "低频低轮次",
      "avg_acp_per_ws": 0.0
    },
    {
      "user_email": "tailingxiang@pingcap.com",
      "name": "邰凌翔",
      "en_name": "Lingxiang Tai",
      "team_path": "Engineering Group / Database Service Engineering / Intelligent Query Processing Service / SQL Optimization & Execution",
      "team": "SQL Optimization & Execution",
      "mapping_source": "investibook-usage-team-overrides.csv",
      "cost": 2.0552,
      "acp_interactions": 7,
      "workspace_count": 1,
      "message_count": 14,
      "user_message_count": 7,
      "channel_breakdown": {
        "web": 7
      },
      "frequency_bucket": "低频",
      "depth_bucket": "高轮次",
      "behavior_mode": "低频高轮次",
      "avg_acp_per_ws": 7.0
    },
    {
      "user_email": "d.niu@pingcap.com",
      "name": "Yan Qing Niu",
      "en_name": "Daniel Niu",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "team": "Intelligent Support",
      "mapping_source": "pingcap_members_by_team.csv",
      "cost": 1.2021,
      "acp_interactions": 0,
      "workspace_count": 1,
      "message_count": 2,
      "user_message_count": 1,
      "channel_breakdown": {},
      "frequency_bucket": "低频",
      "depth_bucket": "低轮次",
      "behavior_mode": "低频低轮次",
      "avg_acp_per_ws": 0.0
    },
    {
      "user_email": "debin.jia@pingcap.com",
      "name": "贾德宾",
      "en_name": "Derek Jia",
      "team_path": "Engineering Group / Storage Service Engineering / KV Service",
      "team": "KV Service",
      "mapping_source": "investibook-usage-team-overrides.csv",
      "cost": 0.4611,
      "acp_interactions": 1,
      "workspace_count": 1,
      "message_count": 3,
      "user_message_count": 1,
      "channel_breakdown": {
        "web": 1
      },
      "frequency_bucket": "低频",
      "depth_bucket": "低轮次",
      "behavior_mode": "低频低轮次",
      "avg_acp_per_ws": 1.0
    },
    {
      "user_email": "yangkexin.liang@pingcap.com",
      "name": "梁杨可欣",
      "en_name": "Lucas Liang",
      "team_path": "Engineering Group / Enterprise Customer Engineering",
      "team": "Enterprise Customer Engineering",
      "mapping_source": "investibook-usage-team-overrides.csv",
      "cost": 0.4581,
      "acp_interactions": 1,
      "workspace_count": 1,
      "message_count": 5,
      "user_message_count": 3,
      "channel_breakdown": {
        "web": 1
      },
      "frequency_bucket": "低频",
      "depth_bucket": "低轮次",
      "behavior_mode": "低频低轮次",
      "avg_acp_per_ws": 1.0
    },
    {
      "user_email": "guanglei.bao@pingcap.com",
      "name": "包光磊",
      "en_name": "Todd Bao",
      "team_path": "Product / AI Lab",
      "team": "AI Lab",
      "mapping_source": "investibook-usage-team-overrides.csv",
      "cost": 0.2526,
      "acp_interactions": 1,
      "workspace_count": 1,
      "message_count": 3,
      "user_message_count": 1,
      "channel_breakdown": {
        "lark": 1
      },
      "frequency_bucket": "低频",
      "depth_bucket": "低轮次",
      "behavior_mode": "低频低轮次",
      "avg_acp_per_ws": 1.0
    },
    {
      "user_email": "wai.ho@pingcap.com",
      "name": "Chun Wai Ho",
      "en_name": "Wai Ho",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "team": "Intelligent Support",
      "mapping_source": "pingcap_members_by_team.csv",
      "cost": 0.2471,
      "acp_interactions": 1,
      "workspace_count": 1,
      "message_count": 0,
      "user_message_count": 0,
      "channel_breakdown": {
        "web": 1
      },
      "frequency_bucket": "低频",
      "depth_bucket": "低轮次",
      "behavior_mode": "低频低轮次",
      "avg_acp_per_ws": 1.0
    }
  ],
  "message_categories": [
    {
      "category": "查询纠偏",
      "user_message_count": 1,
      "share": 0.047619,
      "estimated_cost_by_turn": 0.4054,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 487.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "Ad hoc 查询",
      "user_message_count": 9,
      "share": 0.428571,
      "estimated_cost_by_turn": 3.6489,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 21.67,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "诊断启动",
      "user_message_count": 1,
      "share": 0.047619,
      "estimated_cost_by_turn": 0.4054,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 113.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "解释追问",
      "user_message_count": 3,
      "share": 0.142857,
      "estimated_cost_by_turn": 1.2163,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 15.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "流程控制/确认",
      "user_message_count": 3,
      "share": 0.142857,
      "estimated_cost_by_turn": 1.2163,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 6.33,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "方法论/能力咨询",
      "user_message_count": 2,
      "share": 0.095238,
      "estimated_cost_by_turn": 0.8109,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 466.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    },
    {
      "category": "背景补充",
      "user_message_count": 2,
      "share": 0.095238,
      "estimated_cost_by_turn": 0.8109,
      "estimated_cost_by_output_weight": null,
      "avg_user_chars": 545.0,
      "avg_next_assistant_chars": null,
      "classification_method": "rule_based_keywords_v2"
    }
  ],
  "unmatched_users": [],
  "top_changed_workspaces": [
    {
      "workspace_id": "lark-ws-c4cad325-984d-422f-a993-fbdd24817f81",
      "title": "Lark O11Y-2589031",
      "workspace_lifecycle": "new",
      "user_email": "wangkang@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
      "scenario_group": "diagnosis",
      "scenario_category": "tikv_hotspot_or_coprocessor",
      "cost": 3.7712,
      "message_count": 24,
      "user_message_count": 8
    },
    {
      "workspace_id": "ws-1781436470666-d39b140c0",
      "title": "https://tidb.atlassian.net/browse/O11Y-2588752 这个",
      "workspace_lifecycle": "new",
      "user_email": "tailingxiang@pingcap.com",
      "team_path": "Engineering Group / Database Service Engineering / Intelligent Query Processing Service / SQL Optimization & Execution",
      "scenario_group": "diagnosis",
      "scenario_category": "sql_plan_or_query",
      "cost": 2.0552,
      "message_count": 14,
      "user_message_count": 7
    },
    {
      "workspace_id": "ws-1781363517317-712286915",
      "title": "ST-2748",
      "workspace_lifecycle": "updated_existing",
      "user_email": "d.niu@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "scenario_group": "diagnosis",
      "scenario_category": "tikv_hotspot_or_coprocessor",
      "cost": 1.164,
      "message_count": 2,
      "user_message_count": 1
    },
    {
      "workspace_id": "ws-1780991548183-1d4517faa",
      "title": "Wetech-Daily Inspection",
      "workspace_lifecycle": "updated_existing",
      "user_email": "yangkexin.liang@pingcap.com",
      "team_path": "Engineering Group / Enterprise Customer Engineering",
      "scenario_group": "diagnosis",
      "scenario_category": "storage_or_io_bottleneck",
      "cost": 0.4581,
      "message_count": 5,
      "user_message_count": 3
    },
    {
      "workspace_id": "ws-1781409030275-b42a30dad",
      "title": "https://tidb.atlassian.net/browse/O11Y-2588811",
      "workspace_lifecycle": "new",
      "user_email": "debin.jia@pingcap.com",
      "team_path": "Engineering Group / Storage Service Engineering / KV Service",
      "scenario_group": "diagnosis",
      "scenario_category": "backup_or_restore",
      "cost": 0.4581,
      "message_count": 3,
      "user_message_count": 1
    },
    {
      "workspace_id": "lark-ws-8f19caae-cf2c-4f1e-a276-7f1826abb9a7",
      "title": "Lark chat",
      "workspace_lifecycle": "new",
      "user_email": "guanglei.bao@pingcap.com",
      "team_path": "Product / AI Lab",
      "scenario_group": "unknown",
      "scenario_category": null,
      "cost": 0.2492,
      "message_count": 3,
      "user_message_count": 1
    },
    {
      "workspace_id": "ws-1781397248810-d51fb2345",
      "title": "",
      "workspace_lifecycle": "updated_existing",
      "user_email": "wai.ho@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "scenario_group": "unknown",
      "scenario_category": null,
      "cost": 0.2471,
      "message_count": 0,
      "user_message_count": 0
    },
    {
      "workspace_id": "lark-ws-c4cad325-984d-422f-a993-fbdd24817f81",
      "title": "Lark O11Y-2589031",
      "workspace_lifecycle": "new",
      "user_email": "wangkang@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
      "scenario_group": "diagnosis",
      "scenario_category": "tikv_hotspot_or_coprocessor",
      "cost": 0.0635,
      "message_count": 24,
      "user_message_count": 8
    },
    {
      "workspace_id": "ws-1781363517317-712286915",
      "title": "ST-2748",
      "workspace_lifecycle": "updated_existing",
      "user_email": "d.niu@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "scenario_group": "diagnosis",
      "scenario_category": "tikv_hotspot_or_coprocessor",
      "cost": 0.0247,
      "message_count": 2,
      "user_message_count": 1
    },
    {
      "workspace_id": "ws-1781363517317-712286915",
      "title": "ST-2748",
      "workspace_lifecycle": "updated_existing",
      "user_email": "d.niu@pingcap.com",
      "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
      "scenario_group": "diagnosis",
      "scenario_category": "tikv_hotspot_or_coprocessor",
      "cost": 0.0134,
      "message_count": 2,
      "user_message_count": 1
    },
    {
      "workspace_id": "lark-ws-8f19caae-cf2c-4f1e-a276-7f1826abb9a7",
      "title": "Lark chat",
      "workspace_lifecycle": "new",
      "user_email": "guanglei.bao@pingcap.com",
      "team_path": "Product / AI Lab",
      "scenario_group": "unknown",
      "scenario_category": null,
      "cost": 0.0034,
      "message_count": 3,
      "user_message_count": 1
    },
    {
      "workspace_id": "ws-1781397248810-d51fb2345",
      "title": "",
      "workspace_lifecycle": "updated_existing",
      "user_email": "",
      "team_path": "",
      "scenario_group": "unknown",
      "scenario_category": null,
      "cost": 0.0033,
      "message_count": 0,
      "user_message_count": 0
    },
    {
      "workspace_id": "ws-1781409030275-b42a30dad",
      "title": "https://tidb.atlassian.net/browse/O11Y-2588811",
      "workspace_lifecycle": "new",
      "user_email": "debin.jia@pingcap.com",
      "team_path": "Engineering Group / Storage Service Engineering / KV Service",
      "scenario_group": "diagnosis",
      "scenario_category": "backup_or_restore",
      "cost": 0.003,
      "message_count": 3,
      "user_message_count": 1
    }
  ],
  "charts": {
    "daily_cost_acp": [
      {
        "date": "2026-06-14",
        "cost": 8.5141,
        "acp_interactions": 9,
        "workspace_count": 7,
        "active_users": 7
      }
    ],
    "team_cost_bar": [
      {
        "team": "Intelligent Support Enablement",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
        "cost": 3.8347,
        "acp_interactions": 0,
        "workspace_count": 1,
        "active_users": 1
      },
      {
        "team": "SQL Optimization & Execution",
        "team_path": "Engineering Group / Database Service Engineering / Intelligent Query Processing Service / SQL Optimization & Execution",
        "cost": 2.0552,
        "acp_interactions": 7,
        "workspace_count": 1,
        "active_users": 1
      },
      {
        "team": "Intelligent Support",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
        "cost": 1.4492,
        "acp_interactions": 1,
        "workspace_count": 2,
        "active_users": 2
      },
      {
        "team": "KV Service",
        "team_path": "Engineering Group / Storage Service Engineering / KV Service",
        "cost": 0.4611,
        "acp_interactions": 1,
        "workspace_count": 1,
        "active_users": 1
      },
      {
        "team": "Enterprise Customer Engineering",
        "team_path": "Engineering Group / Enterprise Customer Engineering",
        "cost": 0.4581,
        "acp_interactions": 1,
        "workspace_count": 1,
        "active_users": 1
      },
      {
        "team": "AI Lab",
        "team_path": "Product / AI Lab",
        "cost": 0.2526,
        "acp_interactions": 1,
        "workspace_count": 1,
        "active_users": 1
      },
      {
        "team": "(unknown)",
        "team_path": "(unknown)",
        "cost": 0.0,
        "acp_interactions": 0,
        "workspace_count": 1,
        "active_users": 0
      }
    ],
    "team_ratio_scatter": [
      {
        "team": "Intelligent Support Enablement",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support Enablement",
        "x": 0.0,
        "y": null,
        "size": 1,
        "cost": 3.8347
      },
      {
        "team": "SQL Optimization & Execution",
        "team_path": "Engineering Group / Database Service Engineering / Intelligent Query Processing Service / SQL Optimization & Execution",
        "x": 7.0,
        "y": 0.2936,
        "size": 1,
        "cost": 2.0552
      },
      {
        "team": "Intelligent Support",
        "team_path": "Engineering Group / Global Support Intelligence / Intelligent Support",
        "x": 0.5,
        "y": 1.4492,
        "size": 2,
        "cost": 1.4492
      },
      {
        "team": "KV Service",
        "team_path": "Engineering Group / Storage Service Engineering / KV Service",
        "x": 1.0,
        "y": 0.4611,
        "size": 1,
        "cost": 0.4611
      },
      {
        "team": "Enterprise Customer Engineering",
        "team_path": "Engineering Group / Enterprise Customer Engineering",
        "x": 1.0,
        "y": 0.4581,
        "size": 1,
        "cost": 0.4581
      },
      {
        "team": "AI Lab",
        "team_path": "Product / AI Lab",
        "x": 1.0,
        "y": 0.2526,
        "size": 1,
        "cost": 0.2526
      },
      {
        "team": "(unknown)",
        "team_path": "(unknown)",
        "x": 0.0,
        "y": null,
        "size": 1,
        "cost": 0.0
      }
    ],
    "message_category_stack": [
      {
        "team": "Intelligent Support Enablement",
        "category": "Ad hoc 查询",
        "count": 12
      },
      {
        "team": "Intelligent Support Enablement",
        "category": "流程控制/确认",
        "count": 2
      },
      {
        "team": "Intelligent Support Enablement",
        "category": "解释追问",
        "count": 2
      },
      {
        "team": "SQL Optimization & Execution",
        "category": "Ad hoc 查询",
        "count": 2
      },
      {
        "team": "SQL Optimization & Execution",
        "category": "查询纠偏",
        "count": 1
      },
      {
        "team": "SQL Optimization & Execution",
        "category": "流程控制/确认",
        "count": 1
      },
      {
        "team": "SQL Optimization & Execution",
        "category": "背景补充",
        "count": 1
      },
      {
        "team": "SQL Optimization & Execution",
        "category": "解释追问",
        "count": 2
      },
      {
        "team": "Intelligent Support",
        "category": "背景补充",
        "count": 3
      },
      {
        "team": "KV Service",
        "category": "Ad hoc 查询",
        "count": 2
      },
      {
        "team": "Enterprise Customer Engineering",
        "category": "方法论/能力咨询",
        "count": 2
      },
      {
        "team": "Enterprise Customer Engineering",
        "category": "流程控制/确认",
        "count": 1
      },
      {
        "team": "AI Lab",
        "category": "诊断启动",
        "count": 2
      }
    ],
    "user_behavior_quadrant": [
      {
        "user_email": "d.niu@pingcap.com",
        "x": 1,
        "y": 0.0,
        "cost": 1.2021,
        "mode": "低频低轮次"
      },
      {
        "user_email": "debin.jia@pingcap.com",
        "x": 1,
        "y": 1.0,
        "cost": 0.4611,
        "mode": "低频低轮次"
      },
      {
        "user_email": "guanglei.bao@pingcap.com",
        "x": 1,
        "y": 1.0,
        "cost": 0.2526,
        "mode": "低频低轮次"
      },
      {
        "user_email": "tailingxiang@pingcap.com",
        "x": 1,
        "y": 7.0,
        "cost": 2.0552,
        "mode": "低频高轮次"
      },
      {
        "user_email": "wai.ho@pingcap.com",
        "x": 1,
        "y": 1.0,
        "cost": 0.2471,
        "mode": "低频低轮次"
      },
      {
        "user_email": "wangkang@pingcap.com",
        "x": 1,
        "y": 0.0,
        "cost": 3.8347,
        "mode": "低频低轮次"
      },
      {
        "user_email": "yangkexin.liang@pingcap.com",
        "x": 1,
        "y": 1.0,
        "cost": 0.4581,
        "mode": "低频低轮次"
      }
    ]
  },
  "workspace_changes_ref": "workspace_changes.json"
}
