下一步可能做什么?
一份最终分布,覆盖本示例的4个支持事件;下一行为概率尚未经校准。
| 下一事件 | 概率 |
|---|---|
| 购买 | 37% |
| 访问会员门户 | 28% |
| 点击邮件 | 21% |
| 核销优惠券 | 14% |
为什么有些事件没有概率?
“发送邮件”属于输入上下文,不是预测目标,因此概率为 null。不支持或没有数据覆盖的事件同样保持不可用。
Developer Center · Engineering reference
The model layer under the Decide node: a per-brand Behavior Model (an event-sequence model of how each member behaves) plus a Digital Twin layer that runs it forward (counterfactual simulation and the synthetic research panel). This page covers what an integrator can actually touch: the events that feed it, the gate that decides whether it serves, the surfaces its outputs land on, and the MCP tools that drive the panel.
Use the governed read-only REST endpoints or MCP tools below for one member prediction. Next-behavior results and personal purchase windows share a response, with explicit availability and permission checks. Events still enter through the normal integration surfaces; additional outputs surface in segments, member profiles, lookalike, send-time optimization and the synthetic panel.
一次会员预测同时返回下一行为与个人购买窗口;品牌融合头可用时,将个人信号与整体需求趋势结合。
交互示例
所有状态与数值均为合成示例,不代表实时预测或工作区可用状态;不会发送客户数据。
已有行为预测仍可返回。品牌融合头完成训练并通过验证前,个人购买窗口保持不可用。
一份最终分布,覆盖本示例的4个支持事件;下一行为概率尚未经校准。
| 下一事件 | 概率 |
|---|---|
| 购买 | 37% |
| 访问会员门户 | 28% |
| 点击邮件 | 21% |
| 核销优惠券 | 14% |
“发送邮件”属于输入上下文,不是预测目标,因此概率为 null。不支持或没有数据覆盖的事件同样保持不可用。
CWM 个人信号 + TimesFM 品牌需求趋势。
预测窗口内至少购买一次的累计概率。三个窗口之间、窗口与行为分布之间均不能相加。
一次会员请求同时返回 distribution 与 purchaseWindows。
curl --request GET \
"https://YOUR_API_HOST/api/v2/cwm/members/YOUR_MEMBER_UUID/next-behaviors" \
--header "Authorization: Bearer YOUR_API_KEY"{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "cwm_predict_next_behaviors",
"arguments": {
"member_id": "YOUR_MEMBER_UUID"
}
}
}请替换 API 域名、会员 UUID 与工作区 API 密钥。
所需权限 · predictions:read 可读取行为;额外授予 metrics:read(或 *)后,可在模型就绪时获取购买窗口。
仅为合成示例节选。品牌模型响应还包含完整事件目录及覆盖信息;公共先验参考采用独立的6类词表。
{
"predictionKind": "next_event",
"unit": "probability_0_1",
"status": "degraded",
"distribution": {
"status": "ok",
"vocabulary": "member_event",
"normalization": "conditional_on_supported_events",
"calibrated": false,
"rows": [
{
"key": "purchase.completed",
"label": "Purchase",
"probability": 0.37,
"rank": 1,
"availability": "predicted"
},
{
"key": "portal.visited",
"label": "Portal visit",
"probability": 0.28,
"rank": 2,
"availability": "predicted"
},
{
"key": "email.clicked",
"label": "Email clicked",
"probability": 0.21,
"rank": 3,
"availability": "predicted"
},
{
"key": "coupon.redeemed",
"label": "Coupon redeemed",
"probability": 0.14,
"rank": 4,
"availability": "predicted"
},
{
"key": "email.sent",
"label": "Email sent",
"probability": null,
"rank": null,
"availability": "context_only"
}
]
},
"purchaseWindows": {
"unit": "probability_0_1",
"probabilities": {
"7": null,
"30": null,
"90": null
},
"calibrated": false,
"envelope": {
"status": "unavailable",
"backend": "cwm-timesfm-2.5",
"reasonCodes": [
"fusion_not_trained"
]
}
},
"reasonCodes": [
"fusion_not_trained"
]
}合成数据 · TimesFM 2.5
基于128天合成历史生成的预测示例,对比近期需求走势、未来逐日预测和分位数范围。
合成需求单位
| 日期(UTC) | 预测值 | q10–q90 |
|---|---|---|
| 2026-10-05 | 22.9 | 22.8–23.0 |
| 2026-10-06 | 21.3 | 21.2–21.4 |
| 2026-10-07 | 18.7 | 18.6–18.8 |
| 2026-10-08 | 17.1 | 17.0–17.1 |
| 2026-10-09 | 17.7 | 17.6–17.7 |
| 2026-10-10 | 20.0 | 20.0–20.1 |
| 2026-10-11 | 22.3 | 22.3–22.4 |
| 2026-10-12 | 22.9 | 22.9–22.9 |
| 2026-10-13 | 21.3 | 21.2–21.3 |
| 2026-10-14 | 18.7 | 18.6–18.7 |
| 2026-10-15 | 17.1 | 17.0–17.2 |
| 2026-10-16 | 17.7 | 17.6–17.7 |
| 2026-10-17 | 20.0 | 19.9–20.1 |
| 2026-10-18 | 22.4 | 22.3–22.4 |
| 2026-10-19 | 22.9 | 22.8–23.0 |
| 2026-10-20 | 21.3 | 21.2–21.4 |
| 2026-10-21 | 18.7 | 18.6–18.7 |
| 2026-10-22 | 17.1 | 17.0–17.1 |
| 2026-10-23 | 17.7 | 17.6–17.7 |
| 2026-10-24 | 20.0 | 19.9–20.0 |
| 2026-10-25 | 22.3 | 22.3–22.4 |
| 2026-10-26 | 22.9 | 22.8–22.9 |
| 2026-10-27 | 21.3 | 21.2–21.3 |
| 2026-10-28 | 18.7 | 18.6–18.7 |
| 2026-10-29 | 17.1 | 17.0–17.2 |
| 2026-10-30 | 17.7 | 17.6–17.7 |
| 2026-10-31 | 20.0 | 20.0–20.1 |
| 2026-11-01 | 22.4 | 22.3–22.4 |
| 2026-11-02 | 22.9 | 22.8–22.9 |
| 2026-11-03 | 21.3 | 21.2–21.3 |
本示例输入为合成数据,预测由真实TimesFM 2.5权重生成。预测起点为2026-10-05(UTC),演示日期固定;分位数覆盖率尚未经校准。数值不代表客户实际需求或个人购买概率。
一次获得一份最终概率分布与排序。通过评测的品牌模型优先,最多支持23类有数据覆盖的目标;品牌模型不可用时,内部公共先验模型汇总成一份6类参考分布。不支持及仅作上下文的事件保持不可用。
自动包含在同一份会员响应中:租户独立的轻量融合头结合 CWM 信号与 TimesFM 品牌趋势。合格融合头直接输出;缺少训练或评测时,购买窗口保持不可用,已有行为预测仍可返回。
TimesFM 2.5 服务已配置且逐日历史完整时,可预测未来最多90天的销售额、订单数或商品销量,并提供预测值和9个分位数。
下一行为概率在支持的候选类别中合计为100%,尚未经校准。购买窗口单独预测7/30/90天内至少购买一次的累计概率,不与行为类别一起归一化。行为分布未按静默时长调整;公共先验参考尚未通过工作区验证。
需求分位数表达整体不确定性,不是个人购买区间,覆盖率尚未经校准。缺失数据保持不可用;在工作区评测完成前,不宣称精度提升。
# Bearer API key; predictions:read
GET /api/v2/cwm/capabilities
GET /api/v2/cwm/members/{id}/next-behaviors
# metrics:read additionally enables purchaseWindows in next-behaviors
# predictions:read AND metrics:read for standalone trend/windows
GET /api/v2/cwm/trends?metric=gmv&horizon_days=30
GET /api/v2/cwm/members/{id}/purchase-windows
# Read-only MCP equivalents
cwm_get_forecast_capabilities
cwm_predict_next_behaviors
cwm_forecast_aggregate_trend
cwm_predict_purchase_windowsPurchase probabilities use 0–1 units and cumulative, monotonic windows. Until trained and validated, the response contains probabilities: {"7":null,"30":null,"90":null} and calibrated: false. Existing CWM 0–100 mass scores keep their meaning. Aggregate forecasts return one point and q10..q90 per complete UTC day; missing daily buckets are not filled with zero. Category names require catalog_gmv or units_sold; draft input metrics are disclosed. Tenant and member authorization remain server-side. Readiness distinguishes service_unavailable, awaiting_training, awaiting_validation and ready. TimesFM 2.5 weights use Apache 2.0.
Next-behavior responses use predictionKind: next_event and unit: probability_0_1. One response includes distribution and purchaseWindows; individual expert results are internal. Purchase fusion is invoked automatically when metrics access permits. A validated tenant head serves cumulative 7/30/90-day probabilities; missing permission, training, validation or inputs leaves all windows null with an explicit reason. Available behavior predictions remain readable. These windows are not summed with the next-event distribution. The brand model's rows include all 48 standard events: 26 are consumer behaviors, 39 enter the sequence vocabulary, and 23 is the prediction-target ceiling. Only covered candidates supported by the active, evaluated generation receive probabilities; all other rows have probability: null and an explicit availability. Legacy input-frequency coverage is weaker corpus-presence evidence and cannot certify provenance-masked tag targets. New snapshots use positive targets from optimizer training windows, excluding validation members and masked rows. The final distribution includes rank, entropyBits, retainedModelMass, coverageBasis, modelVersion and calibrated: false. An available, evaluated brand model is used directly without requesting alternate expert outputs. Otherwise, valid public-prior distributions are equally averaged internally into one degraded pv / fav / cart / buy / rmcart / buy_disc reference. aggregation distinguishes single_tenant_model from uniform_valid_experts; vocabulary identifies the candidate key space. The two vocabularies are never blended. The uniform reference is not a learned multiclass gate and is not tenant-validated; public class-training coverage is unverified. Rounded zero mass does not prove absent class training. This endpoint needs predictions:read; purchaseWindows additionally needs metrics:read or *. Without metrics permission, the purchase component reports metrics_scope_required and makes no metric or fusion call. Status is ok only when both earned components serve, degraded for partial/reference results, and unavailable when neither serves. Store access and live processing eligibility are rechecked before personal external processing; insufficient evidence remains unavailable. One request shares its live CWM fingerprint internally across the behavior and purchase heads.
The model trains on the member event stream your integrations already produce — REST API v2 (orders, members), web & portal tracking, POS/receipt capture, loyalty and coupon activity. Events pass a governed catalog with a policy firewall before they can enter training; the firewall is enforced in the pipeline, not by convention.
Purchases, receipts, points earned/redeemed, tier changes, coupon claims/redemptions, email opens/clicks, push opens, portal visits/clicks, store check-ins. Every event type is explicitly admitted to the catalog — new event types don't train silently.
Anything the model itself writes back (its own tags and scores) is excluded — a model must not learn from its own output. Message content and free text never enter training: the model learns that a member clicked, never what the message said.
Members under a processing restriction (GDPR Art. 18) are excluded from training end-to-end, and an erased member's data — including their embedding — is removed as part of the deletion machinery itself.
Practical consequence for integrators: the richer and cleaner your event feed (correct member identity resolution, honest timestamps), the better the model — there is no separate “training upload.” See REST API and Web Tracking.
A brand's model is trained per tenant, deterministically (same data ⇒ same model, versioned), and it only serves after beating a transparent baseline on that brand's own held-out data. Downstream consumers never read the model directly — they go through a single serving predicate:
If any leg fails — the model hasn't earned its place yet, the brand paused scoring, or the model has gone stale — every consumer falls back to the glass-box predictive models (or an honest empty state, in lookalike's case). Nothing is ever zero-filled and nothing pretends: a member without an embedding is served by the fallback path, never padded into the model's.
Lifecycle a brand sees
not enough history to train honestly — nothing serves
trained, being tested against the baseline on held-out reality
beat the baseline — embeddings & predictions serve
scoring stops or the model ages out — automatic fallback
Three existing output families are available in the member and segment surfaces below. Use the governed REST or MCP prediction interface above for the unified next-event distribution and purchase windows.
A behavioral fingerprint per member, learned from their whole event sequence. Powers nearest-neighbor similarity: every member with behavior has one — no tags required.
Per-member purchase imminence and churn imminence (0–100), refreshed as behavior lands. Exposed as segment conditions — e.g. "Purchase Imminence (predicted next-event, 0-100)" — and on the member profile.
Each member's expected next-purchase window and engaged hour of day, from their own rhythm.
Your AI agents can operate the Digital Twin's research panel through the governed MCP server. Four panel tools, verbatim from the live manifest, alongside the read-only prediction tools above:
list_synthetic_scenarios
((none))
List the synthetic-panel simulation scenarios with each one's honest usability boundary, confidence ceiling, and input fields. Call first to pick a kind. Requires metrics:read.
run_synthetic_panel
(segment_id, kind, fields)
Run a synthetic panel: de-identified digital twins of a segment react to a stimulus, producing an honest directional report (never real absolute numbers). Returns a run_id to poll. Bounded by a daily run cap + ≤50 twins. Requires synthetic:write.
get_synthetic_report
(run_id)
Read the frozen honest report for a synthetic-panel run — directional read, confidence ceiling, suppression flags, themes — or a blockReason if not ready. Requires metrics:read.
get_synthetic_calibration
((none))
The brand's synthetic-panel calibration (hit rate of past synthetic predictions vs reality; null until backtests exist). Requires metrics:read.
Typical flow
Contract to design against: runs are bounded (daily run cap, ≤50 twins per run); reports are directional, never absolute numbers; a run that fails its honesty checks (panel collapse, sycophancy, too-small sample) comes back with a blockReason or suppression flags instead of a flattering result — treat those as terminal, not retryable. The same caps and rules apply whether a human or your agent starts the run. Setup, auth and scopes: MCP Integration Guide.
One model per tenant, trained on that tenant's members only. Nothing pools across brands — in either direction.
Same data produces the same model, bit for bit; every score is traceable to the model version that produced it.
Member erasure deletes their training data and embedding as part of the deletion transaction — not on a cleanup schedule.
Embeddings that outlive their freshness window are purged on schedule, and a stale model stops serving automatically.