Outlier Detection Service
Component Detail
Description
Analyses per-mentor period summaries against configurable thresholds to classify each mentor as underactive, normal, or overloaded. Results are surfaced in the coordinator team summary view to enable proactive follow-up.
outlier-detection-service
Summaries
The Outlier Detection Service is a proactive workforce intelligence capability that automatically flags peer mentors who are either underperforming or burning out before problems escalate. By classifying mentors as underactive, normal, or overloaded against configurable thresholds, it enables coordinators to intervene early — protecting mentor wellbeing, improving mentee outcomes, and reducing costly attrition. This directly supports program quality, demonstrates duty-of-care to stakeholders, and scales coordinator oversight without increasing headcount. Thresholds are configurable per organisation, allowing the product to adapt to different institutional norms and contractual SLAs, which strengthens enterprise sales positioning.
The Outlier Detection Service is a medium-complexity backend service with a well-scoped set of responsibilities: threshold comparison, status labelling, and severity scoring. It depends on the Activity Aggregation Repository being complete and stable before integration testing can proceed, making sequencing important. Development effort is modest given the logic is rule-based rather than ML-driven, but QA should cover edge cases such as mentors with zero sessions, threshold boundary conditions, and organisations with no configured thresholds (default fallback). Deployment risk is low since it is read-only with no state mutations.
Configurable thresholds per organisation must be validated against the organisation settings schema before release.
The Outlier Detection Service is a pure backend service component consuming data from the Activity Aggregation Repository via `getMentorAggregates`. Its three public interfaces — `classifyMentor(mentorSummary, thresholds)`, `getDefaultThresholds(organisationId)`, and `getOutlierMentors(teamSummaries, thresholds)` — are designed for composability: `classifyMentor` operates on a single summary record, while `getOutlierMentors` applies bulk classification over a team. Internally, classification compares session count against lower and upper numeric thresholds, producing a status enum and a numeric severity score. Organisation-scoped threshold retrieval should cache defaults to avoid repeated DB round-trips.
The periodic-summary data model drives the input shape. This component has no side effects and is straightforward to unit test with mocked threshold objects.
Responsibilities
- Compare mentor session count against lower threshold for underactive classification
- Compare mentor session count against upper threshold for overloaded classification
- Produce a status label and severity score for each mentor
- Support configurable thresholds per organisation
Interfaces
classifyMentor(mentorSummary, thresholds)
getDefaultThresholds(organisationId)
getOutlierMentors(teamSummaries, thresholds)
Relationships
Related Data Entities (2)
Data entities managed by this component