configs-variations

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Config Variations

配置变体

You're using a skill that will guide you through testing and optimizing configs through variations. Your job is to design experiments, create variations, and systematically find what works best.
你正在使用一项技能,它将引导你通过变体测试和优化配置。你的任务是设计实验、创建变体,并系统性地找到最优方案。

Prerequisites

前提条件

This skill requires the remotely hosted LaunchDarkly MCP server to be configured in your environment.
Primary MCP tool:
  • clone-ai-config-variation
    -- clone a baseline variation with selective overrides (recommended for experimentation)
Alternative MCP tools (for more control):
  • get-ai-config
    -- review existing variations before adding new ones
  • create-ai-config-variation
    -- create new variations from scratch
Optional MCP tools:
  • update-ai-config-variation
    -- refine a variation after creation
  • delete-ai-config-variation
    -- remove variations that didn't work out
使用此技能需要在环境中配置远程托管的LaunchDarkly MCP服务器。
主要MCP工具:
  • clone-ai-config-variation
    -- 克隆基准变体并选择性覆盖配置(推荐用于实验)
备选MCP工具(用于更多控制):
  • get-ai-config
    -- 在添加新变体前查看现有变体
  • create-ai-config-variation
    -- 从头创建新变体
可选MCP工具:
  • update-ai-config-variation
    -- 创建后优化变体
  • delete-ai-config-variation
    -- 删除效果不佳的变体

Core Principles

核心原则

  1. Test One Thing at a Time: Change model OR prompt OR parameters, not all at once
  2. Have a Hypothesis: Know what you're trying to improve
  3. Measure Results: Use metrics to compare variations
  4. Verify via Tool: The agent fetches the config to confirm variations exist
  1. 一次只测试一项内容:仅更改模型、提示词或参数中的一项,而非全部
  2. 提出假设:明确你想要改进的方向
  3. 衡量结果:使用指标对比不同变体
  4. 通过工具验证:Agent会获取配置以确认变体存在

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:设计实验

