Create insights.py
Browse files- insights.py +8 -0
insights.py
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
def explain_score(lead_score, ai_score, confidence, risk, stage, gap, emails, meetings):
|
2 |
+
return (
|
3 |
+
f"Lead score was based on the {stage} stage, deal timing (close in {gap} days), "
|
4 |
+
f"and {emails} emails + {meetings} meetings.\n"
|
5 |
+
f"The AI adjusted the score based on engagement intensity and urgency.\n"
|
6 |
+
f"Confidence was computed from model certainty and outcome spread.\n"
|
7 |
+
f"Risk was assigned due to {'low engagement' if risk == 'High' else 'healthy momentum'}."
|
8 |
+
)
|