const getSourceWeight = (dataAge, sourceType) => { const baseWeights = { news: 0.8, social: 0.6, official: 1.0 }; const timeDecay = Math.exp(-dataAge / (2 * 60 * 60 * 1000)); // 2-hour half-life return baseWeights[sourceType] * timeDecay; };