Sentiment Priority Scorer
Produce deterministic priority scores for leads without mutating any state.
Quick Triggers
- - Rank leads by urgency and tone for callback priority.
- Classify leads into P1/P2/P3 queue.
- Score follow-up priority from normalized lead records.
Recommended Chain
INLINECODE0
Execute Workflow
- 1. Accept input from Supervisor containing normalized leads.
- Validate input with
references/sentiment-priority-input.schema.json. - Score each lead with:
-
sentiment_score in range
[-1, 1]
-
intent_score in range
[0, 1]
-
recency_score in range
[0, 1]
- mapped
urgency_score from lead urgency (
high=1.0,
medium=0.6,
low=0.3)
- 4. Use
record_type to avoid over-prioritizing generic bulk inventory:
-
buyer_requirement: apply +0.10 intent lift (hard demand signal)
-
inventory_listing: no lift unless high-action cues are present
- 5. Boost
intent_score when high-action cues exist in listing text:
-
immediately,
keys at office,
one day notice,
possession,
inspection any time
- 6. Compute
priority_score on a 0-100 scale:
-
priority_score = 100 * (0.40*urgency_score + 0.30*intent_score + 0.20*recency_score + 0.10*sentiment_risk)
-
sentiment_risk = max(0, -sentiment_score)
- 7. Assign buckets:
-
P1 for
priority_score >= 75
-
P2 for
priority_score >= 50 and < 75
-
P3 for
< 50
- 8. Produce plain-language
evidence tokens that explain the score, including record-type evidence. - Validate output with
references/sentiment-priority-output.schema.json.
Enforce Boundaries
- - Never write to Google Sheets, databases, or files.
- Never send messages or trigger outbound channels.
- Never create reminders or execute actions.
- Never bypass Supervisor routing or approvals.
- Never replace upstream urgency; only derive scoring fields.
Handle Errors
- 1. Reject schema-invalid inputs.
- Return field-level reasons when scoring cannot be computed.
- Fail closed if required scoring features are missing.
情感优先级评分器
在不改变任何状态的情况下,为线索生成确定性优先级评分。
快速触发条件
- - 根据紧迫性和语气对线索进行排序,确定回电优先级。
- 将线索分类至P1/P2/P3队列。
- 根据标准化线索记录,对跟进优先级进行评分。
推荐链
india-location-normalizer -> sentiment-priority-scorer -> summary-generator
执行工作流
- 1. 接收来自管理员的输入,包含标准化线索。
- 使用 references/sentiment-priority-input.schema.json 验证输入。
- 对每条线索进行评分,包含:
- sentiment_score 范围 [-1, 1]
- intent_score 范围 [0, 1]
- recency_score 范围 [0, 1]
- 根据线索紧迫性映射的 urgency_score(high=1.0,medium=0.6,low=0.3)
- 4. 使用 record_type 避免对通用批量库存过度优先排序:
- buyer_requirement:应用 +0.10 意图提升(硬需求信号)
- inventory_listing:除非存在高行动线索,否则不提升
- 5. 当列表文本中存在高行动线索时,提升 intent_score:
- immediately、keys at office、one day notice、possession、inspection any time
- 6. 在0-100范围内计算 priority_score:
- priority
score = 100 (0.40urgencyscore + 0.30
intentscore + 0.20recencyscore + 0.10*sentiment_risk)
- sentiment
risk = max(0, -sentimentscore)
- 7. 分配桶:
- P1 对应 priority_score >= 75
- P2 对应 priority_score >= 50 且 < 75
- P3 对应 < 50
- 8. 生成通俗易懂的 evidence 标记,解释评分依据,包括记录类型证据。
- 使用 references/sentiment-priority-output.schema.json 验证输出。
执行边界
- - 绝不写入Google Sheets、数据库或文件。
- 绝不发送消息或触发外发渠道。
- 绝不创建提醒或执行操作。
- 绝不绕过管理员路由或审批。
- 绝不替换上游紧迫性;仅推导评分字段。
错误处理
- 1. 拒绝不符合模式的输入。
- 当无法计算评分时,返回字段级别的原因。
- 如果缺少必要的评分特征,则安全失败。