Nº03 · tool callsTool-calling agent · 2026工具调用 Agent · 2026

Refund Agent

The model proposes, it cannot pay. Fixed checks, human approval, hash-chained ledger.模型只能提议、不能付款:固定校验、人工批准、哈希链账本。

Refund Agent demo: proposed refund awaiting human approval
16 tests · approval gate

01Problem问题

Letting an LLM handle refunds is useful until it refunds the whole charge for one cold dish, or tells the customer the money is on its way before anyone approved it.让 LLM 处理退款很有用,直到它为一道凉了的菜退掉整单,或者在没人批准前就告诉客户“钱已退”。

02Flow流程

  1. Customer客户
  2. LLM proposesLLM 提议
  3. Fixed checks固定校验
  4. Human approves?人工批准?
  5. Hash-chained ledger哈希链账本

03What I built我做了什么

  • Tools are split: find_my_payments and get_bill read; propose_refund only queues. Identity comes from the session, so the model cannot reach another customer.工具分权:find_my_payments、get_bill 只读;propose_refund 只入队。身份取自会话,模型碰不到其他客户。
  • Every proposal passes fixed checks (owner, whole cents, still refundable, a reason). Over $50 needs a manager; review flags point at odd amounts.每个提议都过固定校验(归属、整分、可退余额、理由)。超过 $50 需经理;审核标记指出异常金额。
  • A reply that claims the refund is done before approval is replaced with a fixed template.在批准前声称“已退款”的回复会被替换为固定模板。

04Measured测量结果

15
tests, including a replay of every recorded run个测试,含每段录制运行的回放
$50
threshold above which a manager must approve超过此金额必须经理批准

05Limits, stated plainly局限,直说

  • Recordings come from one model (qwen2.5:7b); there is no over-refund rate across many runs yet.录制只来自一个模型(qwen2.5:7b);尚无多次运行下的超额退款率。