返回顶部
o

oraclaw-bandit多臂测试优化

A/B testing and feature optimization for AI agents. Pick the best option automatically using Multi-Armed Bandits and Contextual Bandits (LinUCB). No data warehouse needed — works from request #1.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
87
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

oraclaw-bandit

OraClaw Bandit — 基于AI的A/B测试

你是一个使用多臂老虎机算法从一组选项中找出最佳选择的优化代理。

何时使用此技能

当用户或其他代理需要以下情况时使用:

  • - 从多个选项中选出最佳变体
  • 运行无需预定样本量的A/B测试
  • 优化功能开关、提示词、邮件主题或任何选择
  • 进行上下文感知的选择(不同情境下的最佳选项不同)

使用方法

第一步:设置MCP连接

添加OraClaw MCP服务器以获取optimizebandit和optimizecontextual工具:

json
{
mcpServers: {
oraclaw: {
command: npx,
args: [tsx, path/to/oraclaw-mcp/index.ts]
}
}
}

第二步:使用optimize_bandit进行简单A/B测试

传入选项(臂)列表及其历史表现数据:

json
{
arms: [
{ id: variant-a, name: 简短邮件, pulls: 500, totalReward: 175 },
{ id: variant-b, name: 长邮件, pulls: 300, totalReward: 126 },
{ id: variant-c, name: 视频邮件, pulls: 100, totalReward: 48 }
],
algorithm: ucb1
}

返回结果会告诉你下一步应展示哪个变体,在探索(尝试新选项)和利用(使用有效方案)之间取得平衡。

第三步:使用optimize_contextual进行个性化选择

当最佳选择取决于上下文(时间、用户类型、情境)时:

json
{
arms: [
{ id: deep-work, name: 深度工作块 },
{ id: quick-tasks, name: 快速任务批处理 },
{ id: meetings, name: 会议块 }
],
context: [0.75, 0.8, 0.3, 0.0],
history: [
{ armId: deep-work, reward: 0.9, context: [0.25, 0.9, 0.1, 0.0] },
{ armId: quick-tasks, reward: 0.7, context: [0.75, 0.4, 0.8, 1.0] }
]
}

上下文向量表示情境特征(例如:时间段、精力水平、紧急程度、待办事项数量)。算法会学习每个情境下哪种选项效果最佳。

规则

  1. 1. 始终包含可用的历史数据——数据越多,选择越优
  2. 大多数情况下使用ucb1算法。当需要在早期进行更多探索时使用thompson算法
  3. 每次决策后记录奖励值,以改进后续选择
  4. 所有调用中的上下文向量长度必须一致
  5. 奖励值应归一化到0-1范围

定价

每次优化调用$0.01(通过x402在Base链上使用USDC支付)。免费套餐:使用API密钥每月可调用3,000次。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 oraclaw-bandit-1775980743 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 oraclaw-bandit-1775980743 技能

通过命令行安装

skillhub install oraclaw-bandit-1775980743

下载

⬇ 下载 oraclaw-bandit v1.0.0(免费)

文件大小: 2.09 KB | 发布时间: 2026-4-13 11:21

v1.0.0 最新 2026-4-13 11:21
OraClaw Bandit 1.0.0 — Initial Release

- Introduces A/B and feature optimization using Multi-Armed Bandits and Contextual Bandits (LinUCB).
- No data warehouse required; works from the first request.
- Supports both simple A/B testing and context-aware (personalized) optimization.
- Integrates via MCP server with easy JSON-based API.
- Includes flexible algorithm options (UCB1, Thompson sampling).
- Pay-as-you-go pricing with a free monthly tier.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部