Head-to-head prompt diff
aa608c898bb5 → 043fa3fcfd52
| aa608c898bb5 | 043fa3fcfd52 | ||||
|---|---|---|---|---|---|
| f | 1 | # Head-to-head football report | f | 1 | # Head-to-head football report |
| 2 | 2 | ||||
| n | 3 | Prepare a fixture-specific prediction by grounding the analysis in the two current team scorecards, | n | 3 | Produce a fixture-specific 1X2 prediction in three strictly separated layers: |
| > | then adding match-context that does **not** belong in those scorecards. | ||||
| 4 | 4 | ||||
| n | 5 | Scorecards are team-level snapshots. They should be updated first, but they should remain about each | n | 5 | 1. **Recorded facts** — deterministic data retrieved from the local stats ledger via `football-model |
| > | team's baseline state rather than this specific opponent. The head-to-head report is where opponent | > | stats h2h-card`, included verbatim. Code computes these; you do not. | ||
| > | interaction, venue, market, and matchup-specific reasoning live. | ||||
| 6 | 2. **Model baseline** — your own W/D/L probabilities built from the team scorecards plus odds-free f | ||||
| > | ixture context, frozen **before** you see any market price. | ||||
| 7 | 3. **Market comparison** — odds, implied probabilities, and value assessment, strictly downstream of | ||||
| > | the frozen baseline. | ||||
| 8 | |||||
| 9 | The order exists because market prices anchor whatever they touch. The baseline must be your indepen | ||||
| > | dent estimate of the match; the market is what you compare that estimate against afterwards. A predi | ||||
| > | ction whose "model" probabilities were back-solved from odds measures nothing and can never reveal a | ||||
| > | n edge. | ||||
| 6 | 10 | ||||
| 7 | ## Required order | 11 | ## Required order | ||
| 8 | 12 | ||||
| 9 | 1. Read `instruction-updating` and this `instruction-head-to-head` document. | 13 | 1. Read `instruction-updating` and this `instruction-head-to-head` document. | ||
| n | 10 | 2. Read both team scorecards. | n | 14 | 2. Read both team scorecards. They must already be updated for this run under `instruction-updating` |
| > | ; refresh them first if current evidence has moved a team's baseline state. | ||||
| 11 | 3. Refresh each team scorecard under `instruction-updating` if current evidence has changed the team | 15 | 3. Generate the recorded-stats card: | ||
| > | 's baseline state. | ||||
| 16 | |||||
| 17 | ``` | ||||
| 18 | football-model stats h2h-card --team1 "<team1>" --team2 "<team2>" --event-date <YYYY-MM-DD> | ||||
| 19 | ``` | ||||
| 20 | |||||
| 21 | This card is the **only** permitted source for recorded H2H meetings, recorded form counts, rest | ||||
| > | days, and the quant reference. Where it says "none recorded", that data does not exist for this run | ||||
| > | — do not substitute remembered results or invent any. Record any results you have separately verifie | ||||
| > | d with `football-model stats record-result` first, then regenerate the card. | ||||
| 22 | 4. Research fixture-specific context **without odds**: venue and neutrality, expected lineups for th | ||||
| > | is match, availability changes since the scorecards were written, rest/travel/congestion, motivation | ||||
| > | and stakes, tactical interaction, weather/referee if material. Do **not** look up odds, prices, lin | ||||
| > | es, or market sentiment in this step. If a source happens to show prices, ignore them and do not wri | ||||
| > | te them down. | ||||
| 23 | 5. Build the baseline with the method below and freeze it by writing this line in your working notes | ||||
| > | and report: | ||||
| 24 | |||||
| 25 | ``` | ||||
| 26 | BASELINE (pre-odds): <team1> 0.xx / draw 0.xx / <team2> 0.xx — confidence A|B|C | ||||
| 27 | ``` | ||||
| 28 | |||||
| 29 | After this line is written, the numbers may change only through the disagreement protocol, never | ||||
| > | by drifting toward the market. | ||||
| 30 | 6. Only now fetch market odds for the three outcomes: | ||||
| 31 | |||||
| 32 | ``` | ||||
| 33 | football-model odds --market "<team1> vs <team2>" --selection "<team1>" --sport <sport-key> --reg | ||||
| > | ion <region> | ||||
| 34 | football-model odds --market "<team1> vs <team2>" --selection "Draw" --sport <sport-key> --reg | ||||
| > | ion <region> | ||||
| 35 | football-model odds --market "<team1> vs <team2>" --selection "<team2>" --sport <sport-key> --reg | ||||
| > | ion <region> | ||||
| 36 | ``` | ||||
| 37 | |||||
| 38 | Convert to implied probabilities with the overround removed: `implied_i = (1/odds_i) / ((1/odds_1 | ||||
| > | ) + (1/odds_X) + (1/odds_2))`. Example: odds 2.50 / 3.40 / 3.00 give raw 0.400 / 0.294 / 0.333, tota | ||||
| > | l 1.027, so implied 0.389 / 0.286 / 0.324. | ||||
| 39 | 7. Run the disagreement protocol (below). The probabilities that come out of it are the prediction o | ||||
| > | f record. | ||||
| 12 | 4. Re-read/capture the two current team blob hashes plus the current `head-to-head` and `updating` i | 40 | 8. Re-read and capture the two current team blob hashes plus the current `head-to-head` and `updatin | ||
| > | nstruction hashes. | > | g` instruction hashes, immediately before persistence. | ||
| 13 | 5. Research fixture-specific context: venue, expected lineups for this match, tactical interaction, | 41 | 9. Create the ledger entry with `football-model predictions create ... --scorecards-updated`, passin | ||
| > | market odds, weather/referee if material, motivation, and relevant recent H2H. | > | g the prediction-of-record probabilities. The command fetches its own market odds, stores normalized | ||
| > | market probabilities, applies the edge/Kelly gates, and prints the recommendation — you never type | ||||
| > | odds into the ledger. It also captures the current recorded-stats card onto the row automatically. | ||||
| 14 | 6. Produce W/D/L probabilities that sum to 1.0, explicitly grounded in the scorecards plus the added | 42 | 10. Write the full report (structure below), save it to a file, and attach it: `football-model predi | ||
| > | match context. | > | ctions set-report <ledger-id> --from-file <path>`. Attach it immediately: the report can only be att | ||
| > | ached or replaced while the prediction is unsettled; once the result is recorded it is locked as the | ||||
| > | pre-result record, and corrections belong in post-mortem notes. | ||||
| 15 | 7. Create the prediction ledger entry with `--scorecards-updated`. | 43 | 11. Return the report and ledger id. If any required step is blocked (missing scorecard, no odds ava | ||
| > | ilable), report the exact blocker instead of improvising. | ||||
| 16 | 8. Return a report with assumptions, risk flags, market comparison, and the ledger id. | 44 | |||
| 45 | ## Baseline method | ||||
| 46 | |||||
| 47 | Follow this recipe exactly; it is designed to be reproducible by a careful generalist, not to requir | ||||
| > | e modelling judgement. | ||||
| 48 | |||||
| 49 | ### Step B1 — strength-gap anchor | ||||
| 50 | |||||
| 51 | Judge the pure quality gap between the two squads at current full strength, ignoring venue, availabi | ||||
| > | lity, and this week's news. Pick the closest row (venue-neutral numbers; favourite may be either tea | ||||
| > | m): | ||||
| 52 | |||||
| 53 | | gap | favourite | draw | underdog | | ||||
| 54 | |--------------------------------------------------------|-----------|------|----------| | ||||
| 55 | | even — same tier, no clear edge | 0.37 | 0.26 | 0.37 | | ||||
| 56 | | slight — same tier, one side somewhat stronger | 0.45 | 0.26 | 0.29 | | ||||
| 57 | | clear — about one tier apart | 0.55 | 0.23 | 0.22 | | ||||
| 58 | | strong — about two tiers apart | 0.65 | 0.19 | 0.16 | | ||||
| 59 | | very strong — elite vs weak | 0.72 | 0.16 | 0.12 | | ||||
| 60 | | overwhelming — elite vs minnow | 0.80 | 0.12 | 0.08 | | ||||
| 61 | |||||
| 62 | Interpolate between adjacent rows when the gap sits between them. State in one sentence which row yo | ||||
| > | u chose and the main scorecard evidence for it. | ||||
| 63 | |||||
| 64 | ### Step B2 — venue shift | ||||
| 65 | |||||
| 66 | - True home fixture: move +0.04 to +0.07 from the away side to the home side. Use the top of the ran | ||||
| > | ge for strong effects (altitude, extreme travel for the visitor, notoriously strong home crowd); def | ||||
| > | ault +0.05. | ||||
| 67 | - Tournament host, or heavy crowd asymmetry at a nominally neutral venue: at most +0.03. | ||||
| 68 | - True neutral: no shift. | ||||
| 69 | |||||
| 70 | ### Step B3 — bounded adjustments | ||||
| 71 | |||||
| 72 | Apply only adjustments backed by a stated, sourced fact. List every adjustment with direction, size, | ||||
| > | and the fact behind it. Caps per category, as probability moved between the two teams (or to/from d | ||||
| > | raw where that is clearly the effect): | ||||
| 73 | |||||
| 74 | - availability (missing or returning key players): up to ±0.05 | ||||
| 75 | - rest/travel/congestion edge: up to ±0.03 | ||||
| 76 | - motivation/stakes asymmetry (must-win vs dead rubber): up to ±0.03 | ||||
| 77 | - tactical matchup between the two scorecard identities: up to ±0.04 | ||||
| 78 | - recorded H2H pattern: up to ±0.02, and **only** if the recorded-stats card shows at least 3 meetin | ||||
| > | gs inside its window; otherwise exactly 0. H2H history is weak evidence; squads, managers, and conte | ||||
| > | xts change. Never exceed this cap no matter how striking the pattern looks. | ||||
| 79 | - recent form as such: 0 — form is already inside the scorecards and the anchor choice; adjusting fo | ||||
| > | r it again double-counts. | ||||
| 80 | |||||
| 81 | Total movement across all adjustments: at most ±0.12 on any single outcome. If one underlying cause | ||||
| > | shows up in several guises (an injury that also explains a form dip and a tactical hole), count it o | ||||
| > | nce. | ||||
| 82 | |||||
| 83 | ### Step B4 — draw sanity and renormalization | ||||
| 84 | |||||
| 85 | - The draw must land in 0.15–0.33, unless the favourite is at or above 0.70, in which case it may fa | ||||
| > | ll to 0.10–0.15 (big mismatches kill draws). | ||||
| 86 | - A draw outside 0.20–0.30 needs a one-sentence justification. | ||||
| 87 | - Renormalize so the three probabilities sum to exactly 1.00 at two decimal places; absorb rounding | ||||
| > | in the largest probability. | ||||
| 88 | |||||
| 89 | ### Step B5 — quant cross-check | ||||
| 90 | |||||
| 91 | If the recorded-stats card includes a quant reference, compare it with your numbers. Any outcome dif | ||||
| > | fering from the reference by more than 0.15 requires one sentence explaining why (the reference is v | ||||
| > | enue-agnostic, blind to opponent quality, and underestimates draws — differences are often right, bu | ||||
| > | t you must be able to say why yours is). If the card says "not computed", note that and move on. The | ||||
| > | reference is never the baseline; never copy it. | ||||
| 92 | |||||
| 93 | ### Step B6 — freeze | ||||
| 94 | |||||
| 95 | Write the `BASELINE (pre-odds)` line with the confidence grade. The ledger entry must use exactly th | ||||
| > | e prediction-of-record numbers that survive the disagreement protocol. | ||||
| 96 | |||||
| 97 | ## Confidence grades | ||||
| 98 | |||||
| 99 | - **A** — both scorecards updated this run with availability essentially known, and the recorded-sta | ||||
| > | ts card has form data for both teams. | ||||
| 100 | - **B** — one notable gap: unconfirmed lineups, thin or missing recorded data, or one scorecard area | ||||
| > | known stale. | ||||
| 101 | - **C** — major gaps: a scorecard mostly empty or stale, availability unknown, or key facts contradi | ||||
| > | ctory. | ||||
| 102 | |||||
| 103 | With grade C: cap the most likely outcome at 0.75, widen the draw toward the middle of its range, an | ||||
| > | d recommend no-bet in the report narrative unless the market disagreement is extreme (0.15+) and sur | ||||
| > | vives the re-check. | ||||
| 104 | |||||
| 105 | ## Disagreement protocol | ||||
| 106 | |||||
| 107 | Compare the frozen baseline with the overround-removed market probabilities, per outcome: | ||||
| 108 | |||||
| 109 | - All outcomes within 0.10: no action. Report the comparison. | ||||
| 110 | - Any outcome 0.10 or more apart: do exactly **one** targeted re-check of team news for a fact you m | ||||
| > | ay have missed (late team news, key injury, rotation announcement, motivation report). Then: | ||||
| 111 | - **A specific, nameable missed fact found:** name it in the report, change only the adjustment it | ||||
| > | affects within the normal caps, renormalize, and record both the original frozen baseline and the r | ||||
| > | evised prediction of record. | ||||
| 112 | - **No nameable fact found:** keep the baseline unchanged as the prediction of record. The gap is | ||||
| > | your measured disagreement with the market — that is exactly what the ledger exists to test, and the | ||||
| > | edge/Kelly gates in `predictions create` decide whether it is bet-worthy. | ||||
| 113 | - Never split the difference with the market, and never revise more than once. | ||||
| 17 | 114 | ||||
| 18 | ## Boundary between scorecards and H2H context | 115 | ## Boundary between scorecards and H2H context | ||
| 19 | 116 | ||||
| 20 | Put in team scorecards: | 117 | Put in team scorecards: | ||
| 33 | - how Team A's traits interact with Team B's traits | 130 | - how Team A's traits interact with Team B's traits | ||
| 34 | - fixture venue and game-state incentives | 131 | - fixture venue and game-state incentives | ||
| 35 | - predicted lineups specifically for this match | 132 | - predicted lineups specifically for this match | ||
| 36 | - opponent-specific tactical edges or vulnerabilities | 133 | - opponent-specific tactical edges or vulnerabilities | ||
| n | 37 | - whether H2H history is relevant to this matchup | n | 134 | - recorded H2H relevance for this matchup |
| 38 | - market odds and model-vs-market comparison | 135 | - market odds and model-vs-market comparison | ||
| 39 | - probability synthesis, recommendation, and risk flags for this fixture | 136 | - probability synthesis, recommendation, and risk flags for this fixture | ||
| 40 | 137 | ||||
| n | 41 | If a piece of research is only meaningful because of the opponent, keep it in the H2H report. If it | n | 138 | If a piece of research is only meaningful because of the opponent, keep it in the H2H report. If it |
| > | changes the reusable understanding of the team, update the scorecard. | > | changes the reusable understanding of the team, update the scorecard — but never with market prices. | ||
| 42 | |||||
| 43 | ## Prediction method | ||||
| 44 | |||||
| 45 | Use the team scorecards as the base layer. Treat head-to-head history as weak contextual input, not | ||||
| > | a stand-alone model. | ||||
| 46 | |||||
| 47 | A practical weighting is: | ||||
| 48 | |||||
| 49 | - 50-60% team baseline strength and underlying metrics from scorecards | ||||
| 50 | - 25-35% recent form and availability reflected in scorecards | ||||
| 51 | - 10-20% fixture-specific context: venue, lineup interaction, rest/travel edge, tactical matchup, mo | ||||
| > | tivation, weather, market movement | ||||
| 52 | |||||
| 53 | Avoid double-counting. If a market move, lineup downgrade, and xG trend all reflect the same injury, | ||||
| > | explain the single underlying cause rather than stacking three independent penalties. | ||||
| 54 | |||||
| 55 | Compare final model probabilities with market-implied probabilities after removing overround. If the | ||||
| > | model and market strongly disagree, re-check team news, lineups, motivation, venue, and data freshn | ||||
| > | ess before persisting. | ||||
| 56 | 139 | ||||
| 57 | ## Report structure | 140 | ## Report structure | ||
| 58 | 141 | ||||
| n | 59 | Return: | n | 142 | Return, in order: |
| 60 | 143 | ||||
| n | 61 | 1. fixture: competition, date/time, venue | n | 144 | 1. fixture: competition, date/time, venue, neutrality |
| 62 | 2. provenance: team doc hashes and instruction hashes | 145 | 2. provenance: team doc hashes, instruction hashes, stats-card `generated_at` | ||
| 63 | 3. scorecard-grounded baseline: concise snapshot of each team | 146 | 3. recorded-stats card: the `stats h2h-card` output, verbatim — including any "none recorded" lines | ||
| 64 | 4. fixture-specific context: availability, lineups, venue, rest, motivation, weather/referee | 147 | 4. scorecard-grounded team summaries: a few sentences per team, from the scorecards | ||
| 65 | 5. tactical matchup: how the two scorecards interact in this fixture | 148 | 5. fixture-specific context: the odds-free research findings, each with source and as-of date | ||
| 66 | 6. market check: odds, implied probabilities, line movement | 149 | 6. baseline (pre-odds): anchor row chosen, venue shift, every bounded adjustment with size and fact, | ||
| > | draw check, quant cross-check sentence, then the frozen `BASELINE (pre-odds)` line with confidence | ||||
| > | grade | ||||
| 150 | 7. market comparison: odds seen, overround-removed implied probabilities, per-outcome gaps, disagree | ||||
| > | ment-protocol outcome including any named missed fact and revised numbers | ||||
| 67 | 7. prediction: Team1 / Draw / Team2 probabilities, fair odds, confidence | 151 | 8. prediction of record: final Team1 / Draw / Team2 probabilities and fair odds | ||
| 68 | 8. recommendation: bet/no-bet and why | 152 | 9. recommendation: the bet/no-bet result and reasoning from `predictions create` | ||
| 69 | 9. risk flags and data gaps | 153 | 10. risk flags and data gaps | ||
| 70 | 10. ledger id and recommendation text after persistence | 154 | 11. ledger id | ||
| 71 | 155 | ||||
| 72 | ## Guardrails | 156 | ## Guardrails | ||
| 73 | 157 | ||||
| t | 74 | - Do not predict from stale or missing scorecards. | t | 158 | - No odds, prices, or market-implied probabilities may be looked up, quoted, or written down before |
| > | the `BASELINE (pre-odds)` line exists. This includes "checking quickly" during research. | ||||
| 75 | - Do not write opponent-specific analysis into team scorecards. | 159 | - Never write market prices into team scorecards, in any step, ever. | ||
| 76 | - Do not overweight old H2H meetings. | 160 | - Every "recorded" claim must appear verbatim in the stats card. If the card says none recorded, you | ||
| > | have no recorded data — say so and grade confidence accordingly. | ||||
| 77 | - Do not invent odds, injuries, lineups, or sources. | 161 | - H2H history influence is capped at ±0.02 and requires at least 3 recorded meetings in window. | ||
| 78 | - If live odds are unavailable, report the blocker and do not fake a ledger entry. | 162 | - Never average the baseline toward the market without a named missed fact; never revise twice. | ||
| 79 | - If critical lineup/news is uncertain, cap confidence and make the uncertainty explicit. | 163 | - Do not invent odds, injuries, lineups, results, or sources. Missing data lowers the confidence gra | ||
| > | de; it is never filled in. | ||||
| 164 | - If live odds are unavailable from every configured provider, report the blocker and do not create | ||||
| > | a ledger entry with fake market data. | ||||
| 165 | - Probabilities must sum to 1.00, and the ledger entry must exactly match the prediction of record. | ||||
| 166 | - Do not predict from stale or missing scorecards; fix them first under `instruction-updating`. | ||||