5D Library › 对话式成交自动机、异议消解信息增益与高客单销售动力学 · English

第五章 AI 销售智能体何时交给人:吉廷斯指数与增量排序

人工时间是稀缺资源

AI 销售智能体可以同时与成百上千位买家对话,人工成交顾问却只有几位。两个问题随之而来:哪一类来源(广告系列、渠道)的买家值得多分一些人工时间;在同一周的对话中,又该把哪几段交给人。

吉廷斯指数:给不确定的来源一点探索的奖励

每个来源的「人工接手后的成交率」是未知的。每接手一位来自该来源的买家,就像拉一次伯努利老虎机:成交或不成交,并更新这个来源的后验。吉廷斯证明,在折现的多臂老虎机问题中,最优策略是每次选择指数最高的臂 (Gittins 1979; Gittins et al. 2011)。指数等于让「继续拉这个臂」与「领取固定报酬退出」一样好的那个报酬,它高于后验均值,高出的部分就是探索的价值。

推导

# Chapter 5. p09: Gittins indices for routing scarce human time. Leads come
# from several sources (campaigns, channels); each source has an unknown
# rate at which an escalated lead closes with a human closer. Each
# escalation is one pull of a Bernoulli arm with a Beta(a, b) posterior;
# rewards are discounted by 0.9 per escalation. The Gittins index is the
# retirement reward per step that makes stopping and continuing equally
# good (calibration by bisection, value iteration truncated at depth 80).
from functools import lru_cache

BETA, DEPTH = 0.9, 80

def index(a, b):
    lo, hi = 0.0, 1.0
    for _ in range(30):
        lam = (lo + hi) / 2
        ret = lam / (1 - BETA)

        @lru_cache(maxsize=None)
        def V(x, y):
            p = x / (x + y)
            if x + y - a - b >= DEPTH:
                return max(ret, p / (1 - BETA))
            go = p * (1 + BETA * V(x + 1, y)) + (1 - p) * BETA * V(x, y + 1)
            return max(ret, go)
        p = a / (a + b)
        go = p * (1 + BETA * V(a + 1, b)) + (1 - p) * BETA * V(a, b + 1)
        if go > ret + 1e-12:
            lo = lam
        else:
            hi = lam
    return (lo + hi) / 2

if __name__ == "__main__":
    print("   source history     mean   Gittins index  exploration bonus")
    for a, b, label in ((1, 4, "new (1 of 5)"), (2, 8, "2 of 10"),
                        (4, 16, "4 of 20"), (10, 40, "10 of 50"),
                        (3, 7, "3 of 10"), (6, 34, "6 of 40")):
        g = index(a, b)
        m = a / (a + b)
        print("   {:<16}  {:5.3f}  {:13.3f}  {:+.3f}".format(
            label, m, g, g - m))
#    source history     mean   Gittins index  exploration bonus
#    new (1 of 5)      0.200          0.302  +0.102
#    2 of 10           0.200          0.257  +0.057
#    4 of 20           0.200          0.230  +0.030
#    10 of 50          0.200          0.213  +0.013
#    3 of 10           0.300          0.365  +0.065
#    6 of 40           0.150          0.164  +0.014

每次接手按 0.9 折现。一个新来源的记录相当于 5 次中成交 1 次,均值 0.200,指数 0.302,探索奖励 +0.102;同样均值但记录是 50 次中 10 次,指数只有 0.213。均值 0.150、记录 40 次的来源,指数 0.164;均值 0.300、记录 10 次的来源,指数 0.365。新来源应当先多给一些人工接手,直到它的成交率被看清。

交给人的,应当是人能多成交的那些

在同一周之内,常见的做法是把「最热」的对话交给人:AI 判断成交概率最高的那些。这恰恰浪费了人工:最热的买家没有人工也多半会买。在示意模型中,每周 200 位买家,人工只够接手 30 位;人工带来的增量在中等热度的买家身上最大 (Gutierrez and Gérardy 2017)。

推导

