Skip to content
cccskills
FreePublished on GitHub

llm-campaign-drift-gate

Gate resumption of any multi-day LLM batch-scoring campaign that calls an unpinned model alias (deepseek-chat, gpt-*-latest, gemini-*-preview, any provider alias without a pinned version). Use when: (1) resuming a paused or credit-exhausted scoring run days after its last chunk, (2) topping up credits to finish a campaign, (3) extending a cached scoring pipeline with new items. Prevents silently splicing two model versions or serving revisions into one measure. Verified 2026-07-16: for $0.30 caught a serving-revision drift WITHIN DeepSeek v4-flash (same alias, same family, litigation scores systematically shifted across a 2-day gap) before an $83 resume spend.

The English summary is being prepared. Showing the original description.

See how to install

Files included (2)

  • SKILL.md5.8 KB
  • README.md4.4 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

LLM Campaign Drift Gate

Problem

Batch-scoring campaigns (exposure measures, classifiers, extraction runs) call provider aliases that can be silently repointed to a new model at any time. Resuming a half-finished campaign after the alias moves splices two different scorers into one variable, with the version boundary correlated with whatever orders the chunks (time, firm id) — a silent confound. Providers can also RETIRE the old model entirely, making the original campaign uncompletable.

Context / Trigger Conditions

  • Resuming a scoring run more than ~a day after its last paid chunk
  • "Top up credits and finish the run" requests
  • Any incremental scoring against an existing response cache
  • Symptom of a missed gate: a step-change in scores at a resume boundary

Solution

Before ANY production spend on resume, run a two-part gate (~$0.30–2):

  1. Canary (the decisive check): sample ~100 already-cached items, re-send their EXACT stored prompts fresh, compare fresh vs cached scores. Gate: ≥97% all-field exact match and no systematic directional shift. Write the comparison in a standalone script — never through the pipeline's cache layer, which would overwrite production entries.
  2. Gold re-validation: re-score the gold/validation panel fresh and compare agreement metrics to the prior validation (e.g. median F1/κ within ~0.03, no domain dropping >0.10).

Also capture response.model on every gate call — pipelines rarely store it, and it is the only direct evidence of a repoint. Check the provider's /models endpoint: if the old model id is gone, no rollback exists.

  1. If the canary fails, diagnose BEFORE concluding — two mandatory follow-ups:
    • Date the suspected flip against the provider's changelog before inferring a model splice. response.model on fresh calls identifies today's model only; if the alias already pointed there when the cache was written, there is no family splice and the mismatch needs another explanation. (Verified failure mode: an alias that had served the "new" model for months was misread as a fresh repoint.)
    • Fresh-vs-fresh canary to separate serving drift from temperature-0 nondeterminism: re-score the same items a second time. Drift signature = fresh2-vs-fresh1 agreement high and symmetric while both fresh runs disagree with the cache at a higher rate in the SAME signed direction. Noise signature = fresh-vs-fresh disagrees about as much as fresh-vs-cache, with no directional bias.
    • Supporting forensic: compare raw-response formatting fingerprints (JSON pretty/compact ratio, key order) between cache and fresh — a heterogeneous or shifted style distribution corroborates a serving change when no model id was recorded.

Key subtlety (why both checks): a new model or revision can validate AGAINST GOLD as well as the old one (κ holds or improves) while still disagreeing with the old scores on 10–30% of items, concentrated in borderline-heavy fields. Gold agreement does not license splicing — the gate fails on the canary alone. And alias stability is not serving stability: the same alias serving the same model family can still drift across days via silent serving revisions; a canary-failed resume is a seam either way, and the decision (resume with a documented seam vs re-score the universe) belongs to the budget owner.

Verification

The gate script logs: fresh response.model ids, canary exact-match rate, per-field mismatch counts with signed direction, and the gold-metric deltas. GO only if both checks pass.

Example

T1 exposure_v2 resume, 2026-07-16: canary returned 71% exact (gate ≥97%) with a litigation-concentrated negative shift, yet holdout median κ improved 0.607→0.644. First interpretation — "alias repointed to a new model family" — was WRONG: the provider changelog showed deepseek-chat had served v4-flash since April, months before the campaign. The fresh-vs-fresh follow-up then isolated the true cause: fresh2-vs-fresh1 93% exact/symmetric/litigation 0, both fresh runs vs cache 71–72% with litigation −12 identically — a serving revision within the same model across a 2-day gap, corroborated by a shifted JSON-formatting fingerprint. Total diagnosis cost ~$0.30; the resume-vs-rescore decision went to the budget owner with the seam quantified.

