feat: add examples/model_drift — answer-drift gate for model migrations - #59
Closed
Therealdk8890 wants to merge 1 commit into
Closed
feat: add examples/model_drift — answer-drift gate for model migrations#59Therealdk8890 wants to merge 1 commit into
Therealdk8890 wants to merge 1 commit into
Conversation
Check whether a replacement model drifts from a soon-to-be-discontinued one on a fixed prompt set. Records the old model's answers as a golden run and the new model's as a candidate, then gates with RegressionGate + a pluggable answer-equivalence evaluator (stdlib lexical or LLM-as-judge). The LLM judge fails closed: any reply that isn't a clean [0,1] score reads as drift, so a flaky judge can't silently pass a regression. record_baseline(...) / --record-golden + --golden-db let you pin the old model's golden while it's still callable and gate against it after retirement (the old model is never re-called on the reuse path). Ships a deterministic offline FakeModelClient so the flow runs in CI with no key; the OpenAI client and its opt-in 'openai' extra are lazily imported, keeping dprovenancekit/ stdlib-only and unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Check whether a replacement model drifts from a soon-to-be-discontinued one on a fixed prompt set. Records the old model's answers as a golden run and the new model's as a candidate, then gates with RegressionGate + a pluggable answer-equivalence evaluator (stdlib lexical or LLM-as-judge). The LLM judge fails closed: any reply that isn't a clean [0,1] score reads as drift, so a flaky judge can't silently pass a regression.
record_baseline(...) / --record-golden + --golden-db let you pin the old model's golden while it's still callable and gate against it after retirement (the old model is never re-called on the reuse path). Ships a deterministic offline FakeModelClient so the flow runs in CI with no key; the OpenAI client and its opt-in 'openai' extra are lazily imported, keeping dprovenancekit/ stdlib-only and unchanged.