Skip to content

Commit 7ae68e7

Browse files
committed
fix(llm): 提及不再被低价值社交惩罚抵消,别名唤醒可过必要性门禁
1 parent 9a74c6d commit 7ae68e7

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

pallas/product/llm/reply_necessity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def score_reply_necessity(
175175
if has_reply_obligation(plain):
176176
score += 20
177177
parts.append("obligation+20")
178-
if is_low_value_social_turn(plain):
178+
if is_low_value_social_turn(plain) and not (is_mentioned or is_followup):
179179
score -= 35
180180
parts.append("low_social-35")
181181
if has_recent_back_and_forth:

tests/product/llm/test_reply_necessity.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,17 @@ def test_mentioned_question_crosses_reply_necessity_threshold() -> None:
7171
assert result.score >= REPLY_NECESSITY_TRIGGER_SCORE
7272

7373

74+
def test_mentioned_short_social_turn_crosses_reply_necessity_threshold() -> None:
75+
result = evaluate_reply_necessity_gate(
76+
text="牛牛晚饭吃了没",
77+
is_mentioned=True,
78+
has_recent_back_and_forth=True,
79+
)
80+
81+
assert result.decision == "proceed"
82+
assert result.score >= REPLY_NECESSITY_TRIGGER_SCORE
83+
84+
7485
@pytest.mark.parametrize(
7586
("kwargs", "name"),
7687
[

0 commit comments

Comments
 (0)