feat(moment): 動態打分改用專用模型(fallback 短內容,零停機)#4860
Merged
Merged
Conversation
…short-content) 短內容共用模型對動態 ~90% 華語誤殺;專用動態模型重訓後驗收 @0.7 誤殺0.8%/召回93% (vs 舊 93.9%/67%)。比照 #4838 留言拆專用:momentService.detectSpam 改用 momentSpamDetectionApiUrl,未設定時 fallback 短內容模型 → 零停機 opt-in。 ops 設 MATTERS_MOMENT_SPAM_DETECTION_API_URL 指向新 endpoint 即啟用。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #4860 +/- ##
===========================================
- Coverage 72.93% 72.77% -0.17%
===========================================
Files 1068 1071 +3
Lines 21541 21306 -235
Branches 4802 4657 -145
===========================================
- Hits 15712 15505 -207
+ Misses 5347 5324 -23
+ Partials 482 477 -5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
背景
共用短內容模型對動態(moment) ~90% 華語誤殺(把散文/詩/貓咖/政治時評打 1.0)。已重訓專用動態模型(label-fix,e5+head),699 筆非訓練集 held-out(subagent 真標籤)實測:
改動(比照 #4838 留言拆專用)
environment.ts:加momentSpamDetectionApiUrl(MATTERS_MOMENT_SPAM_DETECTION_API_URL)momentService.detectSpam:改用專用 endpoint,未設定時 fallback 短內容模型 → 零停機 opt-in.env.example補上啟用
ops 設
MATTERS_MOMENT_SPAM_DETECTION_API_URL指向已部署的 prod 動態 endpoint(stackmoment-spam-model-service)即啟用。未設定則行為不變。注意:動態實際處置仍以 ring 行為訊號為主(影子週 06-24 報告後決定);本模型分數讓動態打分變可信、作為輔助訊號。
🤖 Generated with Claude Code