# Chapter 5. p10: Which conversations should the AI closer hand to a human?
# 200 leads a week, human time for 30 of them. Lead i is worth RM 9,800
# (70%) or RM 29,800 (30%); the AI alone closes it with probability q,
# drawn from Beta(2, 6); a human adds an uplift k * 0.8 * q * (1 - q),
# k uniform on [0.5, 1.5]: the hottest and the coldest leads gain least.
# The system sees q and the human rate with estimation noise (sd 0.05).
# Rules: hand over (a) the hottest leads, (b) the largest expected value
# with a human, (c) the largest expected uplift in RM. 200 weeks, seed 84.
import random

def week(rng):
    leads = []
    for _ in range(200):
        v = 29800 if rng.random() < 0.3 else 9800
        q = rng.betavariate(2, 6)
        qh = min(1.0, q + rng.uniform(0.5, 1.5) * 0.8 * q * (1 - q))
        eq = min(1, max(0, q + rng.gauss(0, 0.05)))
        eh = min(1, max(0, qh + rng.gauss(0, 0.05)))
        leads.append((v, q, qh, eq, eh))
    return leads

RULES = {"hottest (AI close prob)": lambda l: l[3],
         "value with a human": lambda l: l[0] * l[4],
         "uplift in RM": lambda l: l[0] * (l[4] - l[3])}

if __name__ == "__main__":
    rng = random.Random(84)
    weeks = [week(rng) for _ in range(200)]
    base = sum(sum(v * q for v, q, _, _, _ in w) for w in weeks) / 200
    best = sum(sum(sorted((v * (qh - q) for v, q, qh, _, _ in w),
                          reverse=True)[:30]) for w in weeks) / 200
    print("   AI only: RM {:,.0f} a week".format(base))
    print("   most a human could add (true uplift known): RM {:,.0f}".format(
        best))
    for name, key in RULES.items():
        add = 0.0
        for w in weeks:
            pick = sorted(w, key=key, reverse=True)[:30]
            add += sum(v * (qh - q) for v, q, qh, _, _ in pick)
        add /= 200
        print("   {:<24} adds RM {:>7,.0f} ({:.0%} of the most)".format(
            name, add, add / best))
#    AI only: RM 785,730 a week
#    most a human could add (true uplift known): RM 165,346
#    hottest (AI close prob)  adds RM  91,066 (55% of the most)
#    value with a human       adds RM 159,147 (96% of the most)
#    uplift in RM             adds RM 150,756 (91% of the most)

只靠 AI,每周收入 RM 785,730。如果确切知道每个人的真实增量,人工最多能多带来 RM 165,346。按「最热」交接,只多 RM 91,066(上限的 55%);按「交给人之后的期望成交额」交接,多 RM 159,147(96%);按「估计的增量金额」交接,多 RM 150,756(91%)。

注

增量排序在理论上最好,但要估得准。 增量是两个估计值之差,噪声叠加;在本例中,按「交给人之后的期望成交额」排序反而略好。无论选哪一种,都不应按「最热」交接。

小结

不确定的新来源值得多给一些人工接手,吉廷斯指数给出这份探索的奖励(新来源 +0.102)。同一周之内,按热度交接只用上了人工潜力的 55%;按交给人之后的期望成交额或增量交接,可以用上九成以上。

参考文献

Gittins, J. C. 1979. “Bandit Processes and Dynamic Allocation Indices.” Journal of the Royal Statistical Society. Series B (Methodological) 41 (2): 148–77.
Gittins, John, Kevin Glazebrook, and Richard Weber. 2011. Multi-Armed Bandit Allocation Indices. 2nd ed. Wiley.
Gutierrez, Pierre, and Jean-Yves Gérardy. 2017. “Causal Inference and Uplift Modelling: A Review of the Literature.” Proceedings of Machine Learning Research 67: 1–13.

Fan, Y. (2026). Conversational Closing Automata, Objection-Handling Information Gain and High-Ticket Sales Kinetics: Diagnostic Question Trees, Trust-Threshold Stopping Rules and AI Closer Escalation Protocols [对话式成交自动机、异议消解信息增益与高客单销售动力学] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090221 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).