GoalWhat to Vary
Reduce costCheaper model (e.g.,
gpt-4o-mini
)
Improve qualityBetter model or more detailed prompt
Reduce latencyFaster model, lower
max_tokens
Increase accuracyDifferent model family (Claude vs GPT-4)
目标测试变量
降低成本更经济的模型(例如:
gpt-4o-mini
提升质量更优模型或更详细的提示词
降低延迟更快的模型、更小的
max_tokens
提高准确性不同模型系列(Claude vs GPT-4)

Step 3: Create Variations (Recommended: Clone with Overrides)

步骤3:创建变体(推荐:克隆并覆盖)

Use
clone-ai-config-variation
to duplicate the baseline and override only what you're testing. The tool reads the source variation, merges your overrides, and creates the new variation. Everything you don't pass is inherited from the source automatically.
Required fields:
  • sourceVariationKey
    -- the baseline to clone from
  • key
    and
    name
    -- identifiers for the new variation (e.g.,
    gpt4o-mini-cost-test
    )
Override ONLY the fields you are testing. Leave all other fields unset -- do not pass them even if you know their current values. The clone tool inherits them from the source. This enforces the one-variable-at-a-time principle:
  • Testing a cheaper model? Pass only
    modelConfigKey
    and
    modelName
    . Do NOT pass
    instructions
    ,
    messages
    , or
    parameters
    .
  • Testing different instructions? Pass only
    instructions
    . Do NOT pass
    modelConfigKey
    or
    modelName
    .
  • Testing a parameter? Pass only
    parameters
    . Do NOT pass model or prompt fields.
The response returns both the source and created variation, so you can immediately verify the diff.
使用
clone-ai-config-variation
复制基准配置,仅覆盖你要测试的内容。该工具会读取源变体,合并你的覆盖配置,然后创建新变体。所有未传入的字段将自动从源变体继承。
必填字段:
  • sourceVariationKey
    -- 要克隆的基准变体
  • key
    name
    -- 新变体的标识(例如:
    gpt4o-mini-cost-test
仅覆盖你要测试的字段。保留所有其他字段为空——即使你知道它们当前的值也不要传入。克隆工具会自动从源变体继承这些字段,这能确保“一次只测试一项变量”的原则:
  • 测试更经济的模型?仅传入
    modelConfigKey
    modelName
    。不要传入
    instructions
    messages
    parameters
  • 测试不同的指令?仅传入
    instructions
    。不要传入
    modelConfigKey
    modelName
  • 测试参数?仅传入
    parameters
    。不要传入模型或提示词相关字段。
响应会同时返回源变体和新创建的变体,你可以立即验证差异。

Step 3 (Alternative): Create from Scratch

步骤3(备选方案):从头创建

If you need full control, use
get-ai-config
first to review the current state, then
create-ai-config-variation
with all fields specified manually. Always fetch before creating so you understand the existing config's mode, model, and parameters.
如果你需要完全控制,先使用
get-ai-config
查看当前状态,再手动指定所有字段使用
create-ai-config-variation
创建。创建前务必先获取配置,以便了解现有配置的模式、模型和参数。

Step 4: Verify

步骤4:验证

If you used
clone-ai-config-variation
, the response includes both source and created variations for immediate comparison. Otherwise, use
get-ai-config
to confirm.
Report results:
  • Variations created with correct models and parameters
  • Only the intended variable differs between variations
  • Flag any issues
Note on API responses: After calling a creation or clone tool, treat a successful response as confirmation that the operation succeeded. The API response may not echo back every field you sent (e.g., model fields may show defaults). Do not retry or assume failure based on response field values alone -- verify with
get-ai-config
if needed.
如果你使用了
clone-ai-config-variation
,响应会包含源变体和新创建的变体,可直接对比。否则,使用
get-ai-config
确认。
结果报告:
  • 创建的变体具有正确的模型和参数
  • 变体间仅存在预期的变量差异
  • 标记任何问题
**API响应注意事项:**调用创建或克隆工具后,成功响应即表示操作完成。API响应可能不会回显你发送的每个字段(例如:模型字段可能显示默认值)。不要仅根据响应字段值就重试或假设操作失败——如有需要,使用
get-ai-config
验证。

modelConfigKey Format

modelConfigKey格式

Required for models to display in the UI. Format:
{Provider}.{model-id}
:
  • OpenAI.gpt-4o
    ,
    OpenAI.gpt-4o-mini
  • Anthropic.claude-sonnet-4-5
    ,
    Anthropic.claude-3-5-sonnet
模型要在UI中显示必须遵循此格式:
{Provider}.{model-id}
  • OpenAI.gpt-4o
    ,
    OpenAI.gpt-4o-mini
  • Anthropic.claude-sonnet-4-5
    ,
    Anthropic.claude-3-5-sonnet

Safety: Protect the Baseline

安全注意事项:保护基准配置

When the user wants to try a different model, prompt, or parameters, always create a new variation alongside the baseline. Never modify or delete the existing baseline variation. This applies even if the user says "replace" or "switch" -- the correct action is to create a new variation and let targeting/rollouts control traffic, not to edit the original.
  • Use
    clone-ai-config-variation
    or
    create-ai-config-variation
    to add the new variation
  • Do NOT use
    update-ai-config-variation
    on the baseline to change its model or instructions
  • Do NOT use
    delete-ai-config-variation
    on the baseline
  • Explain to the user that keeping the baseline enables comparison and safe rollback
当用户想要尝试不同的模型、提示词或参数时,务必在基准配置旁创建新变体。绝不要修改或删除现有的基准变体。即使用户要求“替换”或“切换”,正确的操作也是创建新变体,通过目标定位/灰度发布控制流量,而非编辑原始配置。
  • 使用
    clone-ai-config-variation
    create-ai-config-variation
    添加新变体
  • 不要对基准配置使用
    update-ai-config-variation
    来更改其模型或指令
  • 不要对基准配置使用
    delete-ai-config-variation
  • 向用户解释保留基准配置可以实现对比和安全回滚

What NOT to Do

禁止操作

  • Don't test too many things at once -- change one variable per variation
  • Don't pass unchanged fields when cloning -- let the tool inherit them from the source
  • Don't forget modelConfigKey (variations without it show as "NO MODEL" in the UI)
  • Don't make decisions on small sample sizes
  • Don't modify or remove the baseline variation -- create new variations alongside it
  • Don't use
    update-ai-config-variation
    to "replace" a baseline -- create a new variation instead
  • 不要同时测试过多内容——每个变体仅更改一项变量
  • 克隆时不要传入未更改的字段——让工具从源变体继承
  • 不要忘记modelConfigKey(缺少该字段的变体在UI中会显示为“NO MODEL”)
  • 不要基于小样本量做决策
  • 不要修改或删除基准配置——在其旁创建新变体
  • 不要使用
    update-ai-config-variation
    “替换”基准配置——应创建新变体

Related Skills

相关技能

  • configs-create
    -- Create the initial config
  • configs-update
    -- Refine based on learnings
  • configs-create
    -- 创建初始配置
  • configs-update
    -- 根据经验优化配置