diff --git a/src/services/intelligence/analyzeViaEngine1.js b/src/services/intelligence/analyzeViaEngine1.js index 8930667..fe35a07 100644 --- a/src/services/intelligence/analyzeViaEngine1.js +++ b/src/services/intelligence/analyzeViaEngine1.js @@ -114,7 +114,11 @@ function buildConcreteReasoning(features = {}, engine1Result = {}, meta = {}, pr lines.push(`${prop.player || 'Player'} is averaging ${features.l5_avg.toFixed(1)} ${prop.stat_type || ''} over his last 5 games.`); } if (Number.isFinite(features.l20_avg)) { - lines.push(`Last 20 games average: ${features.l20_avg.toFixed(1)}.`); + // LABEL FIXED WITH THE DATA. `l20_avg` is now built from the full season + // log rather than a ten-game slice, so "Last 20 games" was a sentence the + // number no longer supported. The field name is kept (it is read in many + // places) but the copy states what is actually being shown. + lines.push(`Season average: ${features.l20_avg.toFixed(1)}.`); } // Trend direction relative to the line. diff --git a/src/services/intelligence/trapDetection.js b/src/services/intelligence/trapDetection.js index 270d318..5c9d15b 100644 --- a/src/services/intelligence/trapDetection.js +++ b/src/services/intelligence/trapDetection.js @@ -141,11 +141,11 @@ function signalRecencyInflation(input) { return inactive('l5_avg or l20_avg missing'); } const ratio = (l5 - l20) / l20; - if (ratio <= 0) return { score: 0, active: true, explanation: 'L5 not hotter than L20' }; + if (ratio <= 0) return { score: 0, active: true, explanation: 'L5 not hotter than season' }; return { score: Math.min(1.0, ratio), active: true, - explanation: `L5 (${l5.toFixed(1)}) ${(ratio * 100).toFixed(0)}% above L20 (${l20.toFixed(1)})`, + explanation: `L5 (${l5.toFixed(1)}) ${(ratio * 100).toFixed(0)}% above season (${l20.toFixed(1)})`, }; }