An AI-powered notification routing system that intelligently classifies incoming WhatsApp messages into Notify, Digest, or Mute using a modular multi-agent architecture and context-aware reasoning.
This project was developed as a solution for the HackerRank Orchestrate – Message Notification Router challenge.
The system analyzes incoming WhatsApp messages using message content, user behaviour, historical interactions, business metadata, and contextual information to determine the most appropriate notification strategy.
The objective is to minimize unnecessary interruptions while ensuring important messages receive immediate attention.
- Multi-Agent Architecture
- Context-Aware Decision Making
- Personalized Notification Routing
- Rule-Based Reasoning Engine
- Knowledge Base for Historical Context
- Policy Validation Layer
- Evaluation Pipeline
- CSV-based Prediction Generation
Incoming Messages
│
▼
Dataset Loader
│
▼
Knowledge Base
│
▼
Message Intake Agent
│
▼
Context Retrieval Agent
│
▼
Rule-Based Reasoning Agent
│
▼
Policy Validator
│
▼
Output Formatter
│
▼
output.csv
code/
│
├── agents/
│ ├── message_intake.py
│ ├── context_retrieval.py
│ ├── rule_based_reasoning.py
│ ├── policy_validator.py
│ └── output_formatter.py
│
├── knowledge/
│ ├── loader.py
│ └── knowledge_base.py
│
├── models/
│ ├── structured_message.py
│ ├── context_bundle.py
│ ├── reasoning_state.py
│ └── decision_result.py
│
├── services/
│ ├── prompt_builder.py
│ ├── groq_service.py
│ └── json_parser.py
│
├── evaluation/
│ └── main.py
│
├── main.py
└── requirements.txt
For every incoming message the system:
- Loads structured message data.
- Retrieves user, business, group and historical context.
- Applies rule-based reasoning using contextual evidence.
- Validates the decision against notification policies.
- Generates the final routing decision.
- Writes predictions to
output.csv.
| Action | Description |
|---|---|
| Notify | Important messages requiring immediate attention |
| Digest | Useful but non-urgent notifications |
| Mute | Low-value, repetitive, spam or suspicious messages |
- Python
- Pandas
- Pydantic
- Rule-Based AI
- Multi-Agent Architecture
Clone the repository:
git clone https://github.com/Harikarthik7124/Message-Notification-Router.gitInstall dependencies:
pip install -r requirements.txtPlace the provided dataset in the project directory and run:
python main.pyThe generated predictions will be saved as:
output.csv
Run the evaluation script:
python evaluation/main.pyThe evaluation reports:
- Number of predictions
- Missing records
- Duplicate IDs
- Decision distribution
- Average confidence
- Integrate LLM-based reasoning
- Image OCR support
- Voice note transcription
- Hybrid Rule + LLM decision engine
- Confidence calibration using model feedback
This repository contains my implementation of the Message Notification Router challenge from the HackerRank Orchestrate hackathon. The architecture, implementation, and decision pipeline represent my own solution developed for the challenge.
This repository is intended for educational and portfolio purposes.