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
- Accept input from Supervisor containing normalized leads.
- Validate input with
references/sentiment-priority-input.schema.json. - Score each lead with:
sentiment_scorein range[-1, 1]intent_scorein range[0, 1]recency_scorein range[0, 1]- mapped
urgency_scorefrom lead urgency (high=1.0,medium=0.6,low=0.3)
- Use
record_typeto 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
- Boost
intent_scorewhen high-action cues exist in listing text:immediately,keys at office,one day notice,possession,inspection any time
- Compute
priority_scoreon 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)
- Assign buckets:
P1forpriority_score >= 75P2forpriority_score >= 50 and < 75P3for< 50
- Produce plain-language
evidencetokens 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
- Reject schema-invalid inputs.
- Return field-level reasons when scoring cannot be computed.
- Fail closed if required scoring features are missing.