File size: 25,866 Bytes
472db7f
 
 
 
 
 
 
 
434174b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0a56ecd
434174b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0a56ecd
 
434174b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
---
title: Career Success TenzorX
emoji: ๐Ÿš€
colorFrom: blue
colorTo: indigo
sdk: docker
app_port: 7860
---
<h1 align="center">PlacementIQ</h1>
<h3 align="center">Agentic AI Career Risk Intelligence Platform</h3>

<p align="center">
  <em>A <strong>Poonawalla Fincorp</strong> initiative โ€” AI-powered education-loan placement risk prediction for lenders,<br/>
  built on a <strong>multi-agent architecture</strong> with real-time market intelligence.</em>
</p>
<p align="center">
  <img src="https://img.shields.io/badge/Poonawalla_Fincorp-PlacementIQ-1B2C5E?style=for-the-badge&labelColor=1E56C7&logoColor=white" alt="PlacementIQ" />
  <img src="https://img.shields.io/badge/version-2.0.0-1E56C7?style=for-the-badge" alt="Version" />
  <img src="https://img.shields.io/badge/python-3.10+-3776AB?style=for-the-badge&logo=python&logoColor=white" alt="Python" />
  <img src="https://img.shields.io/badge/react-19-61DAFB?style=for-the-badge&logo=react&logoColor=black" alt="React" />
  <img src="https://img.shields.io/badge/license-Proprietary-1B2C5E?style=for-the-badge" alt="License" />
</p>
<p align="center">
  <a href="https://drive.google.com/drive/folders/1yOtAta0nSEQPCaNb2IFFw2OgZiMW4W31?usp=sharing">
    <img src="https://img.shields.io/badge/โ–ถ_Watch_Demo_Video-Google_Drive-EA4335?style=for-the-badge&logo=googledrive&logoColor=white" alt="Demo Video" />
  </a>
  &nbsp;
  <a href="#-getting-started">
    <img src="https://img.shields.io/badge/๐Ÿš€_Quick_Start-Setup_Guide-1E56C7?style=for-the-badge" alt="Quick Start" />
  </a>
  &nbsp;
  <a href="#-outputs--working-prototype-screenshots">
    <img src="https://img.shields.io/badge/๐Ÿ“ธ_Screenshots-Live_Prototype-10B981?style=for-the-badge" alt="Screenshots" />
  </a>
</p>

---

## ๐ŸŽฌ Demo & Live Preview