Notes

  • Design campaigns for this failure: per-response content-addressed cache + append-only checkpoint makes "re-score everything under the new model" a clean cache-rotation, not a data loss.
  • If the cache key embeds the alias string rather than the resolved model, record actual response.model in run reports — the cache cannot tell you later which model produced an entry.
  • One campaign = one model. Budget and schedule so the universe completes within days, or accept that a provider release can force a full re-score.
  • See also: [llm-gold-bound-failure-check] for the companion pre-campaign check — whether a validation-gate failure is fixable by prompt at all, or bound to the gold construct.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Build human adjudication / hand-labeling sheets from LLM-pipeline data without evidence truncation. Use when: (1) preparing a CSV/Excel sheet for a human to rule on cases an LLM classifier or rater panel judged, (2) a labeler reports "there is no information to label from" or cells look empty in Excel, (3) excerpt columns cluster at one exact length (e.g. all 1,500 chars — a hard truncation cap). Covers: full rating-basis recovery, Excel 32,767-char cell cap, multi-line CSV mangling, ruling dropdowns, companion text files.

The English summary is being prepared. Showing the original description.

kennethkhoocy/applied-micro-skills20Updated Sep 5, 2026

N-round adversarial review pipeline for empirical research output — the chain from data to LaTeX tables to a manuscript that cites them. A Claude drafter proposes minimal diffs, a deterministic mechanical battery gates every diff from a clean state with a regression gate, a Codex reviewer files check-backed critiques, and a blind judge panel decides residual disputes. Manual-invoke ONLY: trigger when the user explicitly runs /adversarial-empirical-review or names 'adversarial-empirical-review' / 'adversarial empirical review'. Do NOT auto-trigger on generic 'review my results', 'check my tables', or manuscript-editing requests. For prose-style refinement use style-emulation instead; this skill AUDITS WHETHER THE TABLES ARE CORRECT — that each number in the tables is what the analysis code computes, reproduces from the data, and is internally consistent. It is an empirical + code review: the manuscript is read only to resolve table numbering, and prose is not examined.

The English summary is being prepared. Showing the original description.

kennethkhoocy/applied-micro-skills20Updated Sep 5, 2026

Before designing, training, or auditing ANY model that replicates human-annotated labels, audit the annotation protocol's INPUT — the exact document/evidence the human labelers consulted — and give the model that same input. Use when: (1) designing a classifier/LLM extractor whose target is a hand-coded label set, (2) a label-replication model shows low recall concentrated in a label subset and the diagnosis on offer is "the label's information is not in the features", (3) reviewers propose construct splits (e.g. "designation vs record-evident"), adjudication sittings, or per-domain stop rules to explain residual disagreement with gold, (4) validating an extraction pipeline against labels transcribed from a source document. Symptom of the underlying failure: elaborate theory accumulates to explain why gold is "partially unpredictable" when the model was simply never shown the document the annotators read.

The English summary is being prepared. Showing the original description.

kennethkhoocy/applied-micro-skills20Updated Sep 5, 2026

Raise real concurrency in asyncio LLM batch scorers built on the OpenAI SDK (AsyncOpenAI, including OpenAI-compatible providers like DeepSeek). Use when: (1) raising an asyncio.Semaphore above ~100 produces no throughput gain, (2) a batch pipeline saturates near 100 in-flight requests despite a larger semaphore, (3) planning a high-concurrency campaign against a provider with no hard rate limit (DeepSeek v4-flash tolerates 2000+ in flight). Root cause: AsyncOpenAI's default httpx pool caps max_connections at 100, silently bottlenecking any larger semaphore — you must pass a custom http_client with httpx.Limits sized to the semaphore.

The English summary is being prepared. Showing the original description.

kennethkhoocy/applied-micro-skills20Updated Sep 5, 2026

Place pre-screened literature citations into a LaTeX or Word manuscript, or restyle the citations already in one. Three modes: (1) inline placement — inline \cite{}/\citet{}/\citep{} with a compiled references.bib, for author-date journals (APA, MLA, Harvard, Chicago author-date, IEEE, Vancouver); (2) footnote placement — full formatted \footnote{} or OOXML footnotes for legal and notes styles (Bluebook, OSCOLA, Chicago, APA, McGill) with Id./supra short forms; (3) restyle — convert existing footnote citations from one style to another. This skill is manual-invoke ONLY — trigger ONLY when the user explicitly runs /cite-placement or explicitly names the "cite-placement" skill. Do NOT auto-trigger on general citation, footnote, or reference requests.

The English summary is being prepared. Showing the original description.

kennethkhoocy/applied-micro-skills20Updated Sep 5, 2026

Download the actual PDF binary from bot-gated sites (taxpolicycenter.org, urban.org, SSRN-hosted mirrors, think-tank/publisher sites) via the Wayback Machine id_ URL form. Use when: (1) curl/WebFetch of a .pdf URL returns HTML instead of a PDF even with a browser User-Agent, (2) pypdf fails with "invalid pdf header: b'<!DOC'" or "EOF marker not found" on a freshly downloaded file, (3) Firecrawl can parse the PDF to markdown but you need the original file on disk (e.g., filing a reference copy).

The English summary is being prepared. Showing the original description.

kennethkhoocy/applied-micro-skills20Updated Sep 5, 2026

See all skills by kennethkhoocy

Report a problem with this skill