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 
 
 
 
 
 
 
45dce4f
 
 
 
 
 
4ec07e1
9bc7a47
45dce4f
 
 
9bc7a47
 
 
 
 
 
 
 
 
 
45dce4f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 134,
   "id": "b75a238a",
   "metadata": {},
   "outputs": [],
   "source": [
    "from typing import Any, Dict, List, Optional, Tuple,TypedDict,Literal\n",
    "from typing import Annotated, Sequence\n",
    "import os\n",
    "from pydantic import BaseModel, Field\n",
    "from langchain_groq import ChatGroq\n",
    "from langchain_core.messages import SystemMessage, HumanMessage,ToolMessage,AIMessage\n",
    "from langchain_core.tools import Tool\n",
    "from langgraph.graph import StateGraph,END,START\n",
    "from langgraph.types import interrupt  \n",
    "from langchain_core.prompts import ChatPromptTemplate,MessagesPlaceholder\n",
    "from langchain_community.document_loaders import  PyMuPDFLoader\n",
    "import json\n",
    "from pydantic import BaseModel, Field\n",
    "from typing import List, Optional\n",
    "from pprint import pprint\n",
    "import os\n",
    "from dotenv import load_dotenv\n",
    "import json\n",
    "from langchain_core.documents import Document\n",
    "from langchain_huggingface import HuggingFaceEmbeddings\n",
    "import os\n",
    "from pinecone import Pinecone, ServerlessSpec\n",
    "from pinecone_text.sparse import BM25Encoder\n",
    "from langchain_community.embeddings import HuggingFaceEmbeddings\n",
    "from langchain_community.retrievers import PineconeHybridSearchRetriever\n",
    "import json\n",
    "from langchain_core.documents import Document\n",
    "from langchain_core.messages import BaseMessage\n",
    "from langgraph.graph import add_messages\n",
    "from langgraph.prebuilt import ToolNode ,tools_condition\n",
    "import torch\n",
    "from langgraph.checkpoint.memory import MemorySaver\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c7058b37",
   "metadata": {},
   "source": [
    "Pydantic model of resume data extraction"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "69094b87",
   "metadata": {},
   "source": [
    "**Defining the pydantic models to be used**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "id": "7da5b1c6",
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "\n",
    "\n",
    "class Skill(BaseModel):\n",
    "    name: str = Field(..., description=\"Skill name e.g. Python, Docker\")\n",
    "    category: Optional[str] = Field(\n",
    "        None, description=\"Category: Backend | ML | DevOps | Frontend | Other\"\n",
    "    )\n",
    "\n",
    "\n",
    "class ExperienceItem(BaseModel):\n",
    "    job_title: str = Field(\n",
    "        ...,\n",
    "        description=\"Role title of the candidate. Example: 'Backend Intern', 'Software Engineer'\"\n",
    "    )\n",
    "\n",
    "    experience_type: Optional[Literal['internship', 'full_time', 'contract', 'freelance']] = Field(\n",
    "        None,\n",
    "        description=\"Type of experience: internship, full_time, contract, or freelance\"\n",
    "    )\n",
    "\n",
    "    duration_months: Optional[int] = Field(\n",
    "        None,\n",
    "        description=\"Duration of this role in months. Null if not explicitly mentioned\"\n",
    "    )\n",
    "\n",
    "    technologies: Optional[List[str]] = Field(\n",
    "        default_factory=list,\n",
    "        description=\"Technologies, tools, or frameworks used in this role\"\n",
    "    )\n",
    "\n",
    "    responsibilities: Optional[List[str]] = Field(\n",
    "        default_factory=list,\n",
    "        description=\"Key responsibilities, tasks, or learnings in concise bullet points\"\n",
    "    )\n",
    "\n",
    "class ProjectItem(BaseModel):\n",
    "    name: str = Field(..., description=\"Project name\")\n",
    "    technologies: List[str] = Field(\n",
    "        default_factory=list,\n",
    "        description=\"Technologies used in this project\"\n",
    "    )\n",
    "    what_was_built: Optional[str] = Field(\n",
    "        None,\n",
    "        description=\"One line — what problem it solved or what was built\"\n",
    "    )\n",
    "\n",
    "\n",
    "class CertificationItem(BaseModel):\n",
    "    name: str = Field(..., description=\"Certification name\")\n",
    "    issuer: Optional[str] = Field(None, description=\"Issuing organization\")\n",
    "    topics_covered: List[str] = Field(\n",
    "        default_factory=list,\n",
    "        description=\"Key topics or skills the certification covers\"\n",
    "    )\n",
    "\n",
    "\n",
    "class AchievementItem(BaseModel):\n",
    "    title: str = Field(..., description=\"Achievement title\")\n",
    "    domain: Optional[str] = Field(\n",
    "        None,\n",
    "        description=\"Domain of achievement e.g. Competitive Programming, Hackathon, Quiz\"\n",
    "    )\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "class ResumeExtract(BaseModel):\n",
    "\n",
    "    \n",
    "    job_title: Optional[str] = Field(\n",
    "    None,\n",
    "    description=(\n",
    "        \"Primary job title or role of the candidate. \"\n",
    "        \"Examples: 'AI Engineer', 'Data Scientist', \"\n",
    "        \"'Construction Project Manager', 'Healthcare Representative'. \"\n",
    "        \"Should reflect the most recent or current role.\"\n",
    "       )\n",
    "    )\n",
    "\n",
    "    \n",
    "    \n",
    "\n",
    "    total_experience_months: Optional[int] = Field(\n",
    "       0,\n",
    "      description=(\n",
    "        \"Total professional work experience in months. \"\n",
    "        \"Includes internships and full-time roles. \"\n",
    "        \"0 if fresher or no experience found.\"\n",
    "      )\n",
    "    )\n",
    "   \n",
    "\n",
    "   \n",
    "    skills: List[Skill] = Field(\n",
    "        default_factory=list,\n",
    "        description=\"Skills explicitly listed by the candidate\"\n",
    "    )\n",
    "    experience: List[ExperienceItem] = Field(\n",
    "        default_factory=list,\n",
    "        description=(\n",
    "            \"Each role as a separate entry. \"\n",
    "            \"No company name needed — focus on what was done and learned.\"\n",
    "        )\n",
    "    )\n",
    "    projects: List[ProjectItem] = Field(\n",
    "        default_factory=list,\n",
    "        description=\"Projects with technologies used and what was built\"\n",
    "    )\n",
    "    certifications: Optional[List[CertificationItem]] = Field(\n",
    "        None,\n",
    "        description=\"Certifications with topics they cover. None if not present.\"\n",
    "    )\n",
    "    achievements: Optional[List[AchievementItem]] = Field(\n",
    "        None,\n",
    "        description=\"Accomplishments that signal domain strength or soft skills. None if not present.\"\n",
    "    )\n",
    "\n",
    "\n",
    "    is_fresher: bool = Field(\n",
    "    ...,\n",
    "    description=(\n",
    "        \"Set to True if the candidate lacks full-time professional employment. \"\n",
    "        \"Academic projects, certifications, and internships are considered \"\n",
    "        \"part of the learning phase and do not qualify a candidate as 'non-fresher' hence is_.\"\n",
    "    )\n",
    ")\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5b0756e0",
   "metadata": {},
   "source": [
    "Pydantic model for job description"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "id": "4b2441cd",
   "metadata": {},
   "outputs": [],
   "source": [
    "from pydantic import BaseModel, Field\n",
    "from typing import List, Optional\n",
    "\n",
    "\n",
    "class SkillRequirement(BaseModel):\n",
    "    name: str = Field(\n",
    "        ...,\n",
    "        description=\"Skill or technology required for the job (e.g., Python, SQL, React)\"\n",
    "    )\n",
    "    level: Optional[str] = Field(\n",
    "        None,\n",
    "        description=\"Expected proficiency level: beginner | intermediate | strong\"\n",
    "    )\n",
    "\n",
    "\n",
    "class ResponsibilityItem(BaseModel):\n",
    "    description: str = Field(\n",
    "        ...,\n",
    "        description=\"Key responsibility or task expected from the candidate\"\n",
    "    )\n",
    "\n",
    "\n",
    "class RequirementItem(BaseModel):\n",
    "    description: str = Field(\n",
    "        ...,\n",
    "        description=\"Qualification or requirement such as education, availability, etc.\"\n",
    "    )\n",
    "\n",
    "\n",
    "class ConstraintItem(BaseModel):\n",
    "    type: str = Field(\n",
    "        ...,\n",
    "        description=\"Constraint type such as location, duration, eligibility\"\n",
    "    )\n",
    "    value: str = Field(\n",
    "        ...,\n",
    "        description=\"Constraint value (e.g., 'Pune only', '6 months', 'Fresher')\"\n",
    "    )\n",
    "\n",
    "\n",
    "\n",
    "class JobDescriptionExtract(BaseModel):\n",
    "    job_title: Optional[str] = Field(\n",
    "        None,\n",
    "        description=\"Job role/title (e.g., AI/ML Intern, Web Developer)\"\n",
    "    )\n",
    "\n",
    "    company_name: Optional[str] = Field(\n",
    "        None,\n",
    "        description=\"Company offering the job\"\n",
    "    )\n",
    "\n",
    "    location: Optional[str] = Field(\n",
    "        None,\n",
    "        description=\"Job location if specified\"\n",
    "    )\n",
    "\n",
    "    employment_type: Optional[str] = Field(\n",
    "        None,\n",
    "        description=\"Type of job: internship, full-time, contract\"\n",
    "    )\n",
    "\n",
    "    duration_months: Optional[int] = Field(\n",
    "        None,\n",
    "        description=\"Duration of role in months (for internships/contracts)\"\n",
    "    )\n",
    "\n",
    "    is_fresher_allowed: Optional[bool] = Field(\n",
    "        None,\n",
    "        description=\"Whether freshers are eligible for this role\"\n",
    "    )\n",
    "\n",
    "    skills_required: Optional[List[SkillRequirement]] = Field(\n",
    "        None,\n",
    "        description=\"List of required skills and expected levels\"\n",
    "    )\n",
    "\n",
    "    tools_technologies: Optional[List[str]] = Field(\n",
    "        None,\n",
    "        description=\"Specific tools/frameworks mentioned (e.g., Pandas, WordPress)\"\n",
    "    )\n",
    "\n",
    "    responsibilities: Optional[List[ResponsibilityItem]] = Field(\n",
    "        None,\n",
    "        description=\"Key job responsibilities\"\n",
    "    )\n",
    "\n",
    "    requirements: Optional[List[RequirementItem]] = Field(\n",
    "        None,\n",
    "        description=\"General requirements like availability, qualifications\"\n",
    "    )\n",
    "\n",
    "    constraints: Optional[List[ConstraintItem]] = Field(\n",
    "        None,\n",
    "        description=\"Special constraints like location restriction, duration, etc.\"\n",
    "    )"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "4b12a3bc",
   "metadata": {},
   "source": [
    "**Pydantic model for skill gap analysis**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "id": "4f1341e0",
   "metadata": {},
   "outputs": [],
   "source": [
    "class SkillGap(BaseModel):\n",
    "    skill_name: str = Field(\n",
    "        ..., \n",
    "        description=\"The specific technology or tool missing or requiring an upgrade (e.g., 'PostgreSQL')\"\n",
    "    )\n",
    "    \n",
    "    gap_type: Literal[\"missing_foundation\", \"needs_advanced_upgrade\"] = Field(\n",
    "        ...,\n",
    "        description=(\n",
    "            \"missing_foundation: Candidate has no recorded experience in this core requirement. \"\n",
    "            \"needs_advanced_upgrade: Candidate knows the basics but needs role-specific advanced training.\"\n",
    "        )\n",
    "    )\n",
    "    \n",
    "    priority: Literal[\"high\", \"medium\", \"low\"] = Field(\n",
    "        ...,\n",
    "        description=\"How critical this skill is for the target job role.\"\n",
    "    )\n",
    "    \n",
    "    reasoning: str = Field(\n",
    "        ...,\n",
    "        description=(\n",
    "            \"The 'Reasoning Trace'. This MUST be provided for every skill gap identified. \"\n",
    "            \"Explain exactly WHY this gap was flagged based on the resume vs JD comparison. \"\n",
    "            \"Example: 'JD requires FastAPI; candidate has Python experience but no record of using FastAPI framework.'\"\n",
    "        )\n",
    "    )\n",
    "    \n",
    "    target_competency: str = Field(\n",
    "        ...,\n",
    "        description=\"The specific outcome the candidate needs to reach (e.g., 'Build asynchronous database endpoints')\"\n",
    "    )\n",
    "\n",
    "class SkillGapAnalysis(BaseModel):\n",
    "    job_title: str = Field(..., description=\"The target role from the JD\")\n",
    "    candidate_name: Optional[str] = Field(None, description=\"Extracted name from resume\")\n",
    "    \n",
    "    analyzed_gaps: List[SkillGap] = Field(\n",
    "        default_factory=list,\n",
    "        description=\"List of specific technical gaps found between Resume and JD\"\n",
    "    )\n",
    "    \n",
    "    is_fresher_adaptation_needed: bool = Field(\n",
    "        default=False,\n",
    "        description=\"True if foundational corporate/soft-skill modules should be added to the path.\"\n",
    "    )\n",
    "    \n",
    "    executive_summary: str = Field(\n",
    "        ...,\n",
    "        description=\"A 2-3 sentence overview of the candidate's readiness and the primary focus of the onboarding.\"\n",
    "    )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "id": "18663bb3",
   "metadata": {},
   "outputs": [],
   "source": [
    "class RoadmapStep(BaseModel):\n",
    "    course_id: str\n",
    "    title: str\n",
    "    reasoning: str = Field(..., description=\"Why this specific course was chosen for this user\")\n",
    "    is_foundation: bool\n",
    "    sequence_order: int = Field(..., description=\"The order in which the course should be taken\")\n",
    "\n",
    "class LearningRoadmap(BaseModel):\n",
    "    candidate_name: str\n",
    "    target_role: str\n",
    "    roadmap: List[RoadmapStep]\n",
    "    onboarding_summary: str"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "604e9728",
   "metadata": {},
   "source": [
    "**Defining  the agents to be used**"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9036d57e",
   "metadata": {},
   "source": [
    "Resume data extraction agent"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 158,
   "id": "14dab004",
   "metadata": {},
   "outputs": [],
   "source": [
    "resume_agent=ChatGroq(\n",
    "    model=\"moonshotai/kimi-k2-instruct-0905\",\n",
    "    temperature=0.2,\n",
    ")\n",
    "\n",
    "\n",
    "resume_agent=resume_agent.with_structured_output(\n",
    "\n",
    "    schema=ResumeExtract,\n",
    "    method=\"json_schema\",\n",
    "    include_raw=True,\n",
    "    strict=True\n",
    ")\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7683eb69",
   "metadata": {},
   "source": [
    "Job description data extraction agent"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 163,
   "id": "472dae2f",
   "metadata": {},
   "outputs": [],
   "source": [
    "jd_agent=ChatGroq(\n",
    "    model=\"meta-llama/llama-4-scout-17b-16e-instruct\",\n",
    "    temperature=0.2,\n",
    ")\n",
    "\n",
    "\n",
    "jd_agent=jd_agent.with_structured_output(\n",
    "\n",
    "    schema=JobDescriptionExtract,\n",
    "    method=\"json_schema\",\n",
    "    include_raw=True,\n",
    "    strict=True\n",
    ")\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d14736d5",
   "metadata": {},
   "source": [
    "defining the gap analysis agent"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 164,
   "id": "0d5e3b17",
   "metadata": {},
   "outputs": [],
   "source": [
    "gap_analysis_agent=ChatGroq(\n",
    "    model=\"openai/gpt-oss-120b\",\n",
    "    temperature=0.2,\n",
    ")\n",
    "\n",
    "\n",
    "gap_analysis_agent=gap_analysis_agent.with_structured_output(\n",
    "    schema=SkillGapAnalysis,\n",
    "    method=\"json_schema\",\n",
    "    include_raw=True,\n",
    "    strict=True\n",
    ")\n",
    "\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "28bc58ad",
   "metadata": {},
   "source": [
    "defining the roadmap planner agent"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 165,
   "id": "0ccc026b",
   "metadata": {},
   "outputs": [],
   "source": [
    "roadmap_planner_agent=ChatGroq(\n",
    "    model=\"moonshotai/kimi-k2-instruct-0905\",\n",
    "    temperature=0.2,\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2bd41131",
   "metadata": {},
   "source": [
    "**Tools**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "id": "c8827093",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Index ready: {'_response_info': {'raw_headers': {'connection': 'keep-alive',\n",
      "                                    'content-length': '187',\n",
      "                                    'content-type': 'application/json',\n",
      "                                    'date': 'Sat, 21 Mar 2026 20:13:46 GMT',\n",
      "                                    'grpc-status': '0',\n",
      "                                    'server': 'envoy',\n",
      "                                    'x-envoy-upstream-service-time': '67',\n",
      "                                    'x-pinecone-request-latency-ms': '66',\n",
      "                                    'x-pinecone-response-duration-ms': '69'}},\n",
      " 'dimension': 384,\n",
      " 'index_fullness': 0.0,\n",
      " 'memoryFullness': 0.0,\n",
      " 'metric': 'dotproduct',\n",
      " 'namespaces': {'__default__': {'vector_count': 33}},\n",
      " 'storageFullness': 0.0,\n",
      " 'total_vector_count': 33,\n",
      " 'vector_type': 'dense'}\n"
     ]
    }
   ],
   "source": [
    "\n",
    "\n",
    "PINECONE_API_KEY = os.getenv(\"PINECONE_API_KEY\")\n",
    "pc = Pinecone(api_key=PINECONE_API_KEY)\n",
    "\n",
    "index_name = \"catalog-embeddings\"\n",
    "\n",
    "\n",
    "# Create index if not exists\n",
    "if index_name not in pc.list_indexes().names():\n",
    "    pc.create_index(\n",
    "        name=index_name,\n",
    "        dimension=384,\n",
    "        metric=\"dotproduct\",\n",
    "        spec=ServerlessSpec(\n",
    "            cloud=\"aws\",\n",
    "            region=\"us-east-1\"\n",
    "        )\n",
    "    )\n",
    "    print(\"Index created.\")\n",
    "\n",
    "index = pc.Index(index_name)\n",
    "print(\"Index ready:\", index.describe_index_stats())\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "44180d94",
   "metadata": {},
   "source": [
    "Opening the docs for BM25 retriver"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "id": "7561b3a1",
   "metadata": {},
   "outputs": [],
   "source": [
    "import json\n",
    "from langchain_core.documents import Document\n",
    "\n",
    "# Initialize the list\n",
    "documents = []\n",
    "\n",
    "# Load the transformed catalog\n",
    "with open(\"formatted_catalog.json\", \"r\") as f:\n",
    "    data = json.load(f)\n",
    "    for doc in data:\n",
    "        # Create a LangChain Document object for each entry\n",
    "        documents.append(\n",
    "            Document(\n",
    "                page_content=doc[\"page_content\"], \n",
    "                metadata=doc[\"metadata\"]\n",
    "            )\n",
    "        )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "id": "f0845a99",
   "metadata": {},
   "outputs": [],
   "source": [
    "device=torch.device(\"cuda\" if torch.cuda.is_available() else \"cpu\")\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "id": "c8e6d2a5",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "dcedae00e39246819acfab4728d68e9c",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "Loading weights:   0%|          | 0/103 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "BertModel LOAD REPORT from: sentence-transformers/all-MiniLM-L6-v2\n",
      "Key                     | Status     |  | \n",
      "------------------------+------------+--+-\n",
      "embeddings.position_ids | UNEXPECTED |  | \n",
      "\n",
      "Notes:\n",
      "- UNEXPECTED\t:can be ignored when loading from different task/architecture; not ok if you expect identical arch.\n"
     ]
    }
   ],
   "source": [
    "embeddings = HuggingFaceEmbeddings(model_name=\"sentence-transformers/all-MiniLM-L6-v2\", model_kwargs={\"device\": device})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "id": "6bc7292f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "application/vnd.jupyter.widget-view+json": {
       "model_id": "3cbc7dfc6bf84c5f98c02933856ed655",
       "version_major": 2,
       "version_minor": 0
      },
      "text/plain": [
       "  0%|          | 0/33 [00:00<?, ?it/s]"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "bm25_encoder = BM25Encoder()\n",
    "\n",
    "bm25_encoder.fit([doc.page_content for doc in documents])\n",
    "\n",
    "retriever = PineconeHybridSearchRetriever(\n",
    "    embeddings=embeddings,\n",
    "    sparse_encoder=bm25_encoder,\n",
    "    index=index\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "id": "03c755a1",
   "metadata": {},
   "outputs": [],
   "source": [
    "from langchain_core.tools import tool\n",
    "from typing import Optional\n",
    "\n",
    "@tool\n",
    "def search_courses(query: str, level: str, category: str):\n",
    "    \"\"\"\n",
    "    Search the course catalog for relevant modules based on a skill query, \n",
    "    difficulty level, and technical category.\n",
    "    \n",
    "    Args:\n",
    "        query: The semantic search term (e.g., 'FastAPI', 'PostgreSQL', 'Docker').\n",
    "        level: The difficulty level required ('beginner', 'intermediate', or 'strong').\n",
    "        category: The technical domain ('Backend', 'Frontend', 'DevOps', 'Cybersecurity', 'Database', 'ML').\n",
    "    \"\"\"\n",
    "    \n",
    "    # Using the hybrid search logic you perfected\n",
    "    # The '$and' ensures the agent gets EXACTLY what fits the candidate's level\n",
    "    results = retriever.invoke(\n",
    "        query, \n",
    "        filter={\n",
    "            \"$and\": [\n",
    "                {\"level\": level},\n",
    "                {\"category\": category}\n",
    "            ]\n",
    "        }\n",
    "    )\n",
    "\n",
    "    if not results:\n",
    "        return f\"No {level} level courses found in the {category} category for '{query}'.\"\n",
    "\n",
    "    # Format the output so the Agent can read the metadata easily\n",
    "    formatted_output = []\n",
    "    for doc in results:\n",
    "        course_info = (\n",
    "            f\"ID: {doc.metadata.get('course_id')}\\n\"\n",
    "            f\"Title: {doc.metadata.get('title')}\\n\"\n",
    "            f\"Description: {doc.page_content}\\n\"\n",
    "            f\"Prerequisites: {doc.metadata.get('prerequisites')}\\n\"\n",
    "            f\"Duration: {doc.metadata.get('duration')} hours\\n\"\n",
    "            \"---\"\n",
    "        )\n",
    "        formatted_output.append(course_info)\n",
    "\n",
    "    return \"\\n\".join(formatted_output)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 105,
   "id": "9db28710",
   "metadata": {},
   "outputs": [],
   "source": [
    "import json\n",
    "from typing import Optional, Dict, Any\n",
    "from langchain_core.tools import tool\n",
    "\n",
    "class CourseLookup:\n",
    "    def __init__(self, catalog_path: str = \"course_catalog.json\"):\n",
    "        self.catalog_path = catalog_path\n",
    "        self.courses_map = {}\n",
    "        self._load_catalog()\n",
    "\n",
    "    def _load_catalog(self):\n",
    "        \"\"\"Loads the catalog into a dictionary for O(1) lookup speed.\"\"\"\n",
    "        try:\n",
    "            with open(self.catalog_path, 'r') as f:\n",
    "                catalog = json.load(f)\n",
    "                # Key the dictionary by course_id for instant retrieval\n",
    "                self.courses_map = {course['course_id']: course for course in catalog}\n",
    "        except FileNotFoundError:\n",
    "            print(f\"Error: {self.catalog_path} not found.\")\n",
    "        except json.JSONDecodeError:\n",
    "            print(f\"Error: Failed to decode {self.catalog_path}.\")\n",
    "\n",
    "    def get_course_details(self, course_id: str) -> Optional[Dict[str, Any]]:\n",
    "        \"\"\"Retrieves full details of a course by its ID.\"\"\"\n",
    "        return self.courses_map.get(course_id)\n",
    "\n",
    "\n",
    "lookup_service = CourseLookup(\"Catalog.json\")\n",
    "\n",
    "@tool\n",
    "def get_course_by_id(course_id: str) -> str:\n",
    "    \"\"\"\n",
    "    Retrieves full details for a specific course using its unique course_id.\n",
    "    Use this tool when you find a prerequisite ID in another course and \n",
    "    need to fetch its title, description, and duration to add to the roadmap.\n",
    "    \"\"\"\n",
    "    details = lookup_service.get_course_details(course_id)\n",
    "    if not details:\n",
    "        return f\"Error: Course with ID {course_id} not found in catalog.\"\n",
    "    \n",
    "    # Return a clean string for the agent to process\n",
    "    return json.dumps(details, indent=2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 106,
   "id": "09d238ab",
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "\n",
    "@tool(args_schema=LearningRoadmap)\n",
    "def submit_final_roadmap(candidate_name, target_role, roadmap, onboarding_summary):\n",
    "    \"\"\"\n",
    "    STRICTLY call this tool to submit the final structured learning roadmap.\n",
    "    This saves the data to the global system and the graph state.\n",
    "    \"\"\"\n",
    "    global final_roadmap_store\n",
    "    \n",
    "    # Construct the structured JSON\n",
    "    result = {\n",
    "        \"candidate_name\": candidate_name,\n",
    "        \"target_role\": target_role,\n",
    "        \"onboarding_summary\": onboarding_summary,\n",
    "        \"roadmap\": [\n",
    "            step.model_dump() if hasattr(step, \"model_dump\") else step \n",
    "            for step in roadmap\n",
    "        ]\n",
    "    }\n",
    "    \n",
    "    \n",
    "    \n",
    "    # Return to LangGraph (will be stored in state via a post-processing node)\n",
    "    return result"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 107,
   "id": "6ad04bc6",
   "metadata": {},
   "outputs": [],
   "source": [
    "mermaid_roadmap_code = \"\" # This is the global variable\n",
    "\n",
    "@tool\n",
    "def submit_mermaid_visualization(mermaid_code: str):\n",
    "    \"\"\"\n",
    "    STRICTLY call this tool to save the Mermaid.js visualization of the roadmap.\n",
    "    \"\"\"\n",
    "    # 1. Tell Python to use the variable from the outer scope\n",
    "    global mermaid_roadmap_code \n",
    "    \n",
    "    # 2. Now this assignment updates the global variable\n",
    "    mermaid_roadmap_code = mermaid_code\n",
    "    \n",
    "    return \"Mermaid visualization stored successfully.\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 108,
   "id": "285f74bb",
   "metadata": {},
   "outputs": [],
   "source": [
    "roadmap_planner_agent_tools=[search_courses, get_course_by_id,submit_final_roadmap,submit_mermaid_visualization]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 109,
   "id": "47564782",
   "metadata": {},
   "outputs": [],
   "source": [
    "roadmap_planner_agent=roadmap_planner_agent.bind_tools(roadmap_planner_agent_tools)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2da3f43b",
   "metadata": {},
   "source": [
    "**Trail resume path**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 110,
   "id": "7cfbfc3a",
   "metadata": {},
   "outputs": [],
   "source": [
    "resumepath=r\"c:\\Users\\ATHARVA\\Downloads\\my codes\\python\\machine_learning\\Learning_Files\\ChirayuResume.pdf\""
   ]
  },
  {
   "cell_type": "markdown",
   "id": "14f4946c",
   "metadata": {},
   "source": [
    "**Langgraph agent state**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 111,
   "id": "5deda2bb",
   "metadata": {},
   "outputs": [],
   "source": [
    "class OnboardingState(TypedDict):\n",
    "    candidate_name: Optional[str]\n",
    "    resume_text: str  \n",
    "    file_path: str \n",
    "    job_description: str \n",
    "    messages: Annotated[Sequence[BaseMessage], add_messages]\n",
    "    \n",
    "    # Analysis & Extraction Data\n",
    "    skill_gap_analysis_data: Optional[SkillGapAnalysis]\n",
    "    resume_data: Optional[ResumeExtract]   \n",
    "    extraction_error: Optional[str]         \n",
    "    JobDescriptionExtract_data: Optional[JobDescriptionExtract]\n",
    "    \n",
    "    # --- NEW KEYS FOR OUTPUT ---\n",
    "    mermaid_code: Optional[str]        # Stores the Mermaid visualization string\n",
    "    final_roadmap: Optional[Dict]      # Stores the final structured JSON roadmap"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e54bac6a",
   "metadata": {},
   "source": [
    "**Prompts**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 112,
   "id": "c8df9934",
   "metadata": {},
   "outputs": [],
   "source": [
    "from langchain_groq import ChatGroq\n",
    "from langchain_core.prompts import ChatPromptTemplate\n",
    "\n",
    "\n",
    "resume_agent_prompt = \"\"\"\n",
    "<role>\n",
    "You are a precise resume parser. Your only job is to extract structured information from a raw resume text.\n",
    "</role>\n",
    "\n",
    "<rules>\n",
    "- Extract ONLY what is explicitly present in the resume. Do NOT infer or hallucinate missing fields.\n",
    "- current_role: the job title stated at the top of the resume or most recent role. If the candidate is a student with no job, set it to \"Student\".\n",
    "- is_fresher: set True ONLY if the candidate has zero professional work experience. Having projects or certifications does NOT make someone non-fresher.\n",
    "- total_experience_years: total years of professional work only. Set 0.0 for freshers.\n",
    "- skills: extract from the explicit skills section only. Do NOT pull skills from project descriptions here.\n",
    "- experience: each role is a SEPARATE entry. Ignore company name. Focus on job_title, technologies used, and what they did or learned.\n",
    "- projects: extract each project separately. Capture technologies and one line on what was built.\n",
    "- certifications: extract ONLY if present. Set null if none found. Include topics the certification covers.\n",
    "- achievements: extract ONLY if present. Set null if none found. Include the domain (e.g. Hackathon, Quiz, Competitive Programming).\n",
    "\n",
    "</rules>\n",
    "\n",
    "<output_format>\n",
    "Return a single valid JSON object matching the schema. No extra text, no markdown, no explanation.\n",
    "</output_format>\n",
    "\n",
    "\n",
    "\"\"\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 113,
   "id": "608efafd",
   "metadata": {},
   "outputs": [],
   "source": [
    "jd_agent_prompt =\"\"\" \n",
    "<role>\n",
    "You are a precise job description parser.\n",
    "Extract structured information from the given job description.\n",
    "</role>\n",
    "\n",
    "<rules>\n",
    "- Extract ONLY explicitly mentioned information. Do NOT infer or hallucinate.\n",
    "\n",
    "- Follow the provided schema strictly.\n",
    "\n",
    "- If a field is not present, return null (not empty list unless schema default applies).\n",
    "\n",
    "- Keep skills atomic (e.g., Python, SQL, React).\n",
    "\n",
    "- Do NOT mix fields:\n",
    "  - skills = only required skills\n",
    "  - responsibilities = what the candidate will do\n",
    "  - constraints = restrictions like location, duration, eligibility\n",
    "\n",
    "- Convert durations like \"6 months\" into integer months.\n",
    "\n",
    "- is_fresher_allowed:\n",
    "  - True only if explicitly allowed\n",
    "  - False only if explicitly restricted\n",
    " \n",
    "</rules>\n",
    "\n",
    "<output_format>\n",
    "Return a valid JSON object only.\n",
    "</output_format> \"\"\"\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 114,
   "id": "8a6c1483",
   "metadata": {},
   "outputs": [],
   "source": [
    "gap_analysis_agent_prompt=\"\"\"\n",
    "<role>\n",
    "You are an expert technical assessor and the core intelligence of an AI-driven, adaptive onboarding engine[cite: 5]. \n",
    "Your objective is to parse a new hire's current capabilities against a target job description and identify precise skill gaps to reach role-specific competency[cite: 5].\n",
    "</role>\n",
    "\n",
    "<context>\n",
    "Current corporate onboarding utilizes static, \"one-size-fits-all\" curricula, resulting in significant inefficiencies[cite: 3]. \n",
    "Your ultimate goal is to solve this: you must ensure experienced hires do NOT waste time on known concepts, while ensuring beginners are NOT overwhelmed by advanced modules[cite: 3, 4].\n",
    "</context>\n",
    "\n",
    "<rules>\n",
    "- Cross-reference the JD's `skills_required` and `tools_technologies` against the candidate's `skills_list`, `experience.technologies`, and `projects.technologies`.\n",
    "- Identify Hard Gaps: Technologies explicitly required by the JD that are completely absent from the candidate's profile.\n",
    "- Apply Adaptive Logic (Proficiency Gaps):\n",
    "  - For Experienced Hires: If they possess the skill, DO NOT flag it for basic training. Only flag a gap if they need an advanced, role-specific upgrade based on low duration of use.\n",
    "  - For Beginners/Freshers: Flag foundational gaps and prerequisites heavily to ensure they are prepared before tackling complex JD requirements.\n",
    "- Keep skills atomic and highly specific (e.g., output \"FastAPI\" or \"PostgreSQL\", do NOT output vague terms like \"Backend Frameworks\").\n",
    "- Do NOT hallucinate requirements that are not explicitly stated in the JD data.\n",
    "- Do NOT attempt to build the curriculum or suggest courses yet. Your sole focus is diagnosing the gaps.\n",
    "- Provide a concise `reasoning` string for each identified gap. This reasoning MUST justify why the gap exists based on the user's experience level to prove the adaptive logic.\n",
    "</rules>\n",
    "<output_format>\n",
    "Return a valid JSON object only.\n",
    "</output_format>\n",
    "\n",
    "\n",
    "\"\"\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 115,
   "id": "059e5f86",
   "metadata": {},
   "outputs": [],
   "source": [
    "roadmap_planner_agent_prompt=\"\"\"  \n",
    "<role>\n",
    "You are the \"Architect of Growth,\" an expert technical roadmap planner. \n",
    "Your objective is to transform a \"Skill Gap Analysis\" into a logically sequenced, \n",
    "personalized learning journey that ensures \"Role Competency\" in the minimum time possible.\n",
    "</role>\n",
    "\n",
    "<logic_flow>\n",
    "1. ANALYZE GAPS: Review the identified skill gaps, their priority, and the 'gap_type' (foundation vs upgrade).\n",
    "2. INITIAL SEARCH (RAG): For every high/medium priority gap, call 'search_courses'.\n",
    "   - Match the 'level' and 'category' strictly.\n",
    "3. DEPENDENCY RESOLUTION (The \"ID-Lookup\" Step):\n",
    "   - For every course retrieved, inspect the 'prerequisites' field (list of IDs).\n",
    "   - CHECK: Does the 'resume_data' show the candidate already knows these prerequisites?\n",
    "   - IF NOT: You MUST call 'get_course_by_id' for each missing prerequisite ID.\n",
    "   - RECURSION: If the prerequisite itself has prerequisites, repeat this step until the path is complete.\n",
    "4. ADAPTIVE SEQUENCING:\n",
    "   - Always place Prerequisite modules BEFORE the target Skill Gap module.\n",
    "   - If 'is_fresher_adaptation_needed' is True, start the entire roadmap with the 'SOFT-AGILE-101' or similar professional module.\n",
    "5. JUSTIFY: For every course (including prerequisites), provide a unique 'reasoning' trace.\n",
    "   - Example for Prereq: \"Added 'SQL Basics' because 'PostgreSQL Mastery' requires it, and your resume shows no prior database experience.\"\n",
    "6.after you have a complete roadmap, call 'submit_final_roadmap' and 'submit_mermaid_visualization'.\n",
    "</logic_flow>\n",
    "\n",
    "<constraints>\n",
    "- STRICT ID USAGE: Use ONLY the 'course_id' returned by tools. Never guess an ID.\n",
    "- REDUNDANCY CHECK: Do not assign a course if the candidate's projects or experience already prove mastery of that specific topic.\n",
    "- PATH LENGTH: Prioritize the most critical 5-6 modules total to ensure the onboarding is high-impact and achievable.\n",
    "</constraints>\n",
    "\n",
    "\n",
    "<constraints>\n",
    "- DO NOT provide a conversational response at the end. \n",
    "- DO NOT just print JSON. \n",
    "- You MUST call the 'submit_final_roadmap' and 'submit_mermaid_visualization' tool with the final plan.\n",
    "- Ensure 'sequence_order' is 1, 2, 3...\n",
    "</constraints>\n",
    "\n",
    "<example_mermaid>\n",
    "flowchart TD\n",
    "    A([Start — Rahul's current skills]):::start\n",
    "    subgraph W1[\"Week 1 — Core gaps\"]\n",
    "      B[CS-DOCKER-101\\nDocker & Containerization]:::gap\n",
    "      C[CS-PY-101\\nPython Fundamentals]:::known\n",
    "    end\n",
    "    subgraph W2[\"Week 2 — Role readiness\"]\n",
    "      D[CS-CICD-201\\nCI/CD with GitHub Actions]:::gap\n",
    "    end\n",
    "    Z([Role-ready — DevOps Engineer]):::done\n",
    "    A --> B & C\n",
    "    B --> D\n",
    "    D --> Z\n",
    "    classDef gap   fill:#EEEDFE,stroke:#534AB7,color:#26215C\n",
    "    classDef known fill:#E1F5EE,stroke:#0F6E56,color:#085041\n",
    "    classDef start fill:#1D9E75,stroke:#0F6E56,color:#E1F5EE\n",
    "    classDef done  fill:#534AB7,stroke:#3C3489,color:#EEEDFE\n",
    "</example_mermaid>\n",
    "\n",
    "\n",
    "\"\"\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 166,
   "id": "9c4dea1e",
   "metadata": {},
   "outputs": [],
   "source": [
    "from langchain_community.document_loaders import PyMuPDFLoader\n",
    "\n",
    "def input_node(state: OnboardingState):\n",
    "\n",
    "    file_path = state.get(\"file_path\") \n",
    "\n",
    "    if not file_path:\n",
    "        return {\"extraction_error\": \"Missing file_path in state\"}\n",
    "\n",
    "    try:\n",
    "        loader = PyMuPDFLoader(file_path)\n",
    "        docs = loader.load()\n",
    "\n",
    "        \n",
    "        resume_text = \"\\n\".join([doc.page_content for doc in docs])\n",
    "\n",
    "        return {\n",
    "            \"resume_text\": resume_text,\n",
    "            \"extraction_error\": None\n",
    "        }\n",
    "\n",
    "    except Exception as e:\n",
    "        return {\n",
    "            \"extraction_error\": f\"Failed to load resume: {str(e)}\"\n",
    "        }"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 167,
   "id": "eb13ffc0",
   "metadata": {},
   "outputs": [],
   "source": [
    "def extractResumeDataNode(state: OnboardingState):\n",
    "    \n",
    "    resume_text = state[\"resume_text\"]\n",
    "\n",
    "    messages = [\n",
    "        SystemMessage(content=resume_agent_prompt),\n",
    "        HumanMessage(content=f\"<resume_text>{resume_text}</resume_text>\")\n",
    "    ]\n",
    "\n",
    "    \n",
    "    result = resume_agent.invoke(messages)\n",
    "\n",
    "    return {\"resume_data\": result[\"parsed\"]}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 168,
   "id": "330acef6",
   "metadata": {},
   "outputs": [],
   "source": [
    "def extractJDDataNode(state: OnboardingState):\n",
    "    # 1. Safety Check: Is the text even in the state?\n",
    "    jd_text = state.get(\"job_description\", \"\")\n",
    "    \n",
    "    if not jd_text or len(jd_text.strip()) < 5:\n",
    "        print(\"DEBUGGER ERROR: job_description text is MISSING from state!\")\n",
    "        return {\"JobDescriptionExtract_data\": JobDescriptionExtract()}\n",
    "\n",
    "    print(f\"DEBUGGER: Sending {len(jd_text)} characters to JD Agent...\")\n",
    "\n",
    "    messages = [\n",
    "        SystemMessage(content=jd_agent_prompt),\n",
    "        HumanMessage(content=f\"EXTRACT FROM THIS TEXT:\\n\\n{jd_text}\")\n",
    "    ]\n",
    "\n",
    "    try:\n",
    "        # 2. Invoke the agent\n",
    "        result = jd_agent.invoke(messages)\n",
    "        \n",
    "        # 3. Handle the 'parsed' key (ensure your chain is configured correctly)\n",
    "        # If result is already the Pydantic object, use it directly.\n",
    "        # If result is a dict with 'parsed', use result['parsed'].\n",
    "        parsed_data = result.get(\"parsed\") if isinstance(result, dict) else result\n",
    "\n",
    "        # 4. Critical Check: Did it actually find anything?\n",
    "        if parsed_data.job_title is None and parsed_data.tools_technologies is None:\n",
    "            print(\"DEBUGGER WARNING: LLM returned empty schema! Checking prompt...\")\n",
    "        else:\n",
    "            print(f\"DEBUGGER SUCCESS: Extracted {parsed_data.job_title}\")\n",
    "\n",
    "        return {\"JobDescriptionExtract_data\": parsed_data}\n",
    "        \n",
    "    except Exception as e:\n",
    "        print(f\"DEBUGGER CRITICAL: Invoke failed: {str(e)}\")\n",
    "        return {\"JobDescriptionExtract_data\": JobDescriptionExtract()}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 169,
   "id": "7352181c",
   "metadata": {},
   "outputs": [],
   "source": [
    "def skill_gap_node(state: OnboardingState):\n",
    "    \n",
    "    resume_data = state[\"resume_data\"] \n",
    "    candidate_name = state[\"candidate_name\"]\n",
    "    \n",
    "    # To remove noise and reduce size  of the prompt.\n",
    "    lean_resume_dict = resume_data.model_dump(\n",
    "        exclude={\n",
    "            \"achievements\": True, # Drops the entire achievements list\n",
    "            \"skills\": {\"__all__\": {\"category\"}}, # Drops 'category' from every skill\n",
    "            \"experience\": {\"__all__\": {\"responsibilities\"}}, # Drops bullet points\n",
    "            \"projects\": {\"__all__\": {\"what_was_built\"}}, # Drops project descriptions\n",
    "            \"certifications\": {\"__all__\": {\"issuer\"}} # Drops the issuer\n",
    "        },\n",
    "        exclude_none=True # Bonus: Automatically drops any fields that are None/null!\n",
    "    )\n",
    "\n",
    "    raw_jd = state[\"JobDescriptionExtract_data\"]\n",
    "    \n",
    "    # Strip the HR noise and text bloat\n",
    "    lean_jd_dict = raw_jd.model_dump(\n",
    "        exclude={\n",
    "            \"company_name\": True,\n",
    "            \"location\": True,\n",
    "            \"employment_type\": True,\n",
    "            \"duration_months\": True,\n",
    "            \"responsibilities\": True, # Dropping verbose bullet points\n",
    "            \"requirements\": True,\n",
    "            \"constraints\": True\n",
    "        },\n",
    "        exclude_none=True # Drops any null fields\n",
    "    )\n",
    "    \n",
    "    #Convert back to a JSON string if your prompt template requires it\n",
    "    \n",
    "    lean_resume_json = json.dumps(lean_resume_dict, indent=2)\n",
    "\n",
    "\n",
    "    lean_jd_json = json.dumps(lean_jd_dict, indent=2)\n",
    "\n",
    "    messages = [\n",
    "        SystemMessage(content=gap_analysis_agent_prompt),\n",
    "        HumanMessage(content=f\"Users Resume:<lean_resume_json>{lean_resume_json}</lean_resume_json> Job Description:<lean_jd_json>{lean_jd_json}</lean_jd_json>\"),\n",
    "        \n",
    "    ]\n",
    "\n",
    "    \n",
    "    result = gap_analysis_agent.invoke(messages)\n",
    "\n",
    "    return {\"skill_gap_analysis_data\": result[\"parsed\"]}\n",
    "\n",
    "\n",
    "    \n",
    "\n",
    "   "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 170,
   "id": "1fb2f0d1",
   "metadata": {},
   "outputs": [],
   "source": [
    "def roadmap_planning_node(state: OnboardingState):\n",
    "    \"\"\"\n",
    "    The agent's 'thinking' node. It looks at the Skill Gaps and \n",
    "    decides which tool to call next.\n",
    "    \"\"\"\n",
    "    skill_gap_data = state[\"skill_gap_analysis_data\"]\n",
    "\n",
    "    skill_gap_data= skill_gap_data.model_dump()\n",
    "\n",
    "    system_prompt = SystemMessage(content=roadmap_planner_agent_prompt)\n",
    "    input_msg = HumanMessage(content=f\"<skill_gap_data> {skill_gap_data} </skill_gap_data>\")\n",
    "    \n",
    "    response = roadmap_planner_agent.invoke([system_prompt, input_msg] + state[\"messages\"])\n",
    "    \n",
    "    return {\"messages\": [response]}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 171,
   "id": "cea90664",
   "metadata": {},
   "outputs": [],
   "source": [
    "def finalize_state_node(state: OnboardingState):\n",
    "    \"\"\"\n",
    "    Final node that extracts structured data from the message scratchpad\n",
    "    and populates the main state keys. No global variables needed!\n",
    "    \"\"\"\n",
    "    final_roadmap = None\n",
    "    mermaid_code = None\n",
    "\n",
    "    # We search the messages in reverse to find the LATEST tool calls\n",
    "    for msg in reversed(state[\"messages\"]):\n",
    "        # Check if the message has tool calls (this will be an AIMessage)\n",
    "        if hasattr(msg, \"tool_calls\") and msg.tool_calls:\n",
    "            for tool_call in msg.tool_calls:\n",
    "                \n",
    "                # 1. Extract the Roadmap JSON\n",
    "                if tool_call[\"name\"] == \"submit_final_roadmap\":\n",
    "                    final_roadmap = tool_call[\"args\"]\n",
    "                \n",
    "                # 2. Extract the Mermaid String\n",
    "                elif tool_call[\"name\"] == \"submit_mermaid_visualization\":\n",
    "                    mermaid_code = tool_call[\"args\"].get(\"mermaid_code\")\n",
    "\n",
    "        # Once we have both, we can stop searching\n",
    "        if final_roadmap and mermaid_code:\n",
    "            break\n",
    "\n",
    "    \n",
    "    \n",
    "    return {\n",
    "        \"final_roadmap\": final_roadmap,\n",
    "        \"mermaid_code\": mermaid_code\n",
    "    }"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 154,
   "id": "ba9f22e1",
   "metadata": {},
   "outputs": [],
   "source": [
    "tool_node = ToolNode(roadmap_planner_agent_tools)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 172,
   "id": "b5cfe4c3",
   "metadata": {},
   "outputs": [],
   "source": [
    "builder = StateGraph(OnboardingState)\n",
    "\n",
    "# Define Nodes\n",
    "builder.add_node(\"input_node\", input_node)\n",
    "builder.add_node(\"resume_data_extraction\", extractResumeDataNode)\n",
    "builder.add_node(\"jd_data_extraction\", extractJDDataNode)\n",
    "builder.add_node(\"skill_gap_analysis\", skill_gap_node)\n",
    "builder.add_node(\"roadmap_planning_agent\", roadmap_planning_node)\n",
    "builder.add_node(\"tools\", tool_node) # Named 'tools' for tools_condition compatibility\n",
    "builder.add_node(\"finalize_state\", finalize_state_node)\n",
    "\n",
    "# Define Entry Point and initial Extraction Parallelism\n",
    "builder.set_entry_point(\"input_node\")\n",
    "builder.add_edge(\"input_node\", \"resume_data_extraction\")\n",
    "builder.add_edge(\"input_node\", \"jd_data_extraction\")\n",
    "\n",
    "# Join Extractions into Gap Analysis\n",
    "builder.add_edge(\"resume_data_extraction\", \"skill_gap_analysis\")\n",
    "builder.add_edge(\"jd_data_extraction\", \"skill_gap_analysis\")\n",
    "\n",
    "# Transition from Analysis to Planning Agent\n",
    "builder.add_edge(\"skill_gap_analysis\", \"roadmap_planning_agent\")\n",
    "\n",
    "# Agentic ReAct Loop (Planning Agent <-> Tools)\n",
    "builder.add_conditional_edges(\n",
    "    \"roadmap_planning_agent\",\n",
    "    tools_condition,\n",
    "    {\n",
    "        \"tools\": \"tools\",            # If tool_calls exist, go to tools\n",
    "        \"__end__\": \"finalize_state\"  # If finished, go to finalize_state\n",
    "    }\n",
    ")\n",
    "\n",
    "# 2. Loop back to agent after tools\n",
    "builder.add_edge(\"tools\", \"roadmap_planning_agent\")\n",
    "\n",
    "builder.add_edge(\"roadmap_planning_agent\", \"finalize_state\")\n",
    "\n",
    "# Compile the Graph\n",
    "graph = builder.compile()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 139,
   "id": "53588a77",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAawAAAJ2CAIAAACM5yEvAAAQAElEQVR4nOzdBWATZx8G8PeSukIdd7fiDBhWbMAoNtxhwIANdx3uDg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Xt1lRhP6KlxqhbqwYSAEQZTyFFG0vgUHGOWrY9S9O3Lwdhtr+yWre8xb1j7w+fXvWk1Is6OjYd1e1Sv77zu8kBoTqRjY8puhTPhpOiOI/hyXp4j5mAwN4QAAAk1JREFUfmVQXHBnaRCrHQv/C32XUKpeQZbNUCn1/t//DV5clIEhoCQIYvXd0LyyuOz4ER546Y2jazb9vqAxoGMExEoqlbp6Wj06+6JEbc1dFm+CA1au76/l1cl++1wdVWm/bfoTM5yJM/00DpfLZVQPk0o1nIO+ZRu18x/LtIgJj+s6Dr+4ZDCoDoO4rRgWkL+il4unY+pRMllCZOQnja+KjY1Sv6ZPnbWNnb2dIW/W//lziLZR8bI4a6kNS886PDj9zNXdqvPoggwMBCEI4nbl+MfLRz6WaVSIZQNBD95/CooYtBCtgYaENkEQt6qN3HIVsX1w5j9m6cLDIkJfIQENDyVBsAQX/vxw/VRoGT+LLQ9+DP785u4HJKAxIATBQuxb/SooILZw9Vz2Tpb2ZbJnV19HhcUOWoAENAqEIFiOcwff3zgV5uBqU7iahXSefnod/ubhB+pA7je7CAPjQAiCpdk47XlEWIKdk7VPSTenHA5MnIIehIS+UtwztXglx8ZdczEwGoQgWKBXjyNO/v4+/KOMk3JSK4m1o7Wtg5XUykpipUdPYNIVhFqvJGSpxqaalGN0Xun+bi+vfj9EjpPL4uTxsfEx4QkJsQmyeJ6TsLzF7PwH5GVgZAhBsGQX/nr/6kF02MeEhDg+gZJFy8GePJASE43XdNfWLwPVgo/nWIo5fxminCz1rHiO49ROPc6Ko9yUWnHWthKPPDZVG+f0KSDWMqzoIAQBIFvD1+YAIFtDCAJAtoYQBIBsDSEIANkaQhAAsjWEIABka/8HAAD//4+jTE8AAAAGSURBVAMAxij6R9XxEOgAAAAASUVORK5CYII=",
      "text/plain": [
       "<langgraph.graph.state.CompiledStateGraph object at 0x000002AAE7196600>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "display(graph)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 173,
   "id": "0edf8d59",
   "metadata": {},
   "outputs": [],
   "source": [
    "jd_text=\"\"\"Job Title: Backend Developer\n",
    "\n",
    "Company name: CodeForge\n",
    "We are hiring a Backend Developer to build scalable APIs and backend systems.\n",
    "\n",
    "Responsibilities:\n",
    "- Develop REST APIs using FastAPI\n",
    "- Design and manage PostgreSQL databases\n",
    "- Implement authentication and authorization systems\n",
    "- Optimize performance and scalability\n",
    "\n",
    "Requirements:\n",
    "- Strong knowledge of Python\n",
    "- Experience with FastAPI or Django\n",
    "- Good understanding of SQL and database design\n",
    "- Familiarity with Docker\n",
    "\n",
    "Constraints:\n",
    "- Location: Pune only\n",
    "- Full-time role \"\"\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 177,
   "id": "da3df5a4",
   "metadata": {},
   "outputs": [],
   "source": [
    "import json\n",
    "\n",
    "# Define the keys your React frontend actually needs\n",
    "REQUIRED_KEYS = [\"candidate_name\", \"skill_gap_analysis_data\", \"mermaid_code\", \"final_roadmap\"]\n",
    "\n",
    "def export_ui_payload(state, filename=\"hook_output.json\"):\n",
    "    \"\"\"\n",
    "    Extracts specific keys from the graph state and ensures \n",
    "    Pydantic objects are dumped to dicts for JSON compatibility.\n",
    "    \"\"\"\n",
    "    ui_data = {}\n",
    "\n",
    "    for key in REQUIRED_KEYS:\n",
    "        # Get the value from the state\n",
    "        val = state.get(key)\n",
    "        \n",
    "        if val is None:\n",
    "            continue\n",
    "\n",
    "        # Check if the value is a Pydantic object (has .model_dump())\n",
    "        # This fixes the \"skill_gap_analysis_data as a string\" issue\n",
    "        if hasattr(val, \"model_dump\"):\n",
    "            ui_data[key] = val.model_dump()\n",
    "        else:\n",
    "            # If it's already a dict (final_roadmap) or string (mermaid_code)\n",
    "            ui_data[key] = val\n",
    "\n",
    "    # Save to the local file\n",
    "    with open(filename, \"w\", encoding=\"utf-8\") as f:\n",
    "        json.dump(ui_data, f, indent=2)\n",
    "    \n",
    "    print(f\"✅ UI Payload successfully exported to {filename}\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 182,
   "id": "4577f33b",
   "metadata": {},
   "outputs": [],
   "source": [
    "from langchain_core.callbacks import BaseCallbackHandler\n",
    "\n",
    "class ExportHook(BaseCallbackHandler):\n",
    "    def __init__(self, filename=\"k_output.json\"):\n",
    "        self.filename = filename\n",
    "\n",
    "    def on_chain_end(self, outputs: dict, *, run_id, parent_run_id=None, **kwargs):\n",
    "        \"\"\"\n",
    "        parent_run_id is None ONLY for the top-level graph execution.\n",
    "        This ensures it runs exactly once when the entire graph finishes.\n",
    "        \"\"\"\n",
    "        # 1. Only run for the root graph (no parent)\n",
    "        if parent_run_id is not None:\n",
    "            return\n",
    "\n",
    "        # 2. Safety check: ensure 'outputs' is actually a dictionary\n",
    "        if not isinstance(outputs, dict):\n",
    "            return\n",
    "\n",
    "        print(f\"📦 Exporting final graph payload...\")\n",
    "        export_ui_payload(outputs, filename=self.filename)\n",
    "\n",
    "# Usage remains the same\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a95b4db7",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "DEBUGGER: Sending 525 characters to JD Agent...\n",
      "DEBUGGER SUCCESS: Extracted Backend Developer\n"
     ]
    }
   ],
   "source": [
    "initial_input = {\n",
    "    \"candidate_name\": \"Chirayu Jain\",\n",
    "    \"resume_text\": None,\n",
    "    \"job_description\": jd_text,\n",
    "    \"file_path\": resumepath,\n",
    "    \"resume_data\": None,\n",
    "    \"extraction_error\": None,\n",
    "    \"JobDescriptionExtract_data\": None,\n",
    "    \"skill_gap_analysis_data\": None\n",
    "    \n",
    "    \n",
    "}\n",
    "\n",
    "\n",
    "checkpointer = MemorySaver()  \n",
    "graph = builder.compile(checkpointer=checkpointer)\n",
    "\n",
    "THREAD_ID = str(\"sex-thread-id\")\n",
    "\n",
    "config = {\"configurable\": {\"thread_id\": THREAD_ID,\"langgraph_user_id\": \"Chirayu Jain\"}, \"callbacks\": [ExportHook]}\n",
    "\n",
    "final_state = graph.invoke(initial_input, config=config)\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 127,
   "id": "5afbce5b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'candidate_name': 'Chirayu Jain',\n",
       " 'resume_text': 'Chirayu Jain\\nSOFTWARE DEVELOPER\\n+91-9462128878 | chirayujain93@gmail.com | LinkedIn | GitHub | CodeChef | Leetcode\\nEDUCATION\\nIndian Institute of Information Technology, Kota (CGPA-8.1)\\nKota, Rajasthan\\nB.Tech in Electronics and Communication Engineering\\n2022 - Present\\nWORK EXPERIENCE\\nNAV India\\nJan 2026 - Present\\nTechnology Intern\\nOnsite – Jaipur, Rajasthan\\n• As part of the AI/ML team, built Flask API for the RTA investor verification team, implementing 2\\nconfidence-scoring pipelines using OCR extraction (PyMuPDF, Docling) to parse PDF/forms and\\nextract 3 key KYC investor attributes, reducing verification time from 20–30 minutes to 2–3 minutes.\\n• Developed a scalable document intelligence pipeline with parallel CPU processing using Docling OCR,\\nsemantic chunking, and LLM-based extraction to process 60+ page financial documents and identify\\ninvestor/investee details, reducing extraction time by 35%.\\n• Implementing Cron-based background workers to generate automated weekly email analytics reports\\ntracking API accuracy and confidence match-mismatch scores, improving scoring precision and reducing\\noverall document processing latency by 40%.\\nVestbox\\nApril 2025 - May 2025\\nSoftware Development intern\\nRemote\\n• Developed Groceazy app in Flutter (MVVM), integrating 10+ modules for grocery service , order management\\nand Applied clean code practices (SOLID, modular design) for scalability.\\n• Implemented secure user authentication and role-based access, ensuring smooth login and data protection.\\n• Built image-to-item price matcher using APIs across 5+ platforms, enabling best-price suggestions.\\nPROJECTS\\nHostel Bites – IIITK Canteen App | Flutter, Dart, Firebase, Cloud Firestore, Mapbox API\\n• Developed a Flutter app for hostel residents to order food, increasing canteen efficiency by 35%.\\n• Implemented role-based access for students, staff, and admin, increasing operational efficiency by 40%.\\n• Integrated Firebase Auth, Firestore, Storage, and Mapbox API for secure logins, and live order tracking.\\n• GitHub: Live link\\nJobShield - Fake Job Detector | Flutter, Dart, Python, Flask, SQLite\\n• Developed a Flask+Python fake job detection API with a custom NLP model, with 95% classification accuracy.\\n• Built a responsive web interface using Flutter (Web), integrated with the backend, enabling seamless real-time\\ndetection for 500+ job postings.\\n• Github: Live Link\\nTECHNICAL SKILLS\\nLanguages: C/C++ , Java , Python , JavaScript, Dart\\nFrontend: Flutter, HTML/CSS, ReactJS\\nBackend: Firebase, REST APIs, Flask, Django, NodeJS, ExpressJS\\nDatabase Management: MySQL, MongoDB, SQLite\\nTools and Frameworks: GitHub, Android Studio, Visual Studio Code, MATLAB, Cursor, Github Copilot\\nLibraries: Provider, Bloc, Scikit-learn, tensorflow\\nACHIEVEMENTS & CERTIFICATIONS\\n• Ranked 81 in Inter IIIT Coding Contest Optigo, competing against top-tier programmers - View credential.\\n• Obtained Certification in Graph Algorithms from AlgoUniversity - View credential.\\n• Achieved a 4-star CodeChef rating and earned the Knight(Max. 1888) badge on LeetCode.\\n• Developed an e-waste facility locator application for SIH’23, successfully advancing to the regionals.',\n",
       " 'file_path': 'c:\\\\Users\\\\ATHARVA\\\\Downloads\\\\my codes\\\\python\\\\machine_learning\\\\Learning_Files\\\\ChirayuResume.pdf',\n",
       " 'job_description': 'Job Title: Backend Developer\\n\\nCompany name: CodeForge\\nWe are hiring a Backend Developer to build scalable APIs and backend systems.\\n\\nResponsibilities:\\n- Develop REST APIs using FastAPI\\n- Design and manage PostgreSQL databases\\n- Implement authentication and authorization systems\\n- Optimize performance and scalability\\n\\nRequirements:\\n- Strong knowledge of Python\\n- Experience with FastAPI or Django\\n- Good understanding of SQL and database design\\n- Familiarity with Docker\\n\\nConstraints:\\n- Location: Pune only\\n- Full-time role ',\n",
       " 'messages': [AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'functions.search_courses:0', 'function': {'arguments': '{\"category\":\"Backend\",\"level\":\"beginner\",\"query\":\"FastAPI\"}', 'name': 'search_courses'}, 'type': 'function'}]}, response_metadata={'token_usage': {'completion_tokens': 32, 'prompt_tokens': 1640, 'total_tokens': 1672, 'completion_time': 0.079339676, 'completion_tokens_details': None, 'prompt_time': 0.038547803, 'prompt_tokens_details': {'cached_tokens': 1280}, 'queue_time': 0.281301725, 'total_time': 0.117887479}, 'model_name': 'moonshotai/kimi-k2-instruct-0905', 'system_fingerprint': 'fp_00c37775b7', 'service_tier': 'on_demand', 'finish_reason': 'tool_calls', 'logprobs': None, 'model_provider': 'groq'}, id='lc_run--019d1214-3656-7230-9aa7-a78c866d9fd4-0', tool_calls=[{'name': 'search_courses', 'args': {'category': 'Backend', 'level': 'beginner', 'query': 'FastAPI'}, 'id': 'functions.search_courses:0', 'type': 'tool_call'}], invalid_tool_calls=[], usage_metadata={'input_tokens': 1640, 'output_tokens': 32, 'total_tokens': 1672, 'input_token_details': {'cache_read': 1280}}),\n",
       "  ToolMessage(content=\"ID: CS-FAST-101\\nTitle: None\\nDescription: Title: REST API Development with FastAPI. Description: Build production-ready REST APIs using FastAPI, covering routing, request validation with Pydantic, and basic authentication.. Outcomes: Create REST endpoints with path and query params, Validate request/response with Pydantic models, Implement JWT-based authentication\\nPrerequisites: ['CS-PY-101']\\nDuration: 6 hours\\n---\", name='search_courses', id='3b97803f-8036-43b8-a31d-2f1b50d72c14', tool_call_id='functions.search_courses:0'),\n",
       "  AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'functions.search_courses:1', 'function': {'arguments': '{\"category\":\"Database\",\"level\":\"beginner\",\"query\":\"PostgreSQL\"}', 'name': 'search_courses'}, 'type': 'function'}]}, response_metadata={'token_usage': {'completion_tokens': 32, 'prompt_tokens': 1781, 'total_tokens': 1813, 'completion_time': 0.078526168, 'completion_tokens_details': None, 'prompt_time': 0.050791493, 'prompt_tokens_details': {'cached_tokens': 1280}, 'queue_time': 0.287734077, 'total_time': 0.129317661}, 'model_name': 'moonshotai/kimi-k2-instruct-0905', 'system_fingerprint': 'fp_05df423bab', 'service_tier': 'on_demand', 'finish_reason': 'tool_calls', 'logprobs': None, 'model_provider': 'groq'}, id='lc_run--019d1214-3fa2-76b0-9dc8-1d2c0b01ff61-0', tool_calls=[{'name': 'search_courses', 'args': {'category': 'Database', 'level': 'beginner', 'query': 'PostgreSQL'}, 'id': 'functions.search_courses:1', 'type': 'tool_call'}], invalid_tool_calls=[], usage_metadata={'input_tokens': 1781, 'output_tokens': 32, 'total_tokens': 1813, 'input_token_details': {'cache_read': 1280}}),\n",
       "  ToolMessage(content='ID: CS-DB-101\\nTitle: None\\nDescription: Title: SQL Fundamentals for Backend Developers. Description: Foundational course covering relational database concepts, CRUD operations, and basic JOINs using SQLite and PostgreSQL.. Outcomes: Write basic SELECT queries with filters, Understand Primary and Foreign Keys, Perform data insertion, updates, and deletions\\nPrerequisites: []\\nDuration: 4 hours\\n---', name='search_courses', id='64af5ac2-b743-4c32-a73b-4fd8dc35a130', tool_call_id='functions.search_courses:1'),\n",
       "  AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'functions.search_courses:2', 'function': {'arguments': '{\"category\":\"DevOps\",\"level\":\"beginner\",\"query\":\"Docker\"}', 'name': 'search_courses'}, 'type': 'function'}]}, response_metadata={'token_usage': {'completion_tokens': 32, 'prompt_tokens': 1914, 'total_tokens': 1946, 'completion_time': 0.081289553, 'completion_tokens_details': None, 'prompt_time': 0.038772376, 'prompt_tokens_details': {'cached_tokens': 1792}, 'queue_time': 0.287688574, 'total_time': 0.120061929}, 'model_name': 'moonshotai/kimi-k2-instruct-0905', 'system_fingerprint': 'fp_05df423bab', 'service_tier': 'on_demand', 'finish_reason': 'tool_calls', 'logprobs': None, 'model_provider': 'groq'}, id='lc_run--019d1214-4326-7e41-a4b4-a509a4c5dd26-0', tool_calls=[{'name': 'search_courses', 'args': {'category': 'DevOps', 'level': 'beginner', 'query': 'Docker'}, 'id': 'functions.search_courses:2', 'type': 'tool_call'}], invalid_tool_calls=[], usage_metadata={'input_tokens': 1914, 'output_tokens': 32, 'total_tokens': 1946, 'input_token_details': {'cache_read': 1792}}),\n",
       "  ToolMessage(content='ID: CS-DOCKER-101\\nTitle: None\\nDescription: Title: Docker & Containerization Fundamentals. Description: Learn containerization fundamentals — writing Dockerfiles, managing images, volumes, and running multi-container apps with Docker Compose.. Outcomes: Write efficient multi-stage Dockerfiles, Manage container lifecycle and networking, Orchestrate multi-service apps with Docker Compose\\nPrerequisites: []\\nDuration: 5 hours\\n---\\nID: CS-LINUX-101\\nTitle: None\\nDescription: Title: Linux & Shell Scripting for Developers. Description: Practical Linux skills for developers covering file system navigation, permissions, process management, and bash scripting.. Outcomes: Navigate and manage the Linux file system, Write bash scripts for automation, Manage processes, cron jobs, and system services\\nPrerequisites: []\\nDuration: 5 hours\\n---', name='search_courses', id='39673178-0b41-453c-80ea-5d360a741d29', tool_call_id='functions.search_courses:2'),\n",
       "  AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'functions.get_course_by_id:3', 'function': {'arguments': '{\"course_id\":\"CS-PY-101\"}', 'name': 'get_course_by_id'}, 'type': 'function'}]}, response_metadata={'token_usage': {'completion_tokens': 24, 'prompt_tokens': 2133, 'total_tokens': 2157, 'completion_time': 0.067035318, 'completion_tokens_details': None, 'prompt_time': 0.101946396, 'prompt_tokens_details': {'cached_tokens': 1536}, 'queue_time': 0.280975424, 'total_time': 0.168981714}, 'model_name': 'moonshotai/kimi-k2-instruct-0905', 'system_fingerprint': 'fp_00c37775b7', 'service_tier': 'on_demand', 'finish_reason': 'tool_calls', 'logprobs': None, 'model_provider': 'groq'}, id='lc_run--019d1214-46a1-7213-82bc-083edbd92ffb-0', tool_calls=[{'name': 'get_course_by_id', 'args': {'course_id': 'CS-PY-101'}, 'id': 'functions.get_course_by_id:3', 'type': 'tool_call'}], invalid_tool_calls=[], usage_metadata={'input_tokens': 2133, 'output_tokens': 24, 'total_tokens': 2157, 'input_token_details': {'cache_read': 1536}}),\n",
       "  ToolMessage(content='{\\n  \"course_id\": \"CS-PY-101\",\\n  \"title\": \"Python Programming Fundamentals\",\\n  \"level\": \"beginner\",\\n  \"category\": \"Programming\",\\n  \"description\": \"A comprehensive introduction to Python covering primitive and complex data types, control flow structures, function design, object-oriented programming principles, exception handling, and file I/O. Students build a strong syntactic and conceptual foundation before moving to applied domains.\",\\n  \"learning_outcomes\": [\\n    \"Write clean Python functions and classes\",\\n    \"Understand list, dict, and set operations\",\\n    \"Handle exceptions and file I/O\"\\n  ],\\n  \"prerequisites\": [],\\n  \"estimated_duration_hours\": 6,\\n  \"tags\": [\\n    \"Python\",\\n    \"Programming\",\\n    \"OOP\"\\n  ]\\n}', name='get_course_by_id', id='c811ad56-358d-4556-a77f-def55fa2c7eb', tool_call_id='functions.get_course_by_id:3'),\n",
       "  AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'functions.search_courses:4', 'function': {'arguments': '{\"category\":\"Backend\",\"level\":\"beginner\",\"query\":\"professional skills\"}', 'name': 'search_courses'}, 'type': 'function'}]}, response_metadata={'token_usage': {'completion_tokens': 32, 'prompt_tokens': 2339, 'total_tokens': 2371, 'completion_time': 0.095311384, 'completion_tokens_details': None, 'prompt_time': 0.071666636, 'prompt_tokens_details': {'cached_tokens': 1792}, 'queue_time': 0.287408461, 'total_time': 0.16697802}, 'model_name': 'moonshotai/kimi-k2-instruct-0905', 'system_fingerprint': 'fp_05df423bab', 'service_tier': 'on_demand', 'finish_reason': 'tool_calls', 'logprobs': None, 'model_provider': 'groq'}, id='lc_run--019d1214-4896-79b0-994f-43c80e89e639-0', tool_calls=[{'name': 'search_courses', 'args': {'category': 'Backend', 'level': 'beginner', 'query': 'professional skills'}, 'id': 'functions.search_courses:4', 'type': 'tool_call'}], invalid_tool_calls=[], usage_metadata={'input_tokens': 2339, 'output_tokens': 32, 'total_tokens': 2371, 'input_token_details': {'cache_read': 1792}}),\n",
       "  ToolMessage(content=\"ID: CS-FAST-101\\nTitle: None\\nDescription: Title: REST API Development with FastAPI. Description: Build production-ready REST APIs using FastAPI, covering routing, request validation with Pydantic, and basic authentication.. Outcomes: Create REST endpoints with path and query params, Validate request/response with Pydantic models, Implement JWT-based authentication\\nPrerequisites: ['CS-PY-101']\\nDuration: 6 hours\\n---\", name='search_courses', id='021c4097-6b82-4a44-8694-9c6610baa1ec', tool_call_id='functions.search_courses:4'),\n",
       "  AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'functions.search_courses:5', 'function': {'arguments': '{\"category\":\"Backend\",\"level\":\"beginner\",\"query\":\"agile professional skills\"}', 'name': 'search_courses'}, 'type': 'function'}]}, response_metadata={'token_usage': {'completion_tokens': 34, 'prompt_tokens': 2480, 'total_tokens': 2514, 'completion_time': 0.093498688, 'completion_tokens_details': None, 'prompt_time': 0.028057542, 'prompt_tokens_details': {'cached_tokens': 2304}, 'queue_time': 0.284874636, 'total_time': 0.12155623}, 'model_name': 'moonshotai/kimi-k2-instruct-0905', 'system_fingerprint': 'fp_05df423bab', 'service_tier': 'on_demand', 'finish_reason': 'tool_calls', 'logprobs': None, 'model_provider': 'groq'}, id='lc_run--019d1214-4bd5-7262-bb3f-898f9b25b128-0', tool_calls=[{'name': 'search_courses', 'args': {'category': 'Backend', 'level': 'beginner', 'query': 'agile professional skills'}, 'id': 'functions.search_courses:5', 'type': 'tool_call'}], invalid_tool_calls=[], usage_metadata={'input_tokens': 2480, 'output_tokens': 34, 'total_tokens': 2514, 'input_token_details': {'cache_read': 2304}}),\n",
       "  ToolMessage(content=\"ID: CS-FAST-101\\nTitle: None\\nDescription: Title: REST API Development with FastAPI. Description: Build production-ready REST APIs using FastAPI, covering routing, request validation with Pydantic, and basic authentication.. Outcomes: Create REST endpoints with path and query params, Validate request/response with Pydantic models, Implement JWT-based authentication\\nPrerequisites: ['CS-PY-101']\\nDuration: 6 hours\\n---\", name='search_courses', id='48de42c6-381f-4dd2-a6ce-6d820c64975a', tool_call_id='functions.search_courses:5'),\n",
       "  AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'functions.search_courses:6', 'function': {'arguments': '{\"category\":\"Backend\",\"level\":\"beginner\",\"query\":\"soft skills\"}', 'name': 'search_courses'}, 'type': 'function'}]}, response_metadata={'token_usage': {'completion_tokens': 32, 'prompt_tokens': 2623, 'total_tokens': 2655, 'completion_time': 0.092443261, 'completion_tokens_details': None, 'prompt_time': 0.07918841, 'prompt_tokens_details': {'cached_tokens': 2304}, 'queue_time': 0.284959911, 'total_time': 0.171631671}, 'model_name': 'moonshotai/kimi-k2-instruct-0905', 'system_fingerprint': 'fp_05df423bab', 'service_tier': 'on_demand', 'finish_reason': 'tool_calls', 'logprobs': None, 'model_provider': 'groq'}, id='lc_run--019d1214-4f15-7942-9c7e-9a48b17e1d04-0', tool_calls=[{'name': 'search_courses', 'args': {'category': 'Backend', 'level': 'beginner', 'query': 'soft skills'}, 'id': 'functions.search_courses:6', 'type': 'tool_call'}], invalid_tool_calls=[], usage_metadata={'input_tokens': 2623, 'output_tokens': 32, 'total_tokens': 2655, 'input_token_details': {'cache_read': 2304}}),\n",
       "  ToolMessage(content=\"ID: CS-FAST-101\\nTitle: None\\nDescription: Title: REST API Development with FastAPI. Description: Build production-ready REST APIs using FastAPI, covering routing, request validation with Pydantic, and basic authentication.. Outcomes: Create REST endpoints with path and query params, Validate request/response with Pydantic models, Implement JWT-based authentication\\nPrerequisites: ['CS-PY-101']\\nDuration: 6 hours\\n---\", name='search_courses', id='e5585d48-0791-4a21-8e87-42f0bde91e2f', tool_call_id='functions.search_courses:6'),\n",
       "  AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'functions.search_courses:7', 'function': {'arguments': '{\"category\":\"Backend\",\"level\":\"beginner\",\"query\":\"SOFT-AGILE\"}', 'name': 'search_courses'}, 'type': 'function'}]}, response_metadata={'token_usage': {'completion_tokens': 35, 'prompt_tokens': 2764, 'total_tokens': 2799, 'completion_time': 0.102256011, 'completion_tokens_details': None, 'prompt_time': 0.153939367, 'prompt_tokens_details': {'cached_tokens': 2048}, 'queue_time': 0.282748693, 'total_time': 0.256195378}, 'model_name': 'moonshotai/kimi-k2-instruct-0905', 'system_fingerprint': 'fp_00c37775b7', 'service_tier': 'on_demand', 'finish_reason': 'tool_calls', 'logprobs': None, 'model_provider': 'groq'}, id='lc_run--019d1214-52a0-7a52-9cbf-57ddf6335d6d-0', tool_calls=[{'name': 'search_courses', 'args': {'category': 'Backend', 'level': 'beginner', 'query': 'SOFT-AGILE'}, 'id': 'functions.search_courses:7', 'type': 'tool_call'}], invalid_tool_calls=[], usage_metadata={'input_tokens': 2764, 'output_tokens': 35, 'total_tokens': 2799, 'input_token_details': {'cache_read': 2048}}),\n",
       "  ToolMessage(content=\"ID: CS-FAST-101\\nTitle: None\\nDescription: Title: REST API Development with FastAPI. Description: Build production-ready REST APIs using FastAPI, covering routing, request validation with Pydantic, and basic authentication.. Outcomes: Create REST endpoints with path and query params, Validate request/response with Pydantic models, Implement JWT-based authentication\\nPrerequisites: ['CS-PY-101']\\nDuration: 6 hours\\n---\", name='search_courses', id='75dc79e6-2341-4884-aa47-6ee66f1655ce', tool_call_id='functions.search_courses:7'),\n",
       "  AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'functions.search_courses:8', 'function': {'arguments': '{\"category\":\"Backend\",\"level\":\"beginner\",\"query\":\"professional\"}', 'name': 'search_courses'}, 'type': 'function'}]}, response_metadata={'token_usage': {'completion_tokens': 31, 'prompt_tokens': 2908, 'total_tokens': 2939, 'completion_time': 0.091088768, 'completion_tokens_details': None, 'prompt_time': 0.170027002, 'prompt_tokens_details': {'cached_tokens': 1280}, 'queue_time': 0.281245115, 'total_time': 0.26111577}, 'model_name': 'moonshotai/kimi-k2-instruct-0905', 'system_fingerprint': 'fp_241bc7119c', 'service_tier': 'on_demand', 'finish_reason': 'tool_calls', 'logprobs': None, 'model_provider': 'groq'}, id='lc_run--019d1214-5637-7533-8d4d-73bd8a9e4a8d-0', tool_calls=[{'name': 'search_courses', 'args': {'category': 'Backend', 'level': 'beginner', 'query': 'professional'}, 'id': 'functions.search_courses:8', 'type': 'tool_call'}], invalid_tool_calls=[], usage_metadata={'input_tokens': 2908, 'output_tokens': 31, 'total_tokens': 2939, 'input_token_details': {'cache_read': 1280}}),\n",
       "  ToolMessage(content=\"ID: CS-FAST-101\\nTitle: None\\nDescription: Title: REST API Development with FastAPI. Description: Build production-ready REST APIs using FastAPI, covering routing, request validation with Pydantic, and basic authentication.. Outcomes: Create REST endpoints with path and query params, Validate request/response with Pydantic models, Implement JWT-based authentication\\nPrerequisites: ['CS-PY-101']\\nDuration: 6 hours\\n---\", name='search_courses', id='0013afed-d715-4e7c-bfaf-79f242fcb16b', tool_call_id='functions.search_courses:8'),\n",
       "  AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'functions.submit_final_roadmap:9', 'function': {'arguments': '{\"candidate_name\":\"Candidate\",\"onboarding_summary\":\"The candidate has solid Python/Django experience but lacks exposure to FastAPI, PostgreSQL, and Docker—core requirements for this backend role. As a fresher, foundational training is prioritized to build missing competencies quickly and effectively.\",\"roadmap\":[{\"course_id\":\"CS-PY-101\",\"is_foundation\":true,\"reasoning\":\"Prerequisite for FastAPI course; ensures strong Python foundation before API development.\",\"sequence_order\":1,\"title\":\"Python Programming Fundamentals\"},{\"course_id\":\"CS-FAST-101\",\"is_foundation\":true,\"reasoning\":\"High-priority gap: JD requires FastAPI; candidate has no prior experience with this framework.\",\"sequence_order\":2,\"title\":\"REST API Development with FastAPI\"},{\"course_id\":\"CS-DB-101\",\"is_foundation\":true,\"reasoning\":\"High-priority gap: JD requires PostgreSQL; candidate only has MySQL/SQLite experience.\",\"sequence_order\":3,\"title\":\"SQL Fundamentals for Backend Developers\"},{\"course_id\":\"CS-DOCKER-101\",\"is_foundation\":false,\"reasoning\":\"Medium-priority gap: JD requires Docker; candidate has no containerization experience.\",\"sequence_order\":4,\"title\":\"Docker \\\\u0026 Containerization Fundamentals\"}],\"target_role\":\"Backend Developer\"}', 'name': 'submit_final_roadmap'}, 'type': 'function'}]}, response_metadata={'token_usage': {'completion_tokens': 317, 'prompt_tokens': 3048, 'total_tokens': 3365, 'completion_time': 0.865973233, 'completion_tokens_details': None, 'prompt_time': 0.098265353, 'prompt_tokens_details': {'cached_tokens': 2560}, 'queue_time': 0.280870105, 'total_time': 0.964238586}, 'model_name': 'moonshotai/kimi-k2-instruct-0905', 'system_fingerprint': 'fp_00c37775b7', 'service_tier': 'on_demand', 'finish_reason': 'tool_calls', 'logprobs': None, 'model_provider': 'groq'}, id='lc_run--019d1214-59d4-76e1-98c6-61e42b9047b9-0', tool_calls=[{'name': 'submit_final_roadmap', 'args': {'candidate_name': 'Candidate', 'onboarding_summary': 'The candidate has solid Python/Django experience but lacks exposure to FastAPI, PostgreSQL, and Docker—core requirements for this backend role. As a fresher, foundational training is prioritized to build missing competencies quickly and effectively.', 'roadmap': [{'course_id': 'CS-PY-101', 'is_foundation': True, 'reasoning': 'Prerequisite for FastAPI course; ensures strong Python foundation before API development.', 'sequence_order': 1, 'title': 'Python Programming Fundamentals'}, {'course_id': 'CS-FAST-101', 'is_foundation': True, 'reasoning': 'High-priority gap: JD requires FastAPI; candidate has no prior experience with this framework.', 'sequence_order': 2, 'title': 'REST API Development with FastAPI'}, {'course_id': 'CS-DB-101', 'is_foundation': True, 'reasoning': 'High-priority gap: JD requires PostgreSQL; candidate only has MySQL/SQLite experience.', 'sequence_order': 3, 'title': 'SQL Fundamentals for Backend Developers'}, {'course_id': 'CS-DOCKER-101', 'is_foundation': False, 'reasoning': 'Medium-priority gap: JD requires Docker; candidate has no containerization experience.', 'sequence_order': 4, 'title': 'Docker & Containerization Fundamentals'}], 'target_role': 'Backend Developer'}, 'id': 'functions.submit_final_roadmap:9', 'type': 'tool_call'}], invalid_tool_calls=[], usage_metadata={'input_tokens': 3048, 'output_tokens': 317, 'total_tokens': 3365, 'input_token_details': {'cache_read': 2560}}),\n",
       "  ToolMessage(content='{\"candidate_name\": \"Candidate\", \"target_role\": \"Backend Developer\", \"onboarding_summary\": \"The candidate has solid Python/Django experience but lacks exposure to FastAPI, PostgreSQL, and Docker—core requirements for this backend role. As a fresher, foundational training is prioritized to build missing competencies quickly and effectively.\", \"roadmap\": [{\"course_id\": \"CS-PY-101\", \"title\": \"Python Programming Fundamentals\", \"reasoning\": \"Prerequisite for FastAPI course; ensures strong Python foundation before API development.\", \"is_foundation\": true, \"sequence_order\": 1}, {\"course_id\": \"CS-FAST-101\", \"title\": \"REST API Development with FastAPI\", \"reasoning\": \"High-priority gap: JD requires FastAPI; candidate has no prior experience with this framework.\", \"is_foundation\": true, \"sequence_order\": 2}, {\"course_id\": \"CS-DB-101\", \"title\": \"SQL Fundamentals for Backend Developers\", \"reasoning\": \"High-priority gap: JD requires PostgreSQL; candidate only has MySQL/SQLite experience.\", \"is_foundation\": true, \"sequence_order\": 3}, {\"course_id\": \"CS-DOCKER-101\", \"title\": \"Docker & Containerization Fundamentals\", \"reasoning\": \"Medium-priority gap: JD requires Docker; candidate has no containerization experience.\", \"is_foundation\": false, \"sequence_order\": 4}]}', name='submit_final_roadmap', id='27e25caf-4dc9-480c-abcd-245d7dd322a1', tool_call_id='functions.submit_final_roadmap:9'),\n",
       "  AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'functions.submit_mermaid_visualization:10', 'function': {'arguments': '{\"mermaid_code\":\"flowchart TD\\\\n    A([Start — Candidate\\'s current skills]):::start\\\\n    subgraph W1[\\\\\"Week 1 — Core foundations\\\\\"]\\\\n      B[CS-PY-101\\\\nPython Programming Fundamentals]:::foundation\\\\n      C[CS-FAST-101\\\\nREST API Development with FastAPI]:::gap\\\\n    end\\\\n    subgraph W2[\\\\\"Week 2 — Data \\\\u0026 deployment\\\\\"]\\\\n      D[CS-DB-101\\\\nSQL Fundamentals for Backend Developers]:::gap\\\\n      E[CS-DOCKER-101\\\\nDocker \\\\u0026 Containerization Fundamentals]:::gap\\\\n    end\\\\n    Z([Role-ready — Backend Developer]):::done\\\\n    A --\\\\u003e B\\\\n    B --\\\\u003e C\\\\n    C --\\\\u003e D\\\\n    D --\\\\u003e E\\\\n    E --\\\\u003e Z\\\\n    classDef gap        fill:#EEEDFE,stroke:#534AB7,color:#26215C\\\\n    classDef foundation fill:#E1F5EE,stroke:#0F6E56,color:#085041\\\\n    classDef start      fill:#1D9E75,stroke:#0F6E56,color:#E1F5EE\\\\n    classDef done       fill:#534AB7,stroke:#3C3489,color:#EEEDFE\"}', 'name': 'submit_mermaid_visualization'}, 'type': 'function'}]}, response_metadata={'token_usage': {'completion_tokens': 281, 'prompt_tokens': 3695, 'total_tokens': 3976, 'completion_time': 0.591981415, 'completion_tokens_details': None, 'prompt_time': 0.13173194, 'prompt_tokens_details': {'cached_tokens': 2816}, 'queue_time': 0.279077701, 'total_time': 0.723713355}, 'model_name': 'moonshotai/kimi-k2-instruct-0905', 'system_fingerprint': 'fp_241bc7119c', 'service_tier': 'on_demand', 'finish_reason': 'tool_calls', 'logprobs': None, 'model_provider': 'groq'}, id='lc_run--019d1214-5f0b-7961-97e0-127ed75ed0dc-0', tool_calls=[{'name': 'submit_mermaid_visualization', 'args': {'mermaid_code': 'flowchart TD\\n    A([Start — Candidate\\'s current skills]):::start\\n    subgraph W1[\"Week 1 — Core foundations\"]\\n      B[CS-PY-101\\nPython Programming Fundamentals]:::foundation\\n      C[CS-FAST-101\\nREST API Development with FastAPI]:::gap\\n    end\\n    subgraph W2[\"Week 2 — Data & deployment\"]\\n      D[CS-DB-101\\nSQL Fundamentals for Backend Developers]:::gap\\n      E[CS-DOCKER-101\\nDocker & Containerization Fundamentals]:::gap\\n    end\\n    Z([Role-ready — Backend Developer]):::done\\n    A --> B\\n    B --> C\\n    C --> D\\n    D --> E\\n    E --> Z\\n    classDef gap        fill:#EEEDFE,stroke:#534AB7,color:#26215C\\n    classDef foundation fill:#E1F5EE,stroke:#0F6E56,color:#085041\\n    classDef start      fill:#1D9E75,stroke:#0F6E56,color:#E1F5EE\\n    classDef done       fill:#534AB7,stroke:#3C3489,color:#EEEDFE'}, 'id': 'functions.submit_mermaid_visualization:10', 'type': 'tool_call'}], invalid_tool_calls=[], usage_metadata={'input_tokens': 3695, 'output_tokens': 281, 'total_tokens': 3976, 'input_token_details': {'cache_read': 2816}}),\n",
       "  ToolMessage(content='Mermaid visualization stored successfully.', name='submit_mermaid_visualization', id='fede2020-92df-406c-a533-94aaba4301c0', tool_call_id='functions.submit_mermaid_visualization:10'),\n",
       "  AIMessage(content='', additional_kwargs={}, response_metadata={'token_usage': {'completion_tokens': 1, 'prompt_tokens': 4001, 'total_tokens': 4002, 'completion_time': 0.017057827, 'completion_tokens_details': None, 'prompt_time': 0.01031025, 'prompt_tokens_details': {'cached_tokens': 3840}, 'queue_time': None, 'total_time': 0.027368077}, 'model_name': 'moonshotai/kimi-k2-instruct-0905', 'system_fingerprint': 'fp_241bc7119c', 'service_tier': 'on_demand', 'finish_reason': 'stop', 'logprobs': None, 'model_provider': 'groq'}, id='lc_run--019d1214-6352-7e00-875a-f255a90094ea-0', tool_calls=[], invalid_tool_calls=[], usage_metadata={'input_tokens': 4001, 'output_tokens': 1, 'total_tokens': 4002, 'input_token_details': {'cache_read': 3840}})],\n",
       " 'skill_gap_analysis_data': SkillGapAnalysis(job_title='Backend Developer', candidate_name=None, analyzed_gaps=[SkillGap(skill_name='FastAPI', gap_type='missing_foundation', priority='high', reasoning=\"JD requires FastAPI; candidate's resume shows no experience with FastAPI in skills, experience, or projects.\", target_competency='Develop high-performance asynchronous APIs using FastAPI'), SkillGap(skill_name='PostgreSQL', gap_type='missing_foundation', priority='high', reasoning='JD requires PostgreSQL; candidate has MySQL and SQLite experience but no record of using PostgreSQL.', target_competency='Design, query, and maintain PostgreSQL databases for backend services'), SkillGap(skill_name='Docker', gap_type='missing_foundation', priority='medium', reasoning=\"JD requires Docker for containerization; candidate's resume does not list Docker experience.\", target_competency='Containerize and deploy backend applications using Docker')], is_fresher_adaptation_needed=True, executive_summary=\"The candidate possesses solid Python and Django experience but lacks exposure to key backend infrastructure required for this role. As a fresher, foundational training is needed for FastAPI, PostgreSQL, and Docker to meet the job's core competencies.\"),\n",
       " 'resume_data': ResumeExtract(job_title='Software Developer', total_experience_months=7, skills=[Skill(name='C/C++', category='Other'), Skill(name='Java', category='Backend'), Skill(name='Python', category='Backend'), Skill(name='JavaScript', category='Frontend'), Skill(name='Dart', category='Frontend'), Skill(name='Flutter', category='Frontend'), Skill(name='HTML/CSS', category='Frontend'), Skill(name='ReactJS', category='Frontend'), Skill(name='Firebase', category='Backend'), Skill(name='REST APIs', category='Backend'), Skill(name='Flask', category='Backend'), Skill(name='Django', category='Backend'), Skill(name='NodeJS', category='Backend'), Skill(name='ExpressJS', category='Backend'), Skill(name='MySQL', category='Other'), Skill(name='MongoDB', category='Other'), Skill(name='SQLite', category='Other'), Skill(name='GitHub', category='Other'), Skill(name='Android Studio', category='Other'), Skill(name='Visual Studio Code', category='Other'), Skill(name='MATLAB', category='Other'), Skill(name='Cursor', category='Other'), Skill(name='Github Copilot', category='Other'), Skill(name='Provider', category='Other'), Skill(name='Bloc', category='Other'), Skill(name='Scikit-learn', category='ML'), Skill(name='tensorflow', category='ML')], experience=[ExperienceItem(job_title='Technology Intern', experience_type='internship', duration_months=5, technologies=['Flask', 'PyMuPDF', 'Docling', 'OCR', 'LLM', 'Cron'], responsibilities=['Built Flask API for RTA investor verification with confidence-scoring pipelines', 'Developed scalable document intelligence pipeline for 60+ page financial docs', 'Implementing Cron-based workers for weekly email analytics reports']), ExperienceItem(job_title='Software Development Intern', experience_type='internship', duration_months=2, technologies=['Flutter', 'Dart', 'MVVM'], responsibilities=['Developed Groceazy grocery app with 10+ modules', 'Implemented secure user auth and role-based access', 'Built image-to-item price matcher across 5+ platforms'])], projects=[ProjectItem(name='Hostel Bites – IIITK Canteen App', technologies=['Flutter', 'Dart', 'Firebase', 'Cloud Firestore', 'Mapbox API'], what_was_built='Flutter app for hostel food ordering with live tracking and role-based access'), ProjectItem(name='JobShield - Fake Job Detector', technologies=['Flutter', 'Dart', 'Python', 'Flask', 'SQLite'], what_was_built='Fake job detection API with 95% accuracy and Flutter web interface')], certifications=[CertificationItem(name='Certification in Graph Algorithms', issuer='AlgoUniversity', topics_covered=['Graph Algorithms'])], achievements=[AchievementItem(title='Ranked 81 in Inter IIIT Coding Contest Optigo', domain='Competitive Programming'), AchievementItem(title='4-star CodeChef rating and Knight badge on LeetCode', domain='Competitive Programming'), AchievementItem(title='Advanced to regionals in SIH’23 with e-waste facility locator app', domain='Hackathon')], is_fresher=True),\n",
       " 'extraction_error': None,\n",
       " 'JobDescriptionExtract_data': JobDescriptionExtract(job_title='Backend Developer', company_name='CodeForge', location='Pune', employment_type='Full-time role', duration_months=None, is_fresher_allowed=None, skills_required=[SkillRequirement(name='Python', level=None), SkillRequirement(name='FastAPI', level=None), SkillRequirement(name='Django', level=None), SkillRequirement(name='SQL', level=None), SkillRequirement(name='PostgreSQL', level=None), SkillRequirement(name='Docker', level=None)], tools_technologies=None, responsibilities=[ResponsibilityItem(description='Develop REST APIs using FastAPI'), ResponsibilityItem(description='Design and manage PostgreSQL databases'), ResponsibilityItem(description='Implement authentication and authorization systems'), ResponsibilityItem(description='Optimize performance and scalability')], requirements=[RequirementItem(description='Strong knowledge of Python'), RequirementItem(description='Experience with FastAPI or Django'), RequirementItem(description='Good understanding of SQL and database design'), RequirementItem(description='Familiarity with Docker')], constraints=[ConstraintItem(type='location', value='Pune only'), ConstraintItem(type='employment type', value='Full-time role')]),\n",
       " 'mermaid_code': 'flowchart TD\\n    A([Start — Candidate\\'s current skills]):::start\\n    subgraph W1[\"Week 1 — Core foundations\"]\\n      B[CS-PY-101\\nPython Programming Fundamentals]:::foundation\\n      C[CS-FAST-101\\nREST API Development with FastAPI]:::gap\\n    end\\n    subgraph W2[\"Week 2 — Data & deployment\"]\\n      D[CS-DB-101\\nSQL Fundamentals for Backend Developers]:::gap\\n      E[CS-DOCKER-101\\nDocker & Containerization Fundamentals]:::gap\\n    end\\n    Z([Role-ready — Backend Developer]):::done\\n    A --> B\\n    B --> C\\n    C --> D\\n    D --> E\\n    E --> Z\\n    classDef gap        fill:#EEEDFE,stroke:#534AB7,color:#26215C\\n    classDef foundation fill:#E1F5EE,stroke:#0F6E56,color:#085041\\n    classDef start      fill:#1D9E75,stroke:#0F6E56,color:#E1F5EE\\n    classDef done       fill:#534AB7,stroke:#3C3489,color:#EEEDFE',\n",
       " 'final_roadmap': {'candidate_name': 'Candidate',\n",
       "  'onboarding_summary': 'The candidate has solid Python/Django experience but lacks exposure to FastAPI, PostgreSQL, and Docker—core requirements for this backend role. As a fresher, foundational training is prioritized to build missing competencies quickly and effectively.',\n",
       "  'roadmap': [{'course_id': 'CS-PY-101',\n",
       "    'is_foundation': True,\n",
       "    'reasoning': 'Prerequisite for FastAPI course; ensures strong Python foundation before API development.',\n",
       "    'sequence_order': 1,\n",
       "    'title': 'Python Programming Fundamentals'},\n",
       "   {'course_id': 'CS-FAST-101',\n",
       "    'is_foundation': True,\n",
       "    'reasoning': 'High-priority gap: JD requires FastAPI; candidate has no prior experience with this framework.',\n",
       "    'sequence_order': 2,\n",
       "    'title': 'REST API Development with FastAPI'},\n",
       "   {'course_id': 'CS-DB-101',\n",
       "    'is_foundation': True,\n",
       "    'reasoning': 'High-priority gap: JD requires PostgreSQL; candidate only has MySQL/SQLite experience.',\n",
       "    'sequence_order': 3,\n",
       "    'title': 'SQL Fundamentals for Backend Developers'},\n",
       "   {'course_id': 'CS-DOCKER-101',\n",
       "    'is_foundation': False,\n",
       "    'reasoning': 'Medium-priority gap: JD requires Docker; candidate has no containerization experience.',\n",
       "    'sequence_order': 4,\n",
       "    'title': 'Docker & Containerization Fundamentals'}],\n",
       "  'target_role': 'Backend Developer'}}"
      ]
     },
     "execution_count": 127,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "final_state"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "050d8619",
   "metadata": {},
   "source": [
    "**Final state**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e451edbe",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 128,
   "id": "40a999a5",
   "metadata": {},
   "outputs": [],
   "source": [
    "skill_gap_data = final_state['final_roadmap']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 129,
   "id": "13d64ecc",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'candidate_name': 'Candidate',\n",
       " 'onboarding_summary': 'The candidate has solid Python/Django experience but lacks exposure to FastAPI, PostgreSQL, and Docker—core requirements for this backend role. As a fresher, foundational training is prioritized to build missing competencies quickly and effectively.',\n",
       " 'roadmap': [{'course_id': 'CS-PY-101',\n",
       "   'is_foundation': True,\n",
       "   'reasoning': 'Prerequisite for FastAPI course; ensures strong Python foundation before API development.',\n",
       "   'sequence_order': 1,\n",
       "   'title': 'Python Programming Fundamentals'},\n",
       "  {'course_id': 'CS-FAST-101',\n",
       "   'is_foundation': True,\n",
       "   'reasoning': 'High-priority gap: JD requires FastAPI; candidate has no prior experience with this framework.',\n",
       "   'sequence_order': 2,\n",
       "   'title': 'REST API Development with FastAPI'},\n",
       "  {'course_id': 'CS-DB-101',\n",
       "   'is_foundation': True,\n",
       "   'reasoning': 'High-priority gap: JD requires PostgreSQL; candidate only has MySQL/SQLite experience.',\n",
       "   'sequence_order': 3,\n",
       "   'title': 'SQL Fundamentals for Backend Developers'},\n",
       "  {'course_id': 'CS-DOCKER-101',\n",
       "   'is_foundation': False,\n",
       "   'reasoning': 'Medium-priority gap: JD requires Docker; candidate has no containerization experience.',\n",
       "   'sequence_order': 4,\n",
       "   'title': 'Docker & Containerization Fundamentals'}],\n",
       " 'target_role': 'Backend Developer'}"
      ]
     },
     "execution_count": 129,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "skill_gap_data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 130,
   "id": "25a6b5b4",
   "metadata": {},
   "outputs": [],
   "source": [
    "import json\n",
    "\n",
    "# Define the keys your React frontend actually needs\n",
    "REQUIRED_KEYS = [\"candidate_name\", \"skill_gap_analysis_data\", \"mermaid_code\", \"final_roadmap\"]\n",
    "\n",
    "def export_ui_payload(state, filename=\"ai_output.json\"):\n",
    "    \"\"\"\n",
    "    Extracts specific keys from the graph state and ensures \n",
    "    Pydantic objects are dumped to dicts for JSON compatibility.\n",
    "    \"\"\"\n",
    "    ui_data = {}\n",
    "\n",
    "    for key in REQUIRED_KEYS:\n",
    "        # Get the value from the state\n",
    "        val = state.get(key)\n",
    "        \n",
    "        if val is None:\n",
    "            continue\n",
    "\n",
    "        # Check if the value is a Pydantic object (has .model_dump())\n",
    "        # This fixes the \"skill_gap_analysis_data as a string\" issue\n",
    "        if hasattr(val, \"model_dump\"):\n",
    "            ui_data[key] = val.model_dump()\n",
    "        else:\n",
    "            # If it's already a dict (final_roadmap) or string (mermaid_code)\n",
    "            ui_data[key] = val\n",
    "\n",
    "    # Save to the local file\n",
    "    with open(filename, \"w\", encoding=\"utf-8\") as f:\n",
    "        json.dump(ui_data, f, indent=2)\n",
    "    \n",
    "    print(f\"✅ UI Payload successfully exported to {filename}\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 131,
   "id": "26c10157",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "✅ UI Payload successfully exported to ai_output.json\n"
     ]
    }
   ],
   "source": [
    "export_ui_payload(final_state)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "92693ebd",
   "metadata": {},
   "outputs": [],
   "source": [
    "from langchain_core.callbacks import BaseCallbackHandler\n",
    "\n",
    "class ExportHook(BaseCallbackHandler):\n",
    "    def on_chain_end(self, outputs: dict, **kwargs):\n",
    "        # 'outputs' is your final Graph state\n",
    "        export_ui_payload(outputs)\n",
    "\n",
    "# To use it:\n",
    "my_hook = ExportHook()\n",
    "app.invoke(inputs, {\"callbacks\": [my_hook]})\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "bbb0dac2",
   "metadata": {},
   "source": [
    "**Evaluation**"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8be93713",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "pro_env",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}