> **๐ŸŽฅ Full Demo Video** โ†’ [**Watch on Google Drive**](https://drive.google.com/drive/folders/1yOtAta0nSEQPCaNb2IFFw2OgZiMW4W31?usp=sharing)
>
> A walkthrough of the working prototype covering all 8 pages, the 5 AI agents, real-time market intelligence, drift monitoring, and the cold-start scoring engine.

| Surface | URL (when running locally) |
|---|---|
| ๐ŸŒ **Frontend (React)** | [http://localhost:5173](http://localhost:5173) |
| โšก **Backend API (FastAPI)** | [http://localhost:8001](http://localhost:8001) |
| ๐Ÿ“š **Interactive API Docs (Swagger)** | [http://localhost:8001/docs](http://localhost:8001/docs) |

---

## ๐Ÿ“‘ Table of Contents

1. [Overview](#-overview)
2. [Key Features](#-key-features)
3. [Architecture](#-architecture)
4. [The AI Agent System](#-the-ai-agent-system)
5. [Tech Stack](#-tech-stack)
6. [Getting Started](#-getting-started)
7. [Quick Verification](#-quick-verification)
8. [Outputs โ€” Working Prototype Screenshots](#-outputs--working-prototype-screenshots)
9. [API Reference](#-api-reference)
10. [Frontend Pages](#-frontend-pages)
11. [Configuration](#-configuration)
12. [Model Performance](#-model-performance)
13. [Project Structure](#-project-structure)

---

## ๐Ÿ“Œ Overview

**PlacementIQ** is an intelligent risk-assessment platform purpose-built for **education-loan portfolios**. It predicts whether a borrower (student) will secure employment within **3 / 6 / 12 months** of graduation โ€” enabling **proactive intervention** before loan defaults occur.

The platform combines **deterministic ML models** for speed with **LLM-powered agents** for contextual depth, all grounded in **live market data** from public APIs.

| Layer | Technology | Purpose |
|---|---|---|
| ๐Ÿงฎ **ML Scoring Engine** | XGBoost + LightGBM | Fast, deterministic base risk scores (~50ms) |
| ๐Ÿ” **SHAP Explainability** | TreeExplainer | Feature-level contribution to each score |
| ๐Ÿค– **Multi-Agent AI System** | LLM Orchestrator (5 agents) | Deep contextual reasoning & intervention planning |
| ๐ŸŒ **Real Market Data** | World Bank + India job portals | Live demand signals, macro-climate index |

---

## ๐Ÿงฉ Key Features

- โœ… **Hybrid AI** โ€” ML models for speed + LLM agents for depth
- ๐ŸŒ **Real Market Data** โ€” World Bank macro indicators + India job-portal signals
- ๐Ÿ”ฌ **SHAP Explainability** โ€” Every score includes feature-level explanations
- ๐Ÿ”„ **Multi-Provider LLM** โ€” Switch between Groq, Anthropic, OpenAI, OpenRouter via `.env`
- โšก **In-Memory Caching** โ€” Prevents LLM rate limiting during portfolio scans
- ๐ŸŒ“ **Dark / Light Themes** โ€” Full theme toggle with Poonawalla Fincorp branding
- ๐Ÿ“ก **32 API Endpoints** โ€” Comprehensive REST API for all platform capabilities
- ๐Ÿ“Š **PSI Drift Monitoring** โ€” Automated model-stability tracking
- ๐Ÿ“‘ **Compliance-Ready** โ€” Audit trail + exportable reports for RBI FLDG guidelines
- ๐Ÿงช **Cold-Start Scoring** โ€” Synthetic placement scoring for institutes with no history

---

## ๐Ÿ—๏ธ Architecture

```
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    React Frontend (Vite + React 19)           โ”‚
โ”‚   Dashboard โ”‚ Portfolio โ”‚ Heatmap โ”‚ Reports โ”‚ Institutes     โ”‚
โ”‚              AI Agents โ”‚ Admin Panel โ”‚ Student Profile        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                           โ”‚  REST API (JSON)
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                 FastAPI Backend  (port 8001)                  โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚   Scoring    โ”‚  โ”‚    Agent     โ”‚  โ”‚    Real Data      โ”‚   โ”‚
โ”‚  โ”‚   Engine     โ”‚  โ”‚ Orchestrator โ”‚  โ”‚     Fetcher       โ”‚   โ”‚
โ”‚  โ”‚  (XGB+LGBM)  โ”‚  โ”‚  (5 agents)  โ”‚  โ”‚   (World Bank)    โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚     SHAP     โ”‚  โ”‚     Tool     โ”‚  โ”‚      Data         โ”‚   โ”‚
โ”‚  โ”‚  Explainer   โ”‚  โ”‚   Registry   โ”‚  โ”‚   Generator       โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
```

---

## ๐Ÿค– The AI Agent System

Five specialized **LLM-powered agents** replace formerly static, hard-coded systems:

| # | Agent | Replaces | Purpose |
|---|---|---|---|
| 1 | **NBA Agent** | Static rule tables | Recommends highest-ROI interventions using SHAP drivers + EMI data |
| 2 | **Explainability Agent** | Hard-coded NLG templates | Translates ML outputs into human-readable risk narratives |
| 3 | **Market Intelligence Agent** | Static WoW thresholds | Detects placement shocks from live labour-market signals |
| 4 | **Career Path Agent** | Static adjacency maps | Recommends career pivots weighted by regional demand |
| 5 | **Offer Survival Agent** | Secondary classifiers | Scores probability of offer revocation using company-health signals |

### ๐Ÿ”„ Multi-Provider LLM Support

Switch providers via a single `.env` variable โ€” no code changes:

| Provider | Model | Best For |
|---|---|---|
| **Groq** | `llama-3.3-70b-versatile` | โšก Fastest inference |
| **Anthropic** | `claude-sonnet-3.5` | ๐Ÿ› ๏ธ Best tool use |
| **OpenRouter** | Aggregator (Claude / Llama / Gemini) | ๐Ÿ”€ Flexibility |
| **OpenAI** | `gpt-4o` | ๐Ÿง  General purpose |

---

## ๐Ÿ› ๏ธ Tech Stack

### Backend
| Technology | Version | Purpose |
|---|---|---|
| Python | 3.10+ | Runtime |
| FastAPI | Latest | REST API framework |
| XGBoost | Latest | Classification model |
| LightGBM | Latest | Salary regression model |
| SHAP | Latest | Model explainability |
| LiteLLM | โ‰ฅ 1.50 | Multi-provider LLM abstraction |
| Pandas / NumPy | Latest | Data processing |
| Uvicorn | Latest | ASGI server |

### Frontend
| Technology | Version | Purpose |
|---|---|---|
| React | 19 | UI framework |
| Vite | 8 | Build tool & dev server |
| React Router | 7 | Client-side routing |
| Recharts | 3 | Data visualisation |
| Lucide React | Latest | Icon system |
| Axios | Latest | HTTP client |

### Design System
- **Brand**: Poonawalla Fincorp corporate identity
- **Primary Colours**: Navy `#1B2C5E` ยท Corporate Blue `#1E56C7`
- **Typography**: Lato + Inter
- **Themes**: Dark mode (default) + Light mode toggle

---

## ๐Ÿš€ Getting Started

### Prerequisites

| Requirement | Minimum Version |
|---|---|
| **Python** | 3.10+ |
| **Node.js** | 18+ |
| **npm** | 9+ |
| **Git** | Any |

### 1๏ธโƒฃ Clone the Repository

```bash
git clone https://github.com/your-org/PlacementIQ.git
cd PlacementIQ
```

### 2๏ธโƒฃ Backend Setup

```bash
cd backend

# Create & activate virtual environment
python -m venv venv

# Windows
.\venv\Scripts\activate
# macOS / Linux
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt
```

### 3๏ธโƒฃ Configure Environment

Create a `.env` file in the `backend/` directory:

```env
# Choose your LLM provider: groq | anthropic | openrouter | openai
PROVIDER=groq

# Provide the matching API key
GROQ_API_KEY=gsk_your_key_here
# ANTHROPIC_API_KEY=sk-ant-...
# OPENAI_API_KEY=sk-...
# OPENROUTER_API_KEY=sk-or-...
```

> ๐Ÿ’ก **Note**: The LLM API key is only required for **agentic features** (NBA, Explainability, Career Paths, Offer Survival). Core ML scoring, the heatmap, shock detection, and all dashboard features work without any key.

### 4๏ธโƒฃ Generate Synthetic Data

```bash
python data_generator.py
```

Produces `data/synthetic_students.csv` with **10,000 student records**.

### 5๏ธโƒฃ Start the Backend

```bash
python main.py
```

Backend runs on **[http://localhost:8001](http://localhost:8001)**. Verify:

```bash
curl http://localhost:8001/health
# โ†’ {"status":"ok","students_loaded":10000}
```

### 6๏ธโƒฃ Frontend Setup

In a **new terminal**:

```bash
cd frontend
npm install
npm run dev
```

Frontend runs on **[http://localhost:5173](http://localhost:5173)**. Open it in your browser.

---

## โœ… Quick Verification

After setup, verify these work:

| Check | URL / Action | Expected |
|---|---|---|
| Backend health | `GET http://localhost:8001/health` | `{"status":"ok"}` |
| Dashboard loads | Open `http://localhost:5173` | Portfolio overview with risk cards |
| Student data | `GET http://localhost:8001/api/v1/students?limit=5` | JSON array of 5 students |
| Heatmap data | `GET http://localhost:8001/api/v1/heatmap/demand` | 18-cell demand grid |
| Theme toggle | Click sun/moon icon in sidebar | Switches dark โ†” light mode |

---

## ๐Ÿ“ธ Outputs โ€” Working Prototype Screenshots

> All screenshots captured from the live prototype running at `http://localhost:5173` (Frontend) + `http://localhost:8001` (Backend, 10,000 students loaded).
> ๐ŸŽฌ **Prefer a video?** [**Watch the full demo on Google Drive โ†’**](https://drive.google.com/drive/folders/1yOtAta0nSEQPCaNb2IFFw2OgZiMW4W31?usp=sharing)

### ๐Ÿ—‚๏ธ Quick Index

| # | Module | Output |
|---|---|---|
| 1โ€“3 | **Dashboard** | Cohort overview, charts, priority watchlist |
| 4 | **Heatmap** | Field ร— Region demand grid |
| 5โ€“7 | **Reports & Drift** | PSI monitor, bulk scoring, score history |
| 8โ€“10 | **Institutes** | Momentum, peer velocity, cold-start |
| 11โ€“12 | **AI Agents** | Command centre + live pipeline output |
| 13โ€“15 | **Admin Panel** | Risk thresholds, NBA costs, model + fairness |

---

### 1. Portfolio Cohort Dashboard โ€” Overview

> Main landing page. Real-time KPIs: **10,000** total portfolio ยท **1,441 HIGH-risk** students ยท **36.4%** 6-month placement velocity ยท **7.31** avg CGPA ยท **5 AI agents** active. Includes a live placement-shock alert (IT Services) and the Early Alert Engine summary.

![Dashboard Overview](docs/screenshots/01_dashboard_overview.png)

---

### 2. Dashboard โ€” Risk Distribution, Placement Velocity & Regional Breakdown

> Three analytics panels: (1) Donut chart splitting 10K students into High / Medium / Low risk bands. (2) Placement-velocity progress bars for 3-month (2.8%), 6-month (36.4%) and 12-month (80.3%) horizons. (3) Top Regions bar chart and Course Mix breakdown (MBA 3,408 ยท Engineering 3,302 ยท Nursing 3,290).

![Dashboard Charts](docs/screenshots/02_dashboard_charts.png)

---

### 3. Priority Student Watchlist

> Filterable table of at-risk students. Columns: Student ID, Course + Tier + Region, CGPA (colour-coded), Monthly EMI, 6M placement status (dot indicator), Risk Band badge (HIGH / MEDIUM / LOW), and a one-click **Analyze** button. Filter tabs for ALL / HIGH / MEDIUM / LOW.

![Priority Student Watchlist](docs/screenshots/03_priority_watchlist.png)

---

### 4. Dynamic Employability Heatmap

> Real-time **Field ร— Region demand grid** sourced from World Bank + India job-portal data. Rows: Engineering, MBA, Nursing. Columns: Bengaluru, Hyderabad, Delhi NCR, Pune, Mumbai, Chennai. Each cell shows a demand score (0โ€“100), YoY trend, and risk level. Avg demand: Engineering 73/100, MBA 75/100, Nursing 76/100.

![Dynamic Employability Heatmap](docs/screenshots/04_heatmap.png)

---

### 5. Reports & Analytics โ€” Model Drift Monitor (PSI)

> Population Stability Index panel. **Overall PSI: 0.025 (STABLE)** ยท Last 30 days ยท No alerts. Feature-level PSI bars for `lgbm`, `field_demand_score`, `behavioral_activity_score`, `macro_climate_index`, `fd`, `internship_months` โ€” all within acceptable drift bounds.

![Model Drift Monitor](docs/screenshots/05_reports_drift_monitor.png)

---

### 6. Reports & Analytics โ€” Bulk Portfolio Scoring (F-09)

> Batch scoring tool: paste up to **1,000 Student IDs**, click **Run Batch Score**. Results table shows Risk Band, 6M placement probability, Expected Salary, and EMI Comfort ratio per student. Example: STU-2026-00001 โ†’ **HIGH** risk, 99% prob, โ‚น99,000 salary, 0.28ร— EMI comfort.

![Bulk Portfolio Scoring](docs/screenshots/06_reports_bulk_scoring.png)

---

### 7. Reports & Analytics โ€” 90-Day Score History & Trend (F-11)

> Longitudinal view of a student's placement-probability trajectory over **90 days** (Febโ€“Apr 2026). Line chart with weekly snapshots and risk-band threshold lines. STU-2026-00003 shows an **Improving** trend, crossing from MEDIUM toward LOW risk band.

![90-Day Score History](docs/screenshots/07_reports_score_history.png)

---

### 8. Institute Intelligence โ€” Momentum Index (10.12)

> Horizontal bar chart ranking institutes by recruiter-visits-to-offers ratio. **IIT Bombay** STRONG (1.2ร—) ยท **BITS Pilani** STABLE (1.16ร—) ยท **NIT Pune** STABLE (0.97ร—). Alert flags **3 institutes** in declining momentum โ€” automatic tier-score adjustments applied.

![Institute Momentum Index](docs/screenshots/08_institutes_momentum.png)

---

### 9. Institute Intelligence โ€” Batch Peer Velocity Tracker (F-11)

> Cohort-level placement-velocity grid broken down by **Course ร— Institute Tier**. Cards show total cohort size, % placed, and alert status (Critical / Stable / Normal). Identifies Engineering Tier-A 2026 cohorts as **Critical** โ€” lagging, students urgently need intervention.

![Batch Peer Velocity](docs/screenshots/09_institutes_peer_velocity.png)

---

### 10. Institute Intelligence โ€” Cold-Start Scoring (F-09)

> AI-based **synthetic scoring for new institutes** with no historical placement data (PRD 9.17). Input: NAAC Grade + City Tier. Output for "New Engineering College, Pune" (B+, Tier 2): **75.3%** synthetic placement probability ยท **โ‚น50,000** avg salary forecast ยท **MEDIUM** confidence. Nearest reference institutes shown.

![Cold-Start Scoring](docs/screenshots/10_institutes_cold_start.png)

---

### 11. Agentic AI Command Center โ€” 5 Live Agents

> Real-time view of all 5 AI agents: **NBA Agent**, **Explainability Agent**, **Market Intel Agent**, **Career Path Agent**, **Offer Survival Agent**. Live Agent Demo panel + System Architecture Flow diagram show how the orchestrator routes between ML models and JSON responses.

![AI Agents Command Center](docs/screenshots/11_ai_agents_command_center.png)

---

### 12. Agentic AI โ€” Live Pipeline JSON Output

> Full agentic-pipeline execution result for **STU-2026-00001**. Shows raw JSON response from the orchestrator: `risk_band`, `placement_score`, `salary_range`, `shap_values`, `recommendations`, `confidence`, `percentage`, `data_gap` โ€” alongside the Agent Capabilities & Tools reference table.

![AI Agents Live Pipeline Output](docs/screenshots/12_ai_agents_pipeline_output.png)

---

### 13. Admin Configuration Panel โ€” Risk Band & EMI Thresholds (F-12)

> Lender-configurable risk thresholds. Dual sliders set **HIGH / MEDIUM cutoffs** for 6-month placement probability. **EMI Comfort Tier** sliders set Comfortable / Adequate / Tight boundaries. Lender profile: Demo Fincorp ยท UNO-DEMO-001 ยท 50,000 max students ยท MFA enabled.

![Admin Risk Thresholds](docs/screenshots/13_admin_risk_thresholds.png)

---

### 14. Admin โ€” Early Alert Engine & NBA Intervention Cost Table

> **Early Alert Engine**: configurable Critical CGPA threshold (6) and Medium CGPA threshold (7), max 100 alerts per run. **NBA Intervention Cost Table** lists ROI inputs used by the Next-Best-Action simulator: Mock Interviews โ‚น0 ยท Python Analytics Course โ‚น2,000 ยท Improve IQI Score โ‚น1,500 ยท Behavioral Activity โ‚น500 ยท Diversify Applications โ‚น0.

![Admin Alert & NBA Costs](docs/screenshots/14_admin_alert_nba_costs.png)

---

### 15. Admin โ€” Model Configuration & Fairness Audit (16.2)

> **Champion model card**: v2.0-prototype ยท deployed 2026-05-01 ยท F1\_6m = **0.86** ยท Salary MAPE = **0.126** ยท PSI = **0.025** ยท traffic 100%. Challenger slot inactive. **Model Fairness Audit**: Region disparity 2.6% โœ… ยท Course disparity 0.6% โœ… ยท **Institute Tier disparity 80.5% โŒ** (exceeds 10% threshold, 30-day SLA).

![Admin Model Config & Fairness Audit](docs/screenshots/15_admin_model_fairness.png)

---

## ๐Ÿ“ก API Reference

### Core Endpoints

| Method | Endpoint | Description |
|---|---|---|
| `POST` | `/api/v1/score/student` | Full agentic scoring (ML + AI agents) |
| `POST` | `/api/v1/score/student/fast` | ML-only scoring (~50ms) |
| `POST` | `/api/v1/score/batch` | Batch scoring (up to 1,000 students) |
| `GET` | `/api/v1/students?limit=N` | List students from portfolio |
| `GET` | `/api/v1/student/{id}` | Full scored profile for a student |
| `GET` | `/api/v1/cohort/summary` | Portfolio-level aggregates |

### AI Agent Endpoints

| Method | Endpoint | Description |
|---|---|---|
| `GET` | `/api/v1/student/{id}/career-paths` | Career-pivot recommendations |
| `GET` | `/api/v1/student/{id}/offer-survival?company=X` | Offer revocation probability |
| `GET` | `/api/v1/shocks/active` | Active placement shocks (real data) |

### Monitoring & Compliance

| Method | Endpoint | Description |
|---|---|---|
| `GET` | `/api/v1/model/drift` | PSI drift monitoring |
| `GET` | `/api/v1/model/metadata` | Model version & metrics |
| `GET` | `/api/v1/student/{id}/history` | 90-day score history |
| `GET` | `/api/v1/student/{id}/audit-report` | Compliance audit report |
| `GET` | `/api/v1/alerts/active` | Early-alert engine |
| `GET` | `/api/v1/heatmap/demand` | Employability heatmap |
| `GET` | `/api/v1/cohort/velocity` | Peer placement velocity |
| `POST` | `/api/v1/feedback` | Outcome submission (retraining loop) |
| `POST` | `/api/v1/institute/cold-start` | New-institute scoring |

๐Ÿ“š Full interactive docs: **[http://localhost:8001/docs](http://localhost:8001/docs)**

---

## ๐Ÿ“Š Frontend Pages

| Page | Route | Description |
|---|---|---|
| **Dashboard** | `/` | Portfolio KPIs, risk distribution, watchlist, top alerts |
| **Portfolio** | `/students` | Student search, filters, individual risk cards |
| **Student Profile** | `/student/:id` | Deep dive: SHAP, NBA, score history, simulations |
| **Heatmap** | `/heatmap` | Field ร— Region demand grid with trend indicators |
| **Reports & Drift** | `/reports` | PSI drift, feature stability, audit export |
| **Institutes** | `/institutes` | Institute benchmarking, cold-start scoring |
| **AI Agents** | `/agentic` | Agent activity viewer, orchestration flow |
| **Admin Panel** | `/admin` | Model config, provider settings, data management |

---

## ๐Ÿ” Configuration

### Environment Variables

| Variable | Required | Description |
|---|---|---|
| `PROVIDER` | Optional | LLM provider: `groq`, `anthropic`, `openrouter`, `openai` |
| `GROQ_API_KEY` | If using Groq | Groq API key |
| `ANTHROPIC_API_KEY` | If using Anthropic | Anthropic API key |
| `OPENAI_API_KEY` | If using OpenAI | OpenAI API key |
| `OPENROUTER_API_KEY` | If using OpenRouter | OpenRouter API key |
| `RECOVERY_COST_INR` | Optional | Default loan-recovery cost (โ‚น180,000) |
| `SHOCK_THRESHOLD_WOW` | Optional | Week-over-week drop threshold for shock detection (0.15) |

---

## ๐Ÿ“ˆ Model Performance

| Metric | Value |
|---|---|
| Classification F1 (6-month) | **0.86** |
| Salary MAPE | **12.6%** |
| Training records | 8,000 |
| Evaluation records | 2,000 |
| Inference latency (ML-only) | ~50 ms |
| Inference latency (full agentic) | ~3โ€“5 s |
| Population Stability Index (PSI) | 0.025 (STABLE) |

---

## ๐Ÿ“ Project Structure

```
PlacementIQ/
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ PlacementIQ_PRD_v2.md                # Product Requirements Document
โ”œโ”€โ”€ PLACEMENTIQ_AGENTIC_IMPLEMENTATION.md
โ”‚
โ”œโ”€โ”€ backend/
โ”‚   โ”œโ”€โ”€ main.py                          # FastAPI app โ€” 32 endpoints
โ”‚   โ”œโ”€โ”€ scoring_engine.py                # XGBoost + LightGBM + SHAP pipeline
โ”‚   โ”œโ”€โ”€ model_pipeline.py                # Model training & persistence
โ”‚   โ”œโ”€โ”€ data_generator.py                # Synthetic student data (10K records)
โ”‚   โ”œโ”€โ”€ real_data_fetcher.py             # World Bank + India market data
โ”‚   โ”œโ”€โ”€ config.py                        # Environment & provider configuration
โ”‚   โ”œโ”€โ”€ requirements.txt                 # Python dependencies
โ”‚   โ”œโ”€โ”€ .env                             # API keys (not committed)
โ”‚   โ”œโ”€โ”€ agents/
โ”‚   โ”‚   โ”œโ”€โ”€ orchestrator.py              # Agent orchestration & parallelisation
โ”‚   โ”‚   โ”œโ”€โ”€ provider.py                  # Multi-LLM provider abstraction
โ”‚   โ”‚   โ”œโ”€โ”€ base_agent.py                # Base agent class (tool calling)
โ”‚   โ”‚   โ”œโ”€โ”€ tools.py                     # Tool registry with caching layer
โ”‚   โ”‚   โ”œโ”€โ”€ nba_agent.py                 # Next-Best-Action recommendations
โ”‚   โ”‚   โ”œโ”€โ”€ explainability_agent.py      # Human-readable risk narratives
โ”‚   โ”‚   โ”œโ”€โ”€ market_agent.py              # Placement-shock detection
โ”‚   โ”‚   โ”œโ”€โ”€ career_path_agent.py         # Career-pivot recommendations
โ”‚   โ”‚   โ””โ”€โ”€ offer_survival_agent.py      # Offer-revocation probability
โ”‚   โ”œโ”€โ”€ data/
โ”‚   โ”‚   โ”œโ”€โ”€ synthetic_students.csv       # Generated student dataset
โ”‚   โ”‚   โ””โ”€โ”€ market_data.json             # Cached market intelligence
โ”‚   โ””โ”€โ”€ models/                          # Trained model artefacts
โ”‚
โ”œโ”€โ”€ frontend/
โ”‚   โ”œโ”€โ”€ index.html
โ”‚   โ”œโ”€โ”€ package.json
โ”‚   โ”œโ”€โ”€ vite.config.js
โ”‚   โ”œโ”€โ”€ public/
โ”‚   โ”‚   โ”œโ”€โ”€ favicon.svg
โ”‚   โ”‚   โ””โ”€โ”€ icons.svg
โ”‚   โ””โ”€โ”€ src/
โ”‚       โ”œโ”€โ”€ main.jsx                     # App entry point
โ”‚       โ”œโ”€โ”€ App.jsx                      # Layout, sidebar, routing
โ”‚       โ”œโ”€โ”€ App.css                      # Theme-specific glassmorphism
โ”‚       โ”œโ”€โ”€ index.css                    # Design system tokens (800+ lines)
โ”‚       โ”œโ”€โ”€ components/
โ”‚       โ”‚   โ””โ”€โ”€ Background3D.jsx         # Animated 3D background
โ”‚       โ”œโ”€โ”€ context/
โ”‚       โ”‚   โ””โ”€โ”€ ThemeContext.jsx         # Dark / Light theme provider
โ”‚       โ””โ”€โ”€ pages/
โ”‚           โ”œโ”€โ”€ Dashboard.jsx            # Portfolio overview + risk cards
โ”‚           โ”œโ”€โ”€ StudentProfile.jsx       # Individual student deep dive
โ”‚           โ”œโ”€โ”€ Heatmap.jsx              # Field ร— Region demand grid
โ”‚           โ”œโ”€โ”€ Reports.jsx              # Drift monitoring + audit
โ”‚           โ”œโ”€โ”€ Institutes.jsx           # Institute benchmarking
โ”‚           โ”œโ”€โ”€ AgenticInsights.jsx      # AI-agent activity viewer
โ”‚           โ””โ”€โ”€ Admin.jsx                # Settings + configuration
โ”‚
โ”œโ”€โ”€ docs/
โ”‚   โ””โ”€โ”€ screenshots/                     # Prototype output screenshots (15 files)
โ”‚
โ””โ”€โ”€ .gitignore
```

---

<p align="center">
  <a href="https://drive.google.com/drive/folders/1yOtAta0nSEQPCaNb2IFFw2OgZiMW4W31?usp=sharing">
    ๐ŸŽฌ <strong>Watch the Full Demo Video</strong> ๐ŸŽฌ
  </a>
</p>

<p align="center">
  <strong>PlacementIQ</strong> โ€” Built by <strong>Team TenzorX</strong> for <strong>Poonawalla Fincorp</strong><br/>
  <sub>Career Risk Intelligence โ€ข Agentic AI โ€ข Education Loan Analytics</sub>
</p>

<p align="center">
  <sub>ยฉ 2026 Poonawalla Fincorp ยท All rights reserved ยท Proprietary</sub>
</p>