An intelligent nudge generation system that analyzes a user’s profile, history, and real-time attention logs (likes, views, recruiter signals) to produce relevant nudges — such as revealing secret admirers or alerting users to recruiter interest — powered by machine learning and business logic.
Attention Insight Engine is designed to help platforms surface timely nudges that drive user engagement. These nudges are generated based on two core signals:
- Reveal Secret Admirer – Triggered if anonymous likes accumulate and cooldown passes
- Show Recruiter Signal – Triggered if recruiter views meet threshold
The system uses Random Forest Classifiers trained on realistic, balanced synthetic data. It also includes a rule-based fallback engine for consistency, control, and explainability.
- Chandu Chikkudu
- Preethi Kamal Gajula
Interns @ Turtil
Duration: 6 Weeks
- ✅ ML models trained for two nudges (
secret_admirer,recruiter) - ✅ Rule-based fallback system for safety and consistency
- ✅ Cooldown and threshold control via
config.json - ✅ Data augmentation logic for robust model training
- ✅ Explainability via
sourcefield (modelorrule) - ✅ FastAPI interface with Swagger UI
- ✅ Dockerized for deployment and testing
Attention_Insight_Engine/
├── main.py # FastAPI entry point
├── insight_engine.py # Core logic for features & nudges
├── config.json # Rule thresholds and limits
├── model_secret.pkl # Trained model for secret admirer
├── model_recruiter.pkl # Trained model for recruiter signal
├── generate_augmented_data.py # Simulation script for training data
├── train_final_models.py # Model training code
├── training_data_enhanced.csv # Augmented training dataset
├── requirements.txt # Python dependencies
├── Dockerfile # Docker build config
├── logs.txt # Model + rule decision logs
└── README.md # Project documentation
{
"secret_admirer_threshold": 2,
"reveal_cooldown_days": 3,
"min_recruiter_views_for_alert": 1,
"max_daily_nudges": 2
}These settings determine when nudges are eligible based on anonymous likes, recruiter views, and cooldown logic.
docker build -t attention-engine .docker run -p 8000:8000 attention-engineNavigate to:
http://localhost:8000/docs
Request:
{
"user_id": "u_demo",
"profile": {
"karma": 100,
"goal_tags": ["SDE"],
"resume_uploaded": true,
"has_secret_mode": false
},
"attention_logs": {
"peer_views": [],
"anonymous_likes": 0,
"vibe_likes": 0,
"recruiter_views": [
{
"company": "Infosys",
"role": "Engineer",
"timestamp": "2025-06-20T10:00:00Z"
}
]
},
"history": {
"last_revealed_secret_admirer": null,
"last_recruiter_nudge": "2025-05-30"
}
}Response:
{
"user_id": "u_demo",
"nudges": [
{
"type": "recruiter",
"title": "A recruiter from Infosys viewed your profile",
"action": "Update your resume to stay visible",
"priority": "career",
"source": "model"
}
],
"status": "generated"
}docker tag attention-engine yourdockerhubusername/attention-engine
docker push yourdockerhubusername/attention-engine- Thanks to Turtil for the internship opportunity
- Guided and mentored by the team at Turtil
- Built using Python, Scikit-learn, FastAPI, and Docker
🔐 Secure. 💡 Explainable. 🚀 Fast.
— The Attention Insight Engine