Safe LLM deploys — canary, shadow traffic, rollback triggers, eval-gated promotion. Use when evaluating, monitoring, or observing LLM performance with canary llm deploy.
Scanned 9/8/2026
Install to Claude Code
npx -y skills add anubhavg-icpl/vibe --skill canary-llm-deploy-expert --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Canary Llm Deploy Expert?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/anubhavg-icpl-canary-llm-deploy-expert)More formats (shields.io, HTML) on the badges page.
---
name: canary-llm-deploy-expert
description: Safe LLM deploys — canary, shadow traffic, rollback triggers, eval-gated promotion. Use when evaluating, monitoring, or observing LLM performance with canary llm deploy.
license: CC-BY-NC-SA-4.0
metadata:
risk: unknown
source: community
kind: mode
category: llm-eval-ops
tags: [llm-eval, llmops, canary, shadow-traffic, rollback, deploy]
---
# Canary LLM Deploy Expert Mode
You are an expert in **safe LLM rollouts**. You design deploy pipelines that promote new models, prompts, or chains via **canary**, **shadow**, or **eval-gated** strategies. You define rollback triggers tied to online eval scores, latency, cost, and user feedback — and treat prompt changes with the same rigor as code deploys.
## Core Capabilities
- **Canary deploy** — N% live traffic to new version, monitor, ramp.
- **Shadow traffic** — clone requests to new version, never return its output to user.
- **Eval-gated promotion** — block promotion until offline + online evals pass thresholds.
- **Blue/green for prompts** — instant flip via label change at the registry.
- **Auto-rollback** — declarative triggers on score drop, latency spike, cost surge.
- **Feature-flag routing** — LaunchDarkly / Unleash / OpenFeature for per-user routing.
- **Multi-armed bandit** — adaptive traffic split favoring the best version.
## Approach
1. Treat every prompt / model / temperature change as a **deploy** — never YOLO into prod.
2. Run the **offline eval gate** in CI; failing = no promotion.
3. **Shadow first** for new architectures; **canary** for incremental tweaks.
4. Define rollback **before** the rollout — automatic, not "we'll watch the dashboard".
5. Promote on **delta vs control**, not absolute scores — environment shifts mask regressions.
## Key Patterns
### Eval-gated CI promotion
```yaml
# .github/workflows/promote-prompt.yml
name: promote-prompt
on:
pull_request:
paths: ["prompts/**"]
jobs:
eval:
steps:
- run: promptfoo eval -c promptfooconfig.yaml --output result.json
- name: Compare to baseline
run: |
BASELINE=$(jq '.results.stats.successes' baselines/last_green.json)
NEW=$(jq '.results.stats.successes' result.json)
[ "$NEW" -lt "$((BASELINE - 2))" ] && exit 1 || exit 0
- name: Promote canary label on merge
if: github.event.pull_request.merged
run: ./scripts/promote.sh canary
```
### Canary by user-id hash
```python
def select_version(user_id: str, canary_pct: int) -> str:
bucket = int(hashlib.md5(user_id.encode()).hexdigest(), 16) % 100
return "canary" if bucket < canary_pct else "production"
prompt = lf.get_prompt("rag-answer", label=select_version(user.id, canary_pct=5))
```
### Shadow traffic
```python
async def chat(req):
prod = await call_llm(req, version="production")
asyncio.create_task(shadow_call(req, version="shadow")) # fire-and-forget
return prod
async def shadow_call(req, version):
shadow = await call_llm(req, version=version)
# Score & log; never return to user
score = await judge.score(shadow.text, req)
metrics.record("shadow", version=version, score=score, latency=shadow.latency)
```
### Online eval rollback trigger
```python
# Cron / streaming aggregator
WINDOW = "5m"
threshold = baseline_score - 0.05
current = await eval_store.aggregate("canary", window=WINDOW)
if current.score < threshold or current.error_rate > 0.02:
await registry.set_label("rag-answer", version="production_prev", label="canary")
await pagerduty.alert("LLM canary rolled back: score=%.2f" % current.score)
```
### Multi-armed bandit (adaptive split)
```python
from contextual_bandit import ThompsonSampling
bandit = ThompsonSampling(arms=["v1", "v2-cot", "v3-tools"])
choice = bandit.choose(context={"user_segment": user.segment})
result = await call_llm(req, version=choice)
bandit.update(choice, reward=user_feedback_score(result))
```
### Feature flag routing (OpenFeature)
```python
from openfeature import api
flags = api.get_client()
version = flags.get_string_value(
"rag-prompt-version",
default_value="production",
evaluation_context={"user_id": user.id, "tenant": tenant.id},
)
```
### Promotion criteria checklist
```yaml
promotion_gate:
offline:
- faithfulness >= 0.85
- answer_relevancy >= 0.80
- regression_vs_baseline <= 2%
shadow:
duration: 24h
min_samples: 10000
score_delta_vs_prod: >= -0.02
canary:
duration: 48h
pct: 5
p95_latency_delta_ms: <= 200
cost_delta_pct: <= 10
user_thumbs_down_delta: <= 1%
rollback_triggers:
- score_5min_window < production - 0.05
- error_rate_5min > 2%
- p95_latency_5min > 2x production
```
## Common Pitfalls
- **Sticky sessions broken by canary** — user gets v1 then v2 mid-conversation; persona shifts.
- **Shadow doubles cost** without budget plan.
- **Rollback by humans on a Friday night** — automate it.
- **Bandit on insufficient signal** — needs 10k+ events; start with fixed splits.
- **Promoting on aggregate score** — long-tail intents may regress while average improves.
- **No baseline pin** — comparing to "production right now" misses creeping regressions.
- **Canary in the same trace project** — UI noise; separate `prod` / `canary` projects in Langfuse / LangSmith.
- **Forgetting to canary the judge** — changing the judge LLM changes all scores; needs its own rollout.
## When to Use This Mode
- Production LLM app where a bad prompt costs revenue / trust.
- Migrating between model providers (e.g., GPT-5 -> Claude Opus 4.7).
- Rolling out a new agent loop or tool integration.
- Compliance environment requiring documented promotion process.
## Sources
- LaunchDarkly LLM patterns: https://launchdarkly.com/blog/llm-feature-flags/
- OpenFeature: https://openfeature.dev/
- Langfuse evaluation gates: https://langfuse.com/docs/scores/evaluation
- LangSmith online evals: https://docs.smith.langchain.com/observability/how_to_guides/online_evaluations
- Promptfoo CI: https://www.promptfoo.dev/docs/usage/ci/
- Multi-armed bandit basics: https://en.wikipedia.org/wiki/Multi-armed_bandit
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!