fix:更新算法
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
>
|
||||
> **共用基礎**:
|
||||
>
|
||||
> * 用戶畫像:U(mom_stage one-hot、emotion_score、context one-hot、need one-hot)
|
||||
> * 用戶畫像:U(mom_stage one-hot;emotion/context/need 允许缺失/跳过;含 `profile_confidence/profile_answered`)
|
||||
> * 文案畫像:Cᵢ(stage、emotion_score、context/need suitability、personalization_power、risk_flags;建議含 content_id/author_id/template_id/review_confidence)
|
||||
> * 推薦骨架:Hard Filter → Soft Scoring → Rerank(多樣性/新鮮度/疲勞)
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
1. **Candidate Generation(候選集生成)**
|
||||
|
||||
* 依 U 取一個「候選池」:匹配 need/context/stage 的內容 + 一部分通用內容
|
||||
* V1.2:若問卷允許跳過導致 `U.need/U.context/U.emotion_score` 缺失,候選池需自動提高通用安全內容占比,并视为至少进入 L1(限制 `personalization_power≤0.5`)
|
||||
2. **Hard Filter(硬性過濾)**
|
||||
|
||||
* 依 risk_flags 與產品規則剔除高風險內容
|
||||
@@ -93,10 +94,37 @@ S_{core} + S_{personal} + S_{fresh} - P_{fatigue} - P_{repeat} - P_{risk} - P_{u
|
||||
S_{core} = w_{need}S_{need} + w_{emotion}S_{emotion} + w_{stage}S_{stage} + w_{context}S_{context}
|
||||
]
|
||||
|
||||
* `S_need = Cᵢ.need_suitability[U.need]`
|
||||
* `S_context = Cᵢ.context_suitability[U.context]`
|
||||
* `S_need = Cᵢ.need_suitability[U.need]`(若 U.need 缺失,见 V1.2)
|
||||
* `S_context = Cᵢ.context_suitability[U.context]`(若 U.context 缺失,见 V1.2)
|
||||
* `S_stage`:general=1;命中=1;unknown對非unknown=0.7;其餘=0
|
||||
* `S_emotion`:若文案 general→0.8;否則 `1-|U.emotion_score-Cᵢ.emotion_score|`
|
||||
* `S_emotion`:若文案 general→0.8;否則 `1-|U.emotion_score-Cᵢ.emotion_score|`(若 U.emotion_score 缺失,见 V1.2)
|
||||
|
||||
### V1.2:当问卷允许跳过题目时的打分约定(工程必读)
|
||||
|
||||
> 目标:用户画像字段不全时仍能产出排序;并在不确定时自动降个性化/降风险。
|
||||
|
||||
判定缺失:
|
||||
|
||||
* `U.need` 为空对象 `{}` 或不存在 → 视为缺失
|
||||
* `U.context` 为空对象 `{}` 或不存在 → 视为缺失
|
||||
* `U.emotion_score` 为 `null`/不存在 → 视为缺失
|
||||
|
||||
缺失时的保守计算:
|
||||
|
||||
* `S_need`:
|
||||
* 若 `U.need` 缺失 → `S_need = 0.5`
|
||||
* 否则 → `S_need = Cᵢ.need_suitability[U.need]`
|
||||
* `S_context`:
|
||||
* 若 `U.context` 缺失 → `S_context = 0.5`
|
||||
* 否则 → `S_context = Cᵢ.context_suitability[U.context]`
|
||||
* `S_emotion`:
|
||||
* 若 `U.emotion_score` 缺失 → `S_emotion = 0.8`
|
||||
* 否则按原定义计算(文案 general 仍为 0.8)
|
||||
|
||||
额外约束(与回退梯度一致,6A):
|
||||
|
||||
* 若 `conf_U` 偏低或字段缺失明显:必须启用 `P_uncertainty`
|
||||
* 若进入回退梯度(`fallback_level_final>0`):按 L1/L2/L3 限制 `personalization_power` 上限(见 3.1)
|
||||
|
||||
個性化加成:
|
||||
[
|
||||
@@ -125,7 +153,7 @@ P_{uncertainty} = \beta \cdot (1-\text{conf}_U) \cdot (1-\text{conf}_{Cᵢ}) \cd
|
||||
* `U.stage.unknown=1` → 禁推 `unsafe_for_stage_unknown`
|
||||
* `U.stage.parenting=1` → 禁推 `unsafe_for_stage_parenting`
|
||||
* `U.emotion_score≤0.2` → 禁推 `unsafe_for_emotion_low`
|
||||
* `U.context.health=1` → 禁推 `block_health_medical`(僅擋「醫療/診斷/嚴重暗示」)
|
||||
* `Cᵢ.risk_flags` 含 `block_health_medical` → **全场景禁推(Hard Filter)**(仅挡「医疗/诊断/严重暗示」)
|
||||
|
||||
> `soft_health_sensitive` 不做 Hard Filter,改由 Soft Penalty(見 Push 的 P_risk)
|
||||
|
||||
@@ -218,6 +246,11 @@ P_{uncertainty} = \beta \cdot (1-\text{conf}_U) \cdot (1-\text{conf}_{Cᵢ}) \cd
|
||||
>
|
||||
> * `personalization_power` 上限降為 `≤0.5`(L1)或 `0`(L2/L3)
|
||||
> * 若候選不足,優先回退到「通用安全句庫」,而不是擴大高個性化內容
|
||||
>
|
||||
> V1.2(支持问卷跳过)补充:
|
||||
>
|
||||
> * 若 `profile_answered.need=false` 或 `U.need` 缺失:不得按“need 强命中”召回,候选池应提高通用安全句占比,并至少按 L1 降个性化
|
||||
> * 若 `profile_answered.emotion=false` 或 `U.emotion_score` 缺失:Push 应偏向 `Cᵢ.emotion_score` 为 `general` 或 0.4–0.8 的稳定内容,并启用 `P_uncertainty`
|
||||
|
||||
## 5.3 Push 打分權重(建議)
|
||||
|
||||
@@ -313,7 +346,7 @@ V1.1 補充(工程預設):
|
||||
|
||||
* Feed:MMR `λ=0.7`
|
||||
* Push:啟用 `P_uncertainty`(或併入 `P_risk`);`fallback_level>=1` 時 `personalization_power` 上限降為 `≤0.5`
|
||||
* Health:Hard Filter 僅擋 `block_health_medical`;`soft_health_sensitive` 走 Soft Penalty
|
||||
* Health:`block_health_medical` 全场景 Hard Filter;`soft_health_sensitive` 走 Soft Penalty
|
||||
|
||||
> 一句話:
|
||||
> **同一套 U×Cᵢ 打分,按場景調候選池、權重與重排約束。**
|
||||
|
||||
Reference in New Issue
Block a user