5D Library › Conversational Closing Automata, Objection-Handling Information Gain and High-Ticket Sales Kinetics · 中文

Chapter 5. When an AI Sales Agent Hands Over to a Human: Gittins Indices and Ranking by Uplift

Human time is scarce

An AI sales agent can hold conversations with hundreds or thousands of buyers at once; human closers number a handful. Two questions follow: which sources of buyers (campaigns, channels) deserve more of the human time, and, within a week’s conversations, which ones should be handed to a person.

Gittins indices: a bonus for exploring uncertain sources

Each source’s “close rate once a human takes over” is unknown. Each buyer from that source handed to a human is like one pull of a Bernoulli bandit arm: a sale or not, and an update of the source’s posterior. Gittins proved that in the discounted multi-armed bandit the optimal policy is to pull, each time, the arm with the highest index (Gittins 1979; Gittins et al. 2011). The index is the reward that makes “keep pulling this arm” and “retire on a fixed reward” equally good; it exceeds the posterior mean, and the excess is the value of exploration.

Calculation

# 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

Each hand-over is discounted by 0.9. A new source with a record equivalent to 1 sale in 5 has a mean of 0.200 and an index of 0.302, an exploration bonus of +0.102; with the same mean but a record of 10 in 50, the index is only 0.213. A source with a mean of 0.150 and a record of 40 has an index of 0.164; one with a mean of 0.300 and a record of 10, an index of 0.365. A new source should get more human hand-overs at first, until its close rate is seen clearly.

Hand over the buyers a human can add most to

Within a week, the common practice is to hand the “hottest” conversations to a human: those the AI rates most likely to buy. That wastes the human: the hottest buyers would mostly buy without one. In the illustrative model, 200 buyers arrive a week and the humans can take 30; the uplift a human brings is largest for buyers of middling warmth (Gutierrez and Gérardy 2017).

Calculation

# 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)

The AI alone brings in RM 785,730 a week. Knowing every buyer’s true uplift, humans could add at most RM 165,346. Handing over the “hottest” adds only RM 91,066 (55% of the most); handing over by “expected sale value with a human” adds RM 159,147 (96%); by “estimated uplift in RM”, RM 150,756 (91%).

Note

Ranking by uplift is best in theory, but it must be estimated well. Uplift is the difference of two estimates, so their noise adds up; here ranking by “expected sale value with a human” does slightly better. Whichever is chosen, hand-overs should not go by “hottest”.

Summary

Uncertain new sources deserve more human hand-overs, and the Gittins index puts a number on that exploration bonus (+0.102 for a new source). Within a week, handing over by warmth uses only 55% of the humans’ potential; handing over by expected sale value with a human, or by uplift, uses more than nine tenths.

References

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).