Skip to content

Commit d35fdb4

Browse files
authored
Merge pull request #33 from comet-ml/aswynz/OPIK-7470/vendor-opik-verify
Vendor opik-verify: bump CANON_REF to opik-mcp main after #200
2 parents a39bfba + 9843278 commit d35fdb4

8 files changed

Lines changed: 185 additions & 12 deletions

File tree

‎.claude-plugin/plugin.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "opik",
3-
"version": "0.4.0",
4-
"description": "Opik tracing for Claude Code sessions, plus the Opik agent skills: instrument, diagnose, explain, test, compare, evaluate, online-eval, optimize",
3+
"version": "0.5.0",
4+
"description": "Opik tracing for Claude Code sessions, plus the Opik agent skills: instrument, diagnose, explain, test, compare, evaluate, verify, online-eval, optimize",
55
"author": {
66
"name": "Comet ML",
77
"url": "https://comet.com"

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ The plugin ships the Opik skill pack — the same skills published as [`opik-ski
190190
| `opik-evaluate` | "evaluate my agent", "build an eval", "write an LLM judge" |
191191
| `opik-online-eval` | "score production traces", "take this judge live" |
192192
| `opik-optimize` | "optimize this prompt", "run the prompt optimizer" |
193+
| `opik-verify` | "is this safe to ship", "go/no-go on this change" |
193194

194195
They are vendored at a pinned `opik-mcp` commit (see `skills/SHARED.md`); edit them upstream, not here.
195196

‎scripts/sync-shared-skills.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
set -euo pipefail
1313

1414
CANON_REPO="${CANON_REPO:-https://github.com/comet-ml/opik-mcp.git}"
15-
CANON_REF="${CANON_REF:-0baa5aecf0224701473efd968be4aa5a166ba99f}" # opik-mcp main after #191 (nine skills)
15+
CANON_REF="${CANON_REF:-8fb9c4b09f8854581e7b34a37049773f5fedd869}" # opik-mcp main after #200 (ten skills)
1616
SRC="src/opik_mcp/skills"
1717
DEST="skills"
1818
# Every skill the pack ships. Order matches the published index.
19-
SHARED=(opik opik-compare opik-diagnose opik-evaluate opik-explain opik-instrument opik-online-eval opik-optimize opik-test)
19+
SHARED=(opik opik-compare opik-diagnose opik-evaluate opik-explain opik-instrument opik-online-eval opik-optimize opik-test opik-verify)
2020

2121
tmp="$(mktemp -d)"
2222
trap 'rm -rf "$tmp"' EXIT

‎skills/opik-compare/SKILL.md‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: opik-compare
3-
description: Run a candidate against the baseline over an Opik test suite and read the numbers back — which cases broke, which got fixed, the per-metric deltas, worst rows, and whether the two runs are comparable — with the Opik compare-view link. Runs via the SDK; reads results via the MCP when connected. Does not issue a ship/no-ship verdict. Use for "did my fix work", "compare against the baseline", "run the regression suite", "why did quality drop", "which cases regressed", "compare these two experiments". Not for live production triage (use diagnose), building an evaluation from scratch (use evaluate), or capturing a single case (use test).
3+
description: Run a candidate against the baseline over an Opik test suite and read the numbers back — which cases broke, which got fixed, the per-metric deltas, worst rows, and whether the two runs are comparable — with the Opik compare-view link. Runs via the SDK; reads results via the MCP when connected. Does not issue a ship/no-ship verdict. Use for "did my fix work", "compare against the baseline", "run the regression suite", "why did quality drop", "which cases regressed", "compare these two experiments". Not for the ship/hold decision itself (use verify), live production triage (use diagnose), building an evaluation from scratch (use evaluate), or capturing a single case (use test).
44
compatibility: Tested with Claude Code; works with any Agent Skills-compatible host (Cursor, VS Code Copilot, Codex). Requires a Python or TypeScript project with Opik configured and a test suite (from the test or evaluate skill) or two existing experiments. Install the `opik` skill alongside this one — it holds the shared test-suite and experiment references; without it, this skill falls back to the public docs.
55
allowed-tools:
66
- Read
@@ -69,6 +69,7 @@ result = opik.run_tests(
6969
experiment_name="candidate-<sha>",
7070
experiment_tags=["compare", "<sha>"],
7171
model="<same judge model as baseline>",
72+
generate_report=False, # default True writes opik_test_suite_reports/ into cwd — the repo stays untouched
7273
)
7374
candidate_id = result.experiment_id # result.experiment_url is the single-run link
7475

@@ -109,7 +110,7 @@ rows = client.get_experiments_client().find_experiment_items_for_dataset(
109110
8. **Flaky cases** — items that flip across repeated runs of the *same* code (the suite's execution policy exposes `runs_passed`/`runs_total`).
110111
9. **Trend** — when more than two runs exist, the pass rate across the last few, so a one-step delta has context.
111112

112-
Report what the numbers say. **Do not decide ship or hold** — that decision has its own policy and is a later step.
113+
Report what the numbers say. **Do not decide ship or hold** — that is `/opik-verify`, which applies an explicit release policy to these numbers.
113114

114115
### 6. Link and hand off
115116
Build the compare link with **both** ids — a URL-encoded JSON array — so the user lands on the side-by-side view:
@@ -118,7 +119,7 @@ import json, urllib.parse
118119
ids = urllib.parse.quote(json.dumps(["<baseline_id>", candidate_id]))
119120
compare_url = f"{ui_base}/{workspace}/experiments/{suite.id}/compare?experiments={ids}"
120121
```
121-
`ui_base` is the Opik UI origin (the configured URL minus `/api`; `result.experiment_url` shows the exact host and workspace to reuse). Then one next step (see **Output**).
122+
`ui_base` is the Opik UI origin (the configured URL minus `/api`; `result.experiment_url` shows the exact host and workspace to reuse). Then one next step (see **Output**) — when the user's question is whether to ship, that step is `/opik-verify`.
122123

123124
### 7. Record (only when asked)
124125
If the user wants the finding kept beside the data: a comment on a regressed case's trace via `client.rest_client.traces.add_trace_comment(trace_id, text=…)`, or a human score beside the judge's via `client.log_traces_feedback_scores([...])`. Never by default.

‎skills/opik-evaluate/SKILL.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: opik-evaluate
3-
description: Build an LLM evaluation and run it against the app, returning an Opik experiment with scores and its link. Picks a test suite with judge assertions or a dataset with metrics, sources cases from traces or synthetic data, scores heuristics-first then one-failure-mode judges, runs client-side via the SDK or server-side for prompt-only targets, and reads the scores back. Covers RAG evaluation, error analysis, and validating a judge against human labels. Use for "evaluate my agent", "measure quality", "build an eval", "write an LLM judge", "how good is my RAG", "set up evals for this". Not for before/after on an existing suite (use compare), one regression case (use test), or scoring production traffic (use online-eval).
3+
description: Build an LLM evaluation and run it against the app, returning an Opik experiment with scores and its link. Picks a test suite with judge assertions or a dataset with metrics, sources cases from traces or synthetic data, scores heuristics-first then one-failure-mode judges, runs client-side via the SDK or server-side for prompt-only targets, and reads the scores back. Covers RAG evaluation, error analysis, writing and validating LLM judges against human labels, and auditing an existing eval pipeline. Use for "evaluate my agent", "measure quality", "build an eval", "write an LLM judge for hallucinations", "audit our evaluation pipeline", "how good is my RAG", "set up evals for this". Not for before/after on an existing suite (use compare), one regression case (use test), scoring production traffic (use online-eval), or the ship/hold decision (use verify).
44
compatibility: Tested with Claude Code; works with any Agent Skills-compatible host (Cursor, VS Code Copilot, Codex). Requires a Python or TypeScript project with Opik configured. Install the `opik` skill alongside this one — it holds the shared test-suite, dataset, and metric references; without it, this skill falls back to the public docs.
55
allowed-tools:
66
- Read
@@ -74,7 +74,8 @@ Write the task adapter as a temp file **outside the repo** (needs the app's prov
7474
```python
7575
# Test suite
7676
results = opik.run_tests(test_suite=suite, task=lambda item: {"input": item["input"], "output": str(app(item["input"]))},
77-
experiment_name="baseline-<sha>", model="<judge model>")
77+
experiment_name="baseline-<sha>", model="<judge model>",
78+
generate_report=False) # default True writes opik_test_suite_reports/ into cwd — keep the repo clean
7879
# Dataset
7980
from opik.evaluation import evaluate
8081
res = evaluate(dataset=dataset, task=task, scoring_metrics=[...], experiment_name="baseline-<sha>",

‎skills/opik-optimize/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ dataset = client.get_dataset(name="<dataset>", project_name="<project>")
5454

5555
### 3. Define the metric
5656
A function `(dataset_item, llm_output) -> float`, higher is better. **Give it a real name** (`def refund_answer_similarity(...)`) — its `__name__` becomes the Optimization run's objective name in the UI and `result.metric_name`; a function called `metric` shows up as "metric".
57-
- `expected_output` present → heuristic (`LevenshteinRatio`, `Equals`, or a task-specific check) — deterministic and free.
57+
- `expected_output` present → heuristic (`LevenshteinRatio`, `Equals`, or a task-specific check) — deterministic and free. Prefer a **graded** metric over exact match: when the baseline scores 0.0 on every item (observed with `Equals` on a strict output format), every candidate also scores 0.0 and the optimizer has nothing to climb — five trials of flat zeros is a metric problem, not a prompt problem.
5858
- Otherwise → **one** binary judge for the failure mode being optimized (`../opik-evaluate/references/write-judge-prompt.md`), wrapped to return its score `.value`. Multi-objective → `MultiMetricObjective`.
5959
Never optimize against a judge nobody validated: an unvalidated judge is the easiest thing to overfit.
6060

0 commit comments

Comments
 (0)