Skip to content

Overview

package wittgenstein_lead_scorer

Wittgenstein Lead Scorer Library.

Provides classes and helper methods for scoring leads and evaluating them against ICP rubrics.

Classes

  • LeadScore — LeadScore Pydantic model representing the overall lead evaluation.

  • ScoreBreakdown — Breakdown of lead score by dimensions.

  • ScoringSignal — Pydantic model representing a specific signal that influenced the score.

  • LeadScoringEngine — Orchestrator for deterministic pre-filtering, demographic/behavioral scoring, and temporal decay.

  • ICPMatcher — Matches lead demographic/firmographic properties against Ideal Customer Profile (ICP) criteria.

  • ThresholdConfig — Configuration values for the lead scoring engine.

wittgenstein_lead_scorer.LeadScore

mkapi_definition_mkapi class LeadScore()

Bases : BaseModel

LeadScore Pydantic model representing the overall lead evaluation.

wittgenstein_lead_scorer.ScoreBreakdown

mkapi_definition_mkapi class ScoreBreakdown()

Bases : BaseModel

Breakdown of lead score by dimensions.

wittgenstein_lead_scorer.ScoringSignal

mkapi_definition_mkapi class ScoringSignal()

Bases : BaseModel

Pydantic model representing a specific signal that influenced the score.

wittgenstein_lead_scorer.LeadScoringEngine

mkapi_definition_mkapi class LeadScoringEngine(threshold_config: Optional[ThresholdConfig] = None, blocked_domains: Optional[List[str]] = None)

Orchestrator for deterministic pre-filtering, demographic/behavioral scoring, and temporal decay.

Methods

  • calculate_score — Evaluate a lead based on all available properties and signals.

wittgenstein_lead_scorer.LeadScoringEngine.calculate_score

mkapi_definition_mkapi method LeadScoringEngine.calculate_score(lead_id: str, properties: Dict[str, Any], events: List[Dict[str, Any]], context: Optional[Dict[str, Any]] = None, last_activity_date: Optional[datetime] = None) → LeadScore

Evaluate a lead based on all available properties and signals.

wittgenstein_lead_scorer.ICPMatcher

mkapi_definition_mkapi class ICPMatcher(rubric: Dict[str, Any] = None)

Matches lead demographic/firmographic properties against Ideal Customer Profile (ICP) criteria.

Methods

  • evaluate_icp — Calculate a match ratio (0.0 to 1.0) of how close a lead is to the target ICP.

  • generate_icp_signals — Generate corresponding ICP matching scoring signals.

wittgenstein_lead_scorer.ICPMatcher.evaluate_icp

mkapi_definition_mkapi method ICPMatcher.evaluate_icp(properties: Dict[str, Any]) → float

Calculate a match ratio (0.0 to 1.0) of how close a lead is to the target ICP.

wittgenstein_lead_scorer.ICPMatcher.generate_icp_signals

mkapi_definition_mkapi method ICPMatcher.generate_icp_signals(properties: Dict[str, Any]) → List[ScoringSignal]

Generate corresponding ICP matching scoring signals.

wittgenstein_lead_scorer.ThresholdConfig

mkapi_definition_mkapi class ThresholdConfig()

Bases : BaseModel

Configuration values for the lead scoring engine.