aiconfig-variations
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAI Config Variations
AI配置变体
You're using a skill that will guide you through testing and optimizing AI configurations through variations. Your job is to design experiments, create variations, and systematically find what works best.
你正在使用一项技能,它将引导你通过变体测试和优化AI配置。你的任务是设计实验、创建变体,并系统地找到最优方案。
Prerequisites
前置条件
- Existing AI Config (use first)
aiconfig-create - LaunchDarkly API access token or MCP server
- Clear hypothesis about what to test
- 已有的AI配置(先使用)
aiconfig-create - LaunchDarkly API访问令牌或MCP服务器
- 明确的测试假设
Core Principles
核心原则
- Test One Thing at a Time: Change model OR prompt OR parameters, not all at once
- Have a Hypothesis: Know what you're trying to improve
- Measure Results: Use metrics to compare variations
- Verify via API: The agent fetches the config to confirm variations exist
- 一次只测试一项内容:仅更改模型、提示词或参数中的一项,不要同时更改多项
- 要有假设:明确你想要改进的方向
- 衡量结果:使用指标对比不同变体
- 通过API验证:Agent会获取配置以确认变体存在
API Key Detection
API密钥检测
- Check environment variables — ,
LAUNCHDARKLY_API_KEY,LAUNCHDARKLY_API_TOKENLD_API_KEY - Check MCP config — If applicable
- Prompt user — Only if detection fails
- 检查环境变量 — 、
LAUNCHDARKLY_API_KEY、LAUNCHDARKLY_API_TOKENLD_API_KEY - 检查MCP配置 — 如适用
- 提示用户 — 仅在检测失败时执行
Workflow
工作流程
Step 1: Identify What to Optimize
步骤1:确定优化方向
What's the problem? Cost, quality, speed, accuracy? How will you measure success?
存在什么问题?成本、质量、速度还是准确性?你将如何衡量成功?
Step 2: Design the Experiment
步骤2:设计实验
| Goal | What to Vary |
|---|---|
| Reduce cost | Cheaper model (e.g., gpt-4o-mini) |
| Improve quality | Better model or prompt |
| Reduce latency | Faster model, lower max_tokens |
| Increase accuracy | Different model (Claude vs GPT-4) |
| 目标 | 调整项 |
|---|---|
| 降低成本 | 更经济的模型(例如gpt-4o-mini) |
| 提升质量 | 更优模型或提示词 |
| 降低延迟 | 更快的模型、减小max_tokens值 |
| 提高准确性 | 不同模型(Claude vs GPT-4) |
Step 3: Create Variations
步骤3:创建变体
Follow API Quick Start:
POST /projects/{projectKey}/ai-configs/{configKey}/variations- Include modelConfigKey (required for UI)
- Keep everything else constant except what you're testing
遵循API快速入门:
POST /projects/{projectKey}/ai-configs/{configKey}/variations- 包含modelConfigKey(UI端必填)
- 除了要测试的内容,保持其他所有设置不变
Step 4: Set Up Targeting
步骤4:设置定向规则
Use skill to control distribution (e.g., 50/50 split for A/B test).
aiconfig-targeting使用技能控制流量分配(例如A/B测试的50/50分流)。
aiconfig-targetingStep 5: Verify
步骤5:验证
-
Fetch config:bash
GET /projects/{projectKey}/ai-configs/{configKey} -
Confirm variations exist with correct model and parameters
-
Report results:
- ✓ Variations created
- ✓ Models and parameters correct
- ⚠️ Flag any issues
-
获取配置:bash
GET /projects/{projectKey}/ai-configs/{configKey} -
确认变体存在且模型和参数正确
-
报告结果:
- ✓ 变体已创建
- ✓ 模型和参数正确
- ⚠️ 标记所有问题
modelConfigKey
modelConfigKey
Required for models to show in UI. Format: — e.g., , .
{Provider}.{model-id}OpenAI.gpt-4oAnthropic.claude-sonnet-4-5模型在UI端显示的必填项。格式: — 例如、。
{Provider}.{model-id}OpenAI.gpt-4oAnthropic.claude-sonnet-4-5What NOT to Do
注意事项
- Don't test too many things at once
- Don't forget modelConfigKey
- Don't make decisions on small sample sizes
- 不要同时测试过多内容
- 不要遗漏modelConfigKey
- 不要基于小样本量做出决策
Related Skills
相关技能
- — Create the initial config
aiconfig-create - — Control who gets which variation
aiconfig-targeting - — Refine based on learnings
aiconfig-update
- — 创建初始配置
aiconfig-create - — 控制不同变体的受众
aiconfig-targeting - — 根据测试结果优化配置
aiconfig-update
References
参考资料
- API Quick Start
- API快速入门