sentiment-priority-scorer

TotalClaw 作者 totalclaw

使用情绪、紧迫性、意图、新近度和记录类型对标准化房地产销售线索进行评分,以生成确定性优先级排名和 P1-P3 存储桶。当用户要求对热门线索进行优先级排序、对回调队列进行排名或对后续进行分类而不执行写入或出站发送时使用。推荐链:印度位置标准化器,然后是情绪优先评分器,然后是摘要生成器和行动建议器。

安装 / 下载方式

TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~vishalgojha-sentiment-priority-scorer
cURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~vishalgojha-sentiment-priority-scorer/file -o vishalgojha-sentiment-priority-scorer.md
# 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

`india-location-normalizer -> sentiment-priority-scorer -> summary-generator`

## Execute Workflow

1. Accept input from Supervisor containing normalized leads.
2. Validate input with `references/sentiment-priority-input.schema.json`.
3. 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.
9. 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.
2. Return field-level reasons when scoring cannot be computed.
3. Fail closed if required scoring features are missing.

---

## 中文说明

# 情绪优先评分器(Sentiment Priority Scorer)

在不修改任何状态的情况下,为潜在客户生成确定性优先级评分。

## 快速触发条件

- 按紧迫性和语气对潜在客户排序,用于回拨优先级。
- 将潜在客户分类到 P1/P2/P3 队列。
- 根据规范化的潜在客户记录评估后续优先级。

## 推荐链

`india-location-normalizer -> sentiment-priority-scorer -> summary-generator`

## 执行工作流

1. 接收来自 Supervisor 的、包含规范化潜在客户的输入。
2. 使用 `references/sentiment-priority-input.schema.json` 校验输入。
3. 对每个潜在客户进行评分:
   - `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.40*urgency_score + 0.30*intent_score + 0.20*recency_score + 0.10*sentiment_risk)`
   - `sentiment_risk = max(0, -sentiment_score)`
7. 分配存储桶:
   - `P1`:`priority_score >= 75`
   - `P2`:`priority_score >= 50 and < 75`
   - `P3`:`< 50`
8. 生成通俗易懂的 `evidence` 标记以解释评分,包括记录类型相关的证据。
9. 使用 `references/sentiment-priority-output.schema.json` 校验输出。

## 强制边界

- 切勿写入 Google Sheets、数据库或文件。
- 切勿发送消息或触发出站渠道。
- 切勿创建提醒或执行操作。
- 切勿绕过 Supervisor 的路由或审批。
- 切勿替换上游的紧迫性;仅派生评分字段。

## 错误处理

1. 拒绝不符合 schema 的输入。
2. 当无法计算评分时,返回字段级原因。
3. 当缺少必需的评分特征时采取失败关闭(fail closed)策略。