Add boxoffice-signal-ml-starter: predicting outcomes from public conversation with Cortex AISQL - #289
Open
snowflake-mike-MKTG-IND wants to merge 1 commit into
Conversation
A method kit for predicting a commercial outcome from public pre-release
conversation, guided end to end by Cortex Code. Built around Cortex AISQL intent
scoring rather than sentiment counting, with the leakage controls that make the
result trustworthy.
What it demonstrates:
* AISQL sentiment + 4-label viewing intent in one consolidated TRY_COMPLETE
call, plus an evaluation harness (macro-F1, per-class confusion) for the
classifier itself
* as-of feature engineering: demand percentiles at -21/-14/-7/-3 day horizons
where no feature can see past its own prediction date, with tripwires that
catch it when the filter breaks
* a distributional regressor (CatBoost + ElasticNet, residual-mixture
intervals, calibrated demand-forward flag) under strict walk-forward
temporal validation
* pedigree features gated behind demand so the model cannot lean on hype the
audience is not backing
Runs with no data and no Snowflake connection via `--sample`, so a contributor
can verify the environment in ten minutes before wiring up any source.
No data is included and no provider is named or endorsed: the sources/ dossiers
describe each signal by its characteristics and CoCo helps the user evaluate
options against their own access and terms. Keys live only in a git-ignored
.env, and comment author handles are pseudonymized on ingest.
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.
Summary
Adds
samples/boxoffice-signal-ml-starter— a method kit for predicting a commercial outcome from public pre-release conversation, guided end to end by Cortex Code. The worked example is opening-weekend box office, but the pattern applies anywhere public conversation precedes a commercial outcome (game launches, product releases, ticketed events).The interesting part is not the domain, it's the discipline around the AI:
TRY_COMPLETEcall classifies each comment into four viewing-intent labels. Independent per-label yes/no calls over-fire — that lesson is baked into the prompt and documented.sql/30_intent_eval.sql): macro-F1 plus a per-class confusion matrix against hand labels. On the reference build, the production scorer measured macro-F1 0.65 while a revised prompt reached 0.85 on the same labels — a gap that is invisible from reading output.sql/10that catch it when the filter silently breaks.Runs in ten minutes with no data
cd samples/boxoffice-signal-ml-starter pip install -r model/requirements.txt python model/train_ow_model.py --sampleSynthetic data, no Snowflake connection required — a reviewer can verify the modeling path end to end before wiring up any source.
Data, terms, and privacy
No data is included and no provider is named or endorsed. The
sources/dossiers describe each signal by its characteristics — behavior, access patterns, known failure modes — and CoCo helps the user evaluate options against their own access and each provider's terms. Keys live only in a git-ignored.env(template included, names only), and comment author handles are pseudonymized on ingest.Checklist
samples/with a kebab-case nameREADME.mdwith what it does, prerequisites, and how to run it--sampleruns clean from inside the sample directory