File size: 71,042 Bytes
e5db578 |
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 |
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "e87b4746-6622-4e21-9788-2df1616d0036",
"metadata": {},
"outputs": [],
"source": [
"import pdfplumber\n",
"import re\n",
"from langchain_groq import ChatGroq"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "60f310f1-3ba0-4853-a515-da664eefd907",
"metadata": {},
"outputs": [],
"source": [
"llm = ChatGroq(\n",
" temperature=0, \n",
" groq_api_key='your_api_key_here', \n",
" model_name=\"llama-3.1-70b-versatile\"\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "6f55fd44-52fd-40a2-94bd-5c4e33683c52",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"USER_AGENT environment variable not set, consider setting it to identify your requests.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"Data Scientist\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"About\n",
"Alum\n",
"Inclusion\n",
"Careers\n",
"Culture\n",
"Blog\n",
"Tech\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"Data Scientist\n",
"Bengaluru\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"Share\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"Apply\n",
"\n",
"\n",
"\n",
"About Team\n",
"Myntra Data Science team delivers a large number of data science solutions for the company which are deployed at various customer touch points every quarter. The models create significant revenue and customer experience impact. The models involve real-time, near-real-time and offline solutions with varying latency requirements. The models are built using massive datasets. You will have the opportunity to be part of a rapidly growing organization and gain exposure to all the parts of a comprehensive ecommerce platform. You’ll also get to learn the intricacies of building models that serve millions of requests per second at sub second latency. \n",
"The team takes pride in deploying solutions that not only leverage state of the art machine learning models like graph neural networks, diffusion models, transformers, representation learning, optimization methods and bayesian modeling but also contribute to research literature with multiple peer-reviewed research papers.\n",
"Roles and Responsibilities\n",
"\n",
"Design, develop and deploy machine learning models,algorithms and systems to solve complex business problems for Myntra Recsys, Search, Vision, SCM, Pricing, Forecasting, Trend and Virality prediction, Gen AI and other areas\n",
"Theoretical understanding and practise of machine learning and expertise in one or more of the topics, such as, NLP, Computer Vision, recommender systems and Optimisation. \n",
"Implement robust and reliable software solutions for model deployment.\n",
"Support the team in maintaining machine learning pipelines, contributing to tasks like data cleaning, feature extraction and basic model training.\n",
"Participate in monitoring the performance of machine learning models, gaining experience in using statistical methods for evaluation.\n",
"Working with the Data Platforms teams for understanding and collecting the data.\n",
"Conduct performance testing, troubleshooting and tuning as required.\n",
"Stay current with the latest research and technology and communicate your knowledge throughout the enterprise.\n",
"\n",
"Qualifications & Experience\n",
"\n",
"Master’s/PhD in Computer Science, Mathematics, Statistics/related fields ‘or’ 1+ years of relevant industry experience with a Bachelor’s degree.\n",
"Proficiency in Python or one other high-level programming language.\n",
"Theoretical understanding of statistical models such as regression, clustering and ML algorithms such as decision trees, neural networks, etc.\n",
"Strong written and verbal communication skills\n",
"Intellectual curiosity and enthusiastic about continuous learning\n",
"Experience developing machine learning models in Python, or equivalent programming language.\n",
"Basic familiarity with machine learning frameworks like TensorFlow, PyTorch, or scikit-learn.\n",
"Introductory understanding of statistics as it applies to machine learning.\n",
"Ability to manage and prioritize your workload and support his/her manager.\n",
"Experience with SQL and/or NoSQL databases.\n",
"If you are an exceptional candidate, write in. We are happy to hire you even if you don't have the certified qualifications.\n",
"\n",
"Nice to Have:\n",
"\n",
"Publications or presentations in recognized Machine Learning and Data Science journals/conferences.\n",
"Experience with ML orchestration tools (Airflow, Kubeflow or MLFlow)\n",
"Exposure to GenAI models.\n",
"\n",
" \n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"×\n",
"\n",
"\n",
"\n",
"\n",
"Apply now\n",
"\n",
"\n",
"\n",
"\n",
"Name *\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"Last Name *\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"Your Email *\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"Phone *\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"Your current location *\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"Resume/CV *\n",
"\n",
"\n",
"Attach\n",
"\n",
"×\n",
"\n",
"\n",
"\n",
"Cover Letter\n",
"\n",
"\n",
"Attach\n",
"Paste\n",
"\n",
"×\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"Submit \n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"We got your Appliaction, our team will get back to you soon.\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"Looks like the application has not uploaded, Please try agin.\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"Bengaluru (HQ)\n",
"\n",
"gurgaon\n",
"\n",
"Mumbai\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"contact\n",
"Shop\n",
"Careers\n",
"Privacy Policy\n",
"Terms & Conditions\n",
"\n",
"\n",
"Myntra is proud to be an Equal Opportunity Employer\n",
"\n",
"\n",
"© 2019 www.myntra.com. All rights reserved.\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n",
"\n"
]
}
],
"source": [
"# WebBaseLoader will accept the url and extract the data from that, ie web scraping\n",
"\n",
"from langchain_community.document_loaders import WebBaseLoader\n",
"\n",
"loader = WebBaseLoader(\"https://careers.myntra.com/job-detail/?id=7431200002\")\n",
"page_data = loader.load().pop().page_content\n",
"print(page_data)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "f713dde3-cfcf-4efd-9832-ea90b4482418",
"metadata": {},
"outputs": [],
"source": [
"from langchain_core.prompts import PromptTemplate\n",
"# (NO PREAMBLE) means dont give that initial text like Here is your response.\n",
"prompt_extract = PromptTemplate.from_template(\n",
" \"\"\"\n",
" ### SCRAPED TEXT FROM WEBSITE:\n",
" {page_data}\n",
" ### INSTRUCTION:\n",
" The scraped text is from the career's page of a website.\n",
" Your job is to extract the job postings and return them in JSON format containing the \n",
" following keys: `role`, `experience`, `skills` and `description`.\n",
" Only return the valid JSON.\n",
" ### VALID JSON (NO PREAMBLE): \n",
" \"\"\"\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "c437186e-8c68-4636-8c03-048dd73c5f8a",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[\n",
" {\n",
" \"role\": \"Data Scientist\",\n",
" \"experience\": \"1+ years of relevant industry experience with a Bachelor’s degree or Master’s/PhD in Computer Science, Mathematics, Statistics/related fields\",\n",
" \"skills\": [\n",
" \"Python or one other high-level programming language\",\n",
" \"Theoretical understanding of statistical models such as regression, clustering and ML algorithms such as decision trees, neural networks, etc.\",\n",
" \"Machine learning frameworks like TensorFlow, PyTorch, or scikit-learn\",\n",
" \"SQL and/or NoSQL databases\"\n",
" ],\n",
" \"description\": \"Design, develop and deploy machine learning models, algorithms and systems to solve complex business problems for Myntra Recsys, Search, Vision, SCM, Pricing, Forecasting, Trend and Virality prediction, Gen AI and other areas. Theoretical understanding and practise of machine learning and expertise in one or more of the topics, such as, NLP, Computer Vision, recommender systems and Optimisation.\"\n",
" }\n",
"]\n"
]
}
],
"source": [
"chain_extract = prompt_extract | llm # this will form a langchain chain ie you are getting a prompt and passing it to LLM \n",
"res = chain_extract.invoke(input={'page_data':page_data})\n",
"print(res.content)\n",
"\n",
"# we got the json format of the job description"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "f154051f-7366-4d19-9f9c-3dc68a0ddc91",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"str"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# but the type of it is string, we want json object so we will use JSON Parser\n",
"type(res.content)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "fef8a008-bb45-4a7b-9e0e-2c508685b90f",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[{'role': 'Data Scientist',\n",
" 'experience': '1+ years of relevant industry experience with a Bachelor’s degree or Master’s/PhD in Computer Science, Mathematics, Statistics/related fields',\n",
" 'skills': ['Python or one other high-level programming language',\n",
" 'Theoretical understanding of statistical models such as regression, clustering and ML algorithms such as decision trees, neural networks, etc.',\n",
" 'Machine learning frameworks like TensorFlow, PyTorch, or scikit-learn',\n",
" 'SQL and/or NoSQL databases'],\n",
" 'description': 'Design, develop and deploy machine learning models, algorithms and systems to solve complex business problems for Myntra Recsys, Search, Vision, SCM, Pricing, Forecasting, Trend and Virality prediction, Gen AI and other areas. Theoretical understanding and practise of machine learning and expertise in one or more of the topics, such as, NLP, Computer Vision, recommender systems and Optimisation.'}]"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from langchain_core.output_parsers import JsonOutputParser\n",
"\n",
"json_parser = JsonOutputParser()\n",
"json_res1 = json_parser.parse(res.content)\n",
"json_res1"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "3e17dd09-198e-490c-877c-a4d98f254440",
"metadata": {},
"outputs": [],
"source": [
"# Check if the result is a list and extract the first dictionary\n",
"if isinstance(json_res1, list):\n",
" json_res1 = json_res1[0]"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "8e6d9e8c-60f4-45f5-b9d6-50aeaed38a03",
"metadata": {},
"outputs": [],
"source": [
"job_description = json_res1"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "31cb3f5d-5d5b-44fc-8116-9909761f57c8",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'role': 'Data Scientist',\n",
" 'experience': '1+ years of relevant industry experience with a Bachelor’s degree or Master’s/PhD in Computer Science, Mathematics, Statistics/related fields',\n",
" 'skills': ['Python or one other high-level programming language',\n",
" 'Theoretical understanding of statistical models such as regression, clustering and ML algorithms such as decision trees, neural networks, etc.',\n",
" 'Machine learning frameworks like TensorFlow, PyTorch, or scikit-learn',\n",
" 'SQL and/or NoSQL databases'],\n",
" 'description': 'Design, develop and deploy machine learning models, algorithms and systems to solve complex business problems for Myntra Recsys, Search, Vision, SCM, Pricing, Forecasting, Trend and Virality prediction, Gen AI and other areas. Theoretical understanding and practise of machine learning and expertise in one or more of the topics, such as, NLP, Computer Vision, recommender systems and Optimisation.'}"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"job_description"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "6bd7a6ef-0e46-401f-adfc-9255890eff9d",
"metadata": {},
"outputs": [],
"source": [
"import pdfplumber\n",
"import re\n",
"\n",
"def extract_text_from_pdf(pdf_path):\n",
" with pdfplumber.open(pdf_path) as pdf:\n",
" pages = [page.extract_text() for page in pdf.pages]\n",
" all_text = \"\\n\".join(pages) if pages else \"\"\n",
" # print(all_text)\n",
" return all_text"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "c3338ce6-49ca-4b81-8c29-0ea7b01011be",
"metadata": {},
"outputs": [],
"source": [
"pdf_path = \"C:/Users/Admin/Downloads/Mandar_Bhalerao_IISc.pdf\"\n",
"pdf_data = extract_text_from_pdf(pdf_path)\n",
"# output_path = process_resume(pdf_path)\n",
"# print(f\"Cold email prompt saved at: {output_path}\")"
]
},
{
"cell_type": "code",
"execution_count": 41,
"id": "c2c74943-397e-46fd-a84b-18e7e9f4c96c",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'Mandar Bhalerao\\n(cid:131) +91-8788519675 # [email protected] # [email protected] (cid:239) linkedin ˆ HackerRank\\nEducation\\nIndian Institute of Science Aug 2023 – Jul 2025\\nMaster of Technology - Computer Science and Automation CGPA : 7.30/10.0 Bangalore, Karnataka\\nP.E.S. Modern College of Engineering Aug 2019 – Jul 2023\\nBachelor of Engineering - Computer Engineering CGPA : 9.34/10.0 Pune, Maharashtra\\nExperience\\nNeuroPixel.AI — Deep Learning Research Intern May 2024 – July 2024\\n• Worked on optimization of Stable Diffusion models to improve performance, achieving significant efficiency gains.\\n• Implemented the Hyper-SD framework to enhance image synthesis efficiency by Knowledge Distillation techniques.\\n• Combined the advantages of Trajectory Preserving and Reformulation Distillation techniques for faster inference.\\n• Trained a Control Net for SDXL, resulting in a 30% improvement of the inference steps from the base SDXL model.\\nWestern Union — Software Intern Jan 2023 – Jun 2023\\n• Engaged with Quantum Metric to enrich powerful UX analysis, streamlining user experience design and functionality.\\n• Analyzed global transaction data, identified bugs, and implementing solutions that boosted conversion rates by 10%.\\nAmazon Web Services — Intern Oct 2021 – Dec 2021\\n• Acquired foundational skills in AWS, utilizing essential tools and services to support scalable cloud architectures.\\n• Completed the Solutions Architect Project and gained insights about the need of Cloud and AWS in today’s world.\\nProjects\\nGurgaon Real Estate Price Prediction | Source Code | Watch Live | Machine Learning, AWS Aug 2024\\n• Conducted data preprocessing, feature engineering, and performed EDA to optimize model performance.\\n• Experimented different models including Linear Regression, Decision Tree, Random Forest, XGBoost etc.\\n• AchievedabestR² scoreof 0.90andaMean Absolute Error (MAE)of 44 lakhswiththeRandomForestmodel.\\n• Created a Geo-map for sectors in Gurgaon with color-coded pricing making it easy for the user to select property.\\n• Developed a dual-layer recommendation system to boost user engagement by suggesting top 5 properties to the user.\\n• Deployed the modules using Streamlit and AWS, enabling real-time access and interactive analytics for end-users.\\nOptimizing Performance of Dilated Convolution | Source Code |C++, CUDA Nov 2023\\n• Implemented different optimization methods to reduce the overall time required for Dialated Convolution.\\n• Optimized it using single threading and achieved a maximum improvement of 85.77%.\\n• Achieved a maximum improvement of 96% through multi-threading by changing the number of threads.\\n• Implemented it for a GPU using CUDA resulting in the speedup of 600.47 and improvement of 99.83%.\\nMovie Recommendation System | Source Code | Watch Live | Python Nov 2023\\n• Created an end to end Machine Learning project using Streamlit framework in Python and movies dataset from Kaggle.\\n• Developed a Content based Recommendation System using cosine similarity to analyze similarities among 5000 movies.\\n• SuccessfullydeployedtheapplicationonStreamlitCommunityCloud, enablingreal-timeuserinteractionsandfeedback.\\nCoursework\\n• Probability and • Systems for Machine • Machine Learning • Linear Algebra and\\nStatistics Learning Optimization\\nTechnical Skills\\nLanguages and Developer Tools: Python, C++, VS Code, Jupyter Notebook, Google Colab\\nTechnical: Neural Networks, Machine Learning, Deep Learning, Gen AI, Natural Language Processing (NLP)\\nAchievements and Positions of Responsibility\\n• Teaching Assistant for “UENG-101 Algorithms and Programming” by Prof. Y.Narahari and Prof. Viraj Kumar\\n• Secured First Position in Chase The Py By CODEFIESTA 2022\\n• Achieved a Global Rank of 157 in February Long Challenge at Codechef\\n• Earned Gold badges in Python, C++ and Problem Solving Domain on HackerRank.'"
]
},
"execution_count": 41,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pdf_data"
]
},
{
"cell_type": "code",
"execution_count": 77,
"id": "ee125b52-9dad-4f18-8005-0794e25c9df0",
"metadata": {},
"outputs": [],
"source": [
"from langchain_core.prompts import PromptTemplate\n",
"# (NO PREAMBLE) means dont give that initial text like Here is your response.\n",
"prompt_extract = PromptTemplate.from_template(\n",
" \"\"\"\n",
" ### PDF DATA OBTAINED FROM RESUME:\n",
" {pdf_data}\n",
" ### INSTRUCTION:\n",
" The data is from the resume of a person.\n",
" Your job is to extract all the details of this person and summarize it in 200 words, which includes name, education, experience, projects, skills, and achievements.\n",
" ### (NO PREAMBLE): \n",
" \"\"\"\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 78,
"id": "c56490a3-883b-41b7-b5ea-658ccb09d015",
"metadata": {},
"outputs": [],
"source": [
"chain_extract = prompt_extract | llm # this will form a langchain chain ie you are getting a prompt and passing it to LLM \n",
"res2 = chain_extract.invoke(input={'pdf_data':pdf_data})\n",
"# print(res.content)\n",
"summary = res2.content"
]
},
{
"cell_type": "code",
"execution_count": 79,
"id": "f2d33a37-0978-4fc0-a681-70600ff0bb0b",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Mandar Bhalerao is a highly skilled individual with a strong background in computer science and automation. He is currently pursuing a Master of Technology in Computer Science and Automation at the Indian Institute of Science, with a CGPA of 7.30/10.0. He holds a Bachelor of Engineering in Computer Engineering from P.E.S. Modern College of Engineering, with a CGPA of 9.34/10.0.\n",
"\n",
"Mandar has gained valuable experience through internships at NeuroPixel.AI, Western Union, and Amazon Web Services. He worked on optimizing Stable Diffusion models, improving user experience design, and analyzing global transaction data. He also completed the Solutions Architect Project and gained insights into cloud architecture.\n",
"\n",
"Mandar has worked on several projects, including a real estate price prediction model, optimizing performance of dilated convolution, and a movie recommendation system. He has demonstrated expertise in machine learning, deep learning, and natural language processing.\n",
"\n",
"Mandar's technical skills include proficiency in Python, C++, and developer tools like VS Code and Jupyter Notebook. He has achieved several accolades, including securing the first position in Chase The Py By CODEFIESTA 2022, earning gold badges on HackerRank, and achieving a global rank of 157 in the February Long Challenge at Codechef.\n"
]
}
],
"source": [
"print(summary)\n"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "aef76122-3d14-4d14-ae43-c2c7ff43212e",
"metadata": {},
"outputs": [],
"source": [
"from langchain_core.prompts import PromptTemplate\n",
"# (NO PREAMBLE) means dont give that initial text like Here is your response.\n",
"prompt_extract = PromptTemplate.from_template(\n",
" \"\"\"\n",
" ### PDF DATA OBTAINED FROM RESUME:\n",
" {pdf_data}\n",
" ### INSTRUCTION:\n",
" The data is from the resume of a person.\n",
" Your job is to extract all the details of this person and return them in JSON format containing the \n",
" following keys: `name`, `education`, `experience`, `projects`,`skills`, and `achievements`.\n",
" Only return the valid JSON.\n",
" ### VALID JSON (NO PREAMBLE): \n",
" \"\"\"\n",
")"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "2650b9bb-e304-4016-a8a5-b4f06a94d738",
"metadata": {},
"outputs": [],
"source": [
"chain_extract = prompt_extract | llm # this will form a langchain chain ie you are getting a prompt and passing it to LLM \n",
"res = chain_extract.invoke(input={'pdf_data':pdf_data})\n",
"# print(res.content)\n",
"\n",
"# we got the json format of the job description"
]
},
{
"cell_type": "code",
"execution_count": 18,
"id": "ee305e3c-8fbe-48e4-864f-b7c304badf6f",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"str"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"type(res.content)"
]
},
{
"cell_type": "code",
"execution_count": 20,
"id": "00ce2429-980b-421c-8477-850bca42540e",
"metadata": {},
"outputs": [],
"source": [
"# res.content"
]
},
{
"cell_type": "code",
"execution_count": 21,
"id": "2e2e2faa-9e9d-48c3-871c-e388cb74e4cf",
"metadata": {},
"outputs": [],
"source": [
"from langchain_core.output_parsers import JsonOutputParser\n",
"\n",
"json_parser = JsonOutputParser()\n",
"json_res = json_parser.parse(res.content)\n",
"# json_res"
]
},
{
"cell_type": "code",
"execution_count": 22,
"id": "60a3176d-2e55-4a8b-b38d-9dd35bce1dc8",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"dict"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"type(json_res)\n"
]
},
{
"cell_type": "code",
"execution_count": 23,
"id": "1221640b-52c6-47e1-9250-7db11636d14a",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'name': 'Mandar Bhalerao',\n",
" 'education': [{'institution': 'Indian Institute of Science',\n",
" 'degree': 'Master of Technology - Computer Science and Automation',\n",
" 'cgpa': '7.30/10.0',\n",
" 'duration': 'Aug 2023 – Jul 2025',\n",
" 'location': 'Bangalore, Karnataka'},\n",
" {'institution': 'P.E.S. Modern College of Engineering',\n",
" 'degree': 'Bachelor of Engineering - Computer Engineering',\n",
" 'cgpa': '9.34/10.0',\n",
" 'duration': 'Aug 2019 – Jul 2023',\n",
" 'location': 'Pune, Maharashtra'}],\n",
" 'experience': [{'company': 'NeuroPixel.AI',\n",
" 'position': 'Deep Learning Research Intern',\n",
" 'duration': 'May 2024 – July 2024',\n",
" 'achievements': ['Worked on optimization of Stable Diffusion models to improve performance, achieving significant efficiency gains.',\n",
" 'Implemented the Hyper-SD framework to enhance image synthesis efficiency by Knowledge Distillation techniques.',\n",
" 'Combined the advantages of Trajectory Preserving and Reformulation Distillation techniques for faster inference.',\n",
" 'Trained a Control Net for SDXL, resulting in a 30% improvement of the inference steps from the base SDXL model.']},\n",
" {'company': 'Western Union',\n",
" 'position': 'Software Intern',\n",
" 'duration': 'Jan 2023 – Jun 2023',\n",
" 'achievements': ['Engaged with Quantum Metric to enrich powerful UX analysis, streamlining user experience design and functionality.',\n",
" 'Analyzed global transaction data, identified bugs, and implementing solutions that boosted conversion rates by 10%.']},\n",
" {'company': 'Amazon Web Services',\n",
" 'position': 'Intern',\n",
" 'duration': 'Oct 2021 – Dec 2021',\n",
" 'achievements': ['Acquired foundational skills in AWS, utilizing essential tools and services to support scalable cloud architectures.',\n",
" 'Completed the Solutions Architect Project and gained insights about the need of Cloud and AWS in today’s world.']}],\n",
" 'projects': [{'name': 'Gurgaon Real Estate Price Prediction',\n",
" 'technologies': 'Machine Learning, AWS',\n",
" 'achievements': ['Conducted data preprocessing, feature engineering, and performed EDA to optimize model performance.',\n",
" 'Experimented different models including Linear Regression, Decision Tree, Random Forest, XGBoost etc.',\n",
" 'Achieved a best R² score of 0.90 and a Mean Absolute Error (MAE) of 44 lakhs with the RandomForest model.',\n",
" 'Created a Geo-map for sectors in Gurgaon with color-coded pricing making it easy for the user to select property.',\n",
" 'Developed a dual-layer recommendation system to boost user engagement by suggesting top 5 properties to the user.',\n",
" 'Deployed the modules using Streamlit and AWS, enabling real-time access and interactive analytics for end-users.']},\n",
" {'name': 'Optimizing Performance of Dilated Convolution',\n",
" 'technologies': 'C++, CUDA',\n",
" 'achievements': ['Implemented different optimization methods to reduce the overall time required for Dialated Convolution.',\n",
" 'Optimized it using single threading and achieved a maximum improvement of 85.77%.',\n",
" 'Achieved a maximum improvement of 96% through multi-threading by changing the number of threads.',\n",
" 'Implemented it for a GPU using CUDA resulting in the speedup of 600.47 and improvement of 99.83%.']},\n",
" {'name': 'Movie Recommendation System',\n",
" 'technologies': 'Python',\n",
" 'achievements': ['Created an end to end Machine Learning project using Streamlit framework in Python and movies dataset from Kaggle.',\n",
" 'Developed a Content based Recommendation System using cosine similarity to analyze similarities among 5000 movies.',\n",
" 'Successfully deployed the application on Streamlit Community Cloud, enabling real-time user interactions and feedback.']}],\n",
" 'skills': {'languages': ['Python', 'C++'],\n",
" 'developerTools': ['VS Code', 'Jupyter Notebook', 'Google Colab'],\n",
" 'technical': ['Neural Networks',\n",
" 'Machine Learning',\n",
" 'Deep Learning',\n",
" 'Gen AI',\n",
" 'Natural Language Processing (NLP)']},\n",
" 'achievements': [{'position': 'Teaching Assistant',\n",
" 'course': 'UENG-101 Algorithms and Programming',\n",
" 'professors': ['Prof. Y.Narahari', 'Prof. Viraj Kumar']},\n",
" {'position': 'First Position',\n",
" 'competition': 'Chase The Py By CODEFIESTA 2022'},\n",
" {'position': 'Global Rank of 157',\n",
" 'competition': 'February Long Challenge at Codechef'},\n",
" {'position': 'Gold badges',\n",
" 'domains': ['Python', 'C++', 'Problem Solving Domain'],\n",
" 'platform': 'HackerRank'}]}"
]
},
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"json_res"
]
},
{
"cell_type": "code",
"execution_count": 24,
"id": "5535e79d-13be-47fe-a0f7-3ce9a3db314b",
"metadata": {},
"outputs": [],
"source": [
"candidate_resume_details = json_res"
]
},
{
"cell_type": "code",
"execution_count": 25,
"id": "1e0616aa-375c-4b12-bcb3-bf1aed6afc34",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"dict"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"type(candidate_resume_details)"
]
},
{
"cell_type": "code",
"execution_count": 26,
"id": "2db48d13-0e93-403f-8f51-b0dfc9ca9098",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'name': 'Mandar Bhalerao',\n",
" 'education': [{'institution': 'Indian Institute of Science',\n",
" 'degree': 'Master of Technology - Computer Science and Automation',\n",
" 'cgpa': '7.30/10.0',\n",
" 'duration': 'Aug 2023 – Jul 2025',\n",
" 'location': 'Bangalore, Karnataka'},\n",
" {'institution': 'P.E.S. Modern College of Engineering',\n",
" 'degree': 'Bachelor of Engineering - Computer Engineering',\n",
" 'cgpa': '9.34/10.0',\n",
" 'duration': 'Aug 2019 – Jul 2023',\n",
" 'location': 'Pune, Maharashtra'}],\n",
" 'experience': [{'company': 'NeuroPixel.AI',\n",
" 'position': 'Deep Learning Research Intern',\n",
" 'duration': 'May 2024 – July 2024',\n",
" 'achievements': ['Worked on optimization of Stable Diffusion models to improve performance, achieving significant efficiency gains.',\n",
" 'Implemented the Hyper-SD framework to enhance image synthesis efficiency by Knowledge Distillation techniques.',\n",
" 'Combined the advantages of Trajectory Preserving and Reformulation Distillation techniques for faster inference.',\n",
" 'Trained a Control Net for SDXL, resulting in a 30% improvement of the inference steps from the base SDXL model.']},\n",
" {'company': 'Western Union',\n",
" 'position': 'Software Intern',\n",
" 'duration': 'Jan 2023 – Jun 2023',\n",
" 'achievements': ['Engaged with Quantum Metric to enrich powerful UX analysis, streamlining user experience design and functionality.',\n",
" 'Analyzed global transaction data, identified bugs, and implementing solutions that boosted conversion rates by 10%.']},\n",
" {'company': 'Amazon Web Services',\n",
" 'position': 'Intern',\n",
" 'duration': 'Oct 2021 – Dec 2021',\n",
" 'achievements': ['Acquired foundational skills in AWS, utilizing essential tools and services to support scalable cloud architectures.',\n",
" 'Completed the Solutions Architect Project and gained insights about the need of Cloud and AWS in today’s world.']}],\n",
" 'projects': [{'name': 'Gurgaon Real Estate Price Prediction',\n",
" 'technologies': 'Machine Learning, AWS',\n",
" 'achievements': ['Conducted data preprocessing, feature engineering, and performed EDA to optimize model performance.',\n",
" 'Experimented different models including Linear Regression, Decision Tree, Random Forest, XGBoost etc.',\n",
" 'Achieved a best R² score of 0.90 and a Mean Absolute Error (MAE) of 44 lakhs with the RandomForest model.',\n",
" 'Created a Geo-map for sectors in Gurgaon with color-coded pricing making it easy for the user to select property.',\n",
" 'Developed a dual-layer recommendation system to boost user engagement by suggesting top 5 properties to the user.',\n",
" 'Deployed the modules using Streamlit and AWS, enabling real-time access and interactive analytics for end-users.']},\n",
" {'name': 'Optimizing Performance of Dilated Convolution',\n",
" 'technologies': 'C++, CUDA',\n",
" 'achievements': ['Implemented different optimization methods to reduce the overall time required for Dialated Convolution.',\n",
" 'Optimized it using single threading and achieved a maximum improvement of 85.77%.',\n",
" 'Achieved a maximum improvement of 96% through multi-threading by changing the number of threads.',\n",
" 'Implemented it for a GPU using CUDA resulting in the speedup of 600.47 and improvement of 99.83%.']},\n",
" {'name': 'Movie Recommendation System',\n",
" 'technologies': 'Python',\n",
" 'achievements': ['Created an end to end Machine Learning project using Streamlit framework in Python and movies dataset from Kaggle.',\n",
" 'Developed a Content based Recommendation System using cosine similarity to analyze similarities among 5000 movies.',\n",
" 'Successfully deployed the application on Streamlit Community Cloud, enabling real-time user interactions and feedback.']}],\n",
" 'skills': {'languages': ['Python', 'C++'],\n",
" 'developerTools': ['VS Code', 'Jupyter Notebook', 'Google Colab'],\n",
" 'technical': ['Neural Networks',\n",
" 'Machine Learning',\n",
" 'Deep Learning',\n",
" 'Gen AI',\n",
" 'Natural Language Processing (NLP)']},\n",
" 'achievements': [{'position': 'Teaching Assistant',\n",
" 'course': 'UENG-101 Algorithms and Programming',\n",
" 'professors': ['Prof. Y.Narahari', 'Prof. Viraj Kumar']},\n",
" {'position': 'First Position',\n",
" 'competition': 'Chase The Py By CODEFIESTA 2022'},\n",
" {'position': 'Global Rank of 157',\n",
" 'competition': 'February Long Challenge at Codechef'},\n",
" {'position': 'Gold badges',\n",
" 'domains': ['Python', 'C++', 'Problem Solving Domain'],\n",
" 'platform': 'HackerRank'}]}"
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"candidate_resume_details"
]
},
{
"cell_type": "code",
"execution_count": 27,
"id": "44a367c8-99b0-4573-8b5e-a72ae180e063",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'role': 'Data Scientist',\n",
" 'experience': '1+ years of relevant industry experience with a Bachelor’s degree or Master’s/PhD in Computer Science, Mathematics, Statistics/related fields',\n",
" 'skills': ['Python or one other high-level programming language',\n",
" 'Theoretical understanding of statistical models such as regression, clustering and ML algorithms such as decision trees, neural networks, etc.',\n",
" 'Machine learning frameworks like TensorFlow, PyTorch, or scikit-learn',\n",
" 'SQL and/or NoSQL databases'],\n",
" 'description': 'Design, develop and deploy machine learning models, algorithms and systems to solve complex business problems for Myntra Recsys, Search, Vision, SCM, Pricing, Forecasting, Trend and Virality prediction, Gen AI and other areas. Theoretical understanding and practise of machine learning and expertise in one or more of the topics, such as, NLP, Computer Vision, recommender systems and Optimisation.'}"
]
},
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"job_description"
]
},
{
"cell_type": "code",
"execution_count": 28,
"id": "644119b0-cbc0-488c-ba01-d7ab5026862e",
"metadata": {},
"outputs": [],
"source": [
"def generate_cold_email(details):\n",
" # Extract name\n",
" name = details.get('name', 'Candidate')\n",
"\n",
" # Extract education details\n",
" education_list = details.get('education', [])\n",
" if education_list:\n",
" education_details = ', '.join([f\"{edu.get('degree', 'Unknown degree')} from {edu.get('institution', 'Unknown institution')} ({edu.get('duration', 'Unknown duration')})\" for edu in education_list])\n",
" else:\n",
" education_details = 'No education details provided'\n",
"\n",
" # Extract skills details\n",
" skills_list = details.get('skills', [])\n",
" if skills_list:\n",
" skills_details = ', '.join([', '.join(skill.get('tools', [])) for skill in skills_list])\n",
" else:\n",
" skills_details = 'No skills listed'\n",
"\n",
" # Extract experience details\n",
" experience_list = details.get('experience', [])\n",
" if experience_list:\n",
" experience_details = []\n",
" for exp in experience_list:\n",
" position = exp.get('position', 'Unknown position')\n",
" company = exp.get('company', 'Unknown company')\n",
" duration = exp.get('duration', 'Unknown duration')\n",
" achievements = exp.get('achievements', [])\n",
" achievements_details = ', '.join(achievements) if achievements else 'No achievements mentioned'\n",
" experience_details.append(f\"{position} at {company} ({duration}): {achievements_details}\")\n",
" experience_details = ', '.join(experience_details)\n",
" else:\n",
" experience_details = 'No experience provided'\n",
"\n",
" # Extract project details\n",
" project_list = details.get('projects', [])\n",
" if project_list:\n",
" project_details = []\n",
" for project in project_list:\n",
" project_name = project.get('name', 'Unknown project')\n",
" project_description = ', '.join(project.get('description', [])) if project.get('description') else 'No details provided'\n",
" project_details.append(f\"{project_name}: {project_description}\")\n",
" project_details = ', '.join(project_details)\n",
" else:\n",
" project_details = 'No projects listed'\n",
"\n",
" # Extract achievements details\n",
" achievement_list = details.get('achievements', [])\n",
" if achievement_list:\n",
" achievement_details = ', '.join([f\"{achieve.get('position', 'Unknown position')} - {achieve.get('description', 'Unknown achievement')}\" for achieve in achievement_list])\n",
" else:\n",
" achievement_details = 'No achievements listed'\n",
"\n",
" email_prompt = f\"\"\"\n",
" You are {name}, educated at {education_details}. Your skills include {skills_details}.\n",
"\n",
" You have experience as {experience_details}.\n",
" \n",
" Some of your key projects include {project_details}.\n",
" \n",
" Additionally, your achievements include {achievement_details}.\n",
" \n",
" Write a cold email to a potential employer or client, showcasing your skills, education, experience (including responsibilities and achievements), projects (with descriptions), and achievements. Explain how your background makes you an ideal candidate for their needs.\n",
"\n",
" Remember, you are {name}, ready to make a significant impact in your new role.\n",
" \"\"\"\n",
" return email_prompt\n"
]
},
{
"cell_type": "code",
"execution_count": 29,
"id": "489fdb89-4092-4e2b-b93f-f82fef33a552",
"metadata": {},
"outputs": [
{
"ename": "AttributeError",
"evalue": "'str' object has no attribute 'get'",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mAttributeError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[1;32mIn[29], line 1\u001b[0m\n\u001b[1;32m----> 1\u001b[0m \u001b[43mgenerate_cold_email\u001b[49m\u001b[43m(\u001b[49m\u001b[43mcandidate_resume_details\u001b[49m\u001b[43m)\u001b[49m\n",
"Cell \u001b[1;32mIn[28], line 15\u001b[0m, in \u001b[0;36mgenerate_cold_email\u001b[1;34m(details)\u001b[0m\n\u001b[0;32m 13\u001b[0m skills_list \u001b[38;5;241m=\u001b[39m details\u001b[38;5;241m.\u001b[39mget(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mskills\u001b[39m\u001b[38;5;124m'\u001b[39m, [])\n\u001b[0;32m 14\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m skills_list:\n\u001b[1;32m---> 15\u001b[0m skills_details \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124m, \u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;241m.\u001b[39mjoin([\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m, \u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;241m.\u001b[39mjoin(skill\u001b[38;5;241m.\u001b[39mget(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mtools\u001b[39m\u001b[38;5;124m'\u001b[39m, [])) \u001b[38;5;28;01mfor\u001b[39;00m skill \u001b[38;5;129;01min\u001b[39;00m skills_list])\n\u001b[0;32m 16\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m 17\u001b[0m skills_details \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mNo skills listed\u001b[39m\u001b[38;5;124m'\u001b[39m\n",
"Cell \u001b[1;32mIn[28], line 15\u001b[0m, in \u001b[0;36m<listcomp>\u001b[1;34m(.0)\u001b[0m\n\u001b[0;32m 13\u001b[0m skills_list \u001b[38;5;241m=\u001b[39m details\u001b[38;5;241m.\u001b[39mget(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mskills\u001b[39m\u001b[38;5;124m'\u001b[39m, [])\n\u001b[0;32m 14\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m skills_list:\n\u001b[1;32m---> 15\u001b[0m skills_details \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124m, \u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;241m.\u001b[39mjoin([\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m, \u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;241m.\u001b[39mjoin(\u001b[43mskill\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget\u001b[49m(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mtools\u001b[39m\u001b[38;5;124m'\u001b[39m, [])) \u001b[38;5;28;01mfor\u001b[39;00m skill \u001b[38;5;129;01min\u001b[39;00m skills_list])\n\u001b[0;32m 16\u001b[0m \u001b[38;5;28;01melse\u001b[39;00m:\n\u001b[0;32m 17\u001b[0m skills_details \u001b[38;5;241m=\u001b[39m \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mNo skills listed\u001b[39m\u001b[38;5;124m'\u001b[39m\n",
"\u001b[1;31mAttributeError\u001b[0m: 'str' object has no attribute 'get'"
]
}
],
"source": [
"generate_cold_email(candidate_resume_details)"
]
},
{
"cell_type": "code",
"execution_count": 30,
"id": "d85bbec6-ccc6-4b68-ab9d-5d7a32a14c72",
"metadata": {},
"outputs": [],
"source": [
"def generate_cold_email(details):\n",
" # Extract name\n",
" name = details.get('name', 'Candidate')\n",
"\n",
" # Extract education details\n",
" education_list = details.get('education', [])\n",
" if education_list:\n",
" education_details = ', '.join([f\"{edu.get('degree', 'Unknown degree')} from {edu.get('institution', 'Unknown institution')} ({edu.get('duration', 'Unknown duration')})\" for edu in education_list])\n",
" else:\n",
" education_details = 'No education details provided'\n",
"\n",
" # Extract skills details\n",
" skills_list = details.get('skills', [])\n",
" if skills_list:\n",
" skills_details = ', '.join([\n",
" ', '.join(skill.get('tools', [])) if isinstance(skill, dict) else str(skill) \n",
" for skill in skills_list\n",
" ])\n",
" else:\n",
" skills_details = 'No skills listed'\n",
"\n",
" # Extract experience details\n",
" experience_list = details.get('experience', [])\n",
" if experience_list:\n",
" experience_details = []\n",
" for exp in experience_list:\n",
" position = exp.get('position', 'Unknown position')\n",
" company = exp.get('company', 'Unknown company')\n",
" duration = exp.get('duration', 'Unknown duration')\n",
" achievements = exp.get('achievements', [])\n",
" achievements_details = ', '.join(achievements) if achievements else 'No achievements mentioned'\n",
" experience_details.append(f\"{position} at {company} ({duration}): {achievements_details}\")\n",
" experience_details = ', '.join(experience_details)\n",
" else:\n",
" experience_details = 'No experience provided'\n",
"\n",
" # Extract project details\n",
" project_list = details.get('projects', [])\n",
" if project_list:\n",
" project_details = []\n",
" for project in project_list:\n",
" project_name = project.get('name', 'Unknown project')\n",
" project_description = ', '.join(project.get('description', [])) if project.get('description') else 'No details provided'\n",
" project_details.append(f\"{project_name}: {project_description}\")\n",
" project_details = ', '.join(project_details)\n",
" else:\n",
" project_details = 'No projects listed'\n",
"\n",
" # Extract achievements details\n",
" achievement_list = details.get('achievements', [])\n",
" if achievement_list:\n",
" achievement_details = ', '.join([f\"{achieve.get('position', 'Unknown position')} - {achieve.get('description', 'Unknown achievement')}\" for achieve in achievement_list])\n",
" else:\n",
" achievement_details = 'No achievements listed'\n",
"\n",
" email_prompt = f\"\"\"\n",
" You are {name}, educated at {education_details}. Your skills include {skills_details}.\n",
" \n",
" You have experience as {experience_details}.\n",
" \n",
" Some of your key projects include {project_details}.\n",
" \n",
" Additionally, your achievements include {achievement_details}.\n",
" \n",
" Write a cold email to a potential employer or client, showcasing your skills, education, experience (including responsibilities and achievements), projects (with descriptions), and achievements. Explain how your background makes you an ideal candidate for their needs.\n",
"\n",
" Remember, you are {name}, ready to make a significant impact in your new role.\n",
" \"\"\"\n",
" return email_prompt\n"
]
},
{
"cell_type": "code",
"execution_count": 31,
"id": "e2ebd08c-e562-41fc-bede-204c67cd693b",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'\\n You are Mandar Bhalerao, educated at Master of Technology - Computer Science and Automation from Indian Institute of Science (Aug 2023 – Jul 2025), Bachelor of Engineering - Computer Engineering from P.E.S. Modern College of Engineering (Aug 2019 – Jul 2023). Your skills include languages, developerTools, technical.\\n \\n You have experience as Deep Learning Research Intern at NeuroPixel.AI (May 2024 – July 2024): Worked on optimization of Stable Diffusion models to improve performance, achieving significant efficiency gains., Implemented the Hyper-SD framework to enhance image synthesis efficiency by Knowledge Distillation techniques., Combined the advantages of Trajectory Preserving and Reformulation Distillation techniques for faster inference., Trained a Control Net for SDXL, resulting in a 30% improvement of the inference steps from the base SDXL model., Software Intern at Western Union (Jan 2023 – Jun 2023): Engaged with Quantum Metric to enrich powerful UX analysis, streamlining user experience design and functionality., Analyzed global transaction data, identified bugs, and implementing solutions that boosted conversion rates by 10%., Intern at Amazon Web Services (Oct 2021 – Dec 2021): Acquired foundational skills in AWS, utilizing essential tools and services to support scalable cloud architectures., Completed the Solutions Architect Project and gained insights about the need of Cloud and AWS in today’s world..\\n \\n Some of your key projects include Gurgaon Real Estate Price Prediction: No details provided, Optimizing Performance of Dilated Convolution: No details provided, Movie Recommendation System: No details provided.\\n \\n Additionally, your achievements include Teaching Assistant - Unknown achievement, First Position - Unknown achievement, Global Rank of 157 - Unknown achievement, Gold badges - Unknown achievement.\\n \\n Write a cold email to a potential employer or client, showcasing your skills, education, experience (including responsibilities and achievements), projects (with descriptions), and achievements. Explain how your background makes you an ideal candidate for their needs.\\n\\n Remember, you are Mandar Bhalerao, ready to make a significant impact in your new role.\\n '"
]
},
"execution_count": 31,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"generate_cold_email(candidate_resume_details)"
]
},
{
"cell_type": "code",
"execution_count": 32,
"id": "cb5717ea-9600-401b-bb93-83728415d605",
"metadata": {},
"outputs": [],
"source": [
"def generate_cold_email(details):\n",
" # Extract name\n",
" name = details.get('name', 'Candidate')\n",
"\n",
" # Extract education details\n",
" education_list = details.get('education', [])\n",
" if education_list:\n",
" education_details = ', '.join([f\"{edu.get('degree', 'Degree not specified')} from {edu.get('institution', 'Institution not specified')} ({edu.get('duration', 'Duration not specified')})\" for edu in education_list])\n",
" else:\n",
" education_details = 'No education details provided'\n",
"\n",
" # Extract skills details\n",
" skills = details.get('skills', {})\n",
" skills_details = []\n",
" if isinstance(skills, dict):\n",
" for category, tools in skills.items():\n",
" if isinstance(tools, list):\n",
" skills_details.append(f\"{category.capitalize()}: {', '.join(tools)}\")\n",
" else:\n",
" skills_details.append(f\"{category.capitalize()}: {tools}\")\n",
" elif isinstance(skills, list):\n",
" skills_details.append(', '.join(skills))\n",
" else:\n",
" skills_details = 'No skills listed'\n",
" \n",
" skills_details = '; '.join(skills_details) if skills_details else 'No skills listed'\n",
"\n",
" # Extract experience details\n",
" experience_list = details.get('experience', [])\n",
" if experience_list:\n",
" experience_details = []\n",
" for exp in experience_list:\n",
" position = exp.get('position', 'Position not specified')\n",
" company = exp.get('company', 'Company not specified')\n",
" duration = exp.get('duration', 'Duration not specified')\n",
" achievements = exp.get('achievements', [])\n",
" if isinstance(achievements, list):\n",
" achievements_details = ', '.join(achievements) if achievements else 'No achievements mentioned'\n",
" else:\n",
" achievements_details = achievements\n",
" experience_details.append(f\"{position} at {company} ({duration}): {achievements_details}\")\n",
" experience_details = '; '.join(experience_details)\n",
" else:\n",
" experience_details = 'No experience provided'\n",
"\n",
" # Extract project details\n",
" project_list = details.get('projects', [])\n",
" if project_list:\n",
" project_details = []\n",
" for project in project_list:\n",
" project_name = project.get('name', 'Project name not specified')\n",
" technologies = project.get('technologies', 'Technologies not specified')\n",
" achievements = project.get('achievements', [])\n",
" if isinstance(achievements, list):\n",
" project_achievements = ', '.join(achievements) if achievements else 'No details provided'\n",
" else:\n",
" project_achievements = achievements\n",
" project_details.append(f\"{project_name} (Technologies: {technologies}): {project_achievements}\")\n",
" project_details = '; '.join(project_details)\n",
" else:\n",
" project_details = 'No projects listed'\n",
"\n",
" # Extract achievements details\n",
" achievement_list = details.get('achievements', [])\n",
" if achievement_list:\n",
" achievement_details = []\n",
" for achieve in achievement_list:\n",
" position = achieve.get('position', 'Position not specified')\n",
" achievement_desc = ', '.join([f\"{key.capitalize()}: {value}\" for key, value in achieve.items() if key != 'position'])\n",
" achievement_details.append(f\"{position} - {achievement_desc}\")\n",
" achievement_details = '; '.join(achievement_details)\n",
" else:\n",
" achievement_details = 'No achievements listed'\n",
"\n",
" email_prompt = f\"\"\"\n",
" You are {name}, educated at {education_details}. Your skills include {skills_details}.\n",
" \n",
" You have experience as {experience_details}.\n",
" \n",
" Some of your key projects include {project_details}.\n",
" \n",
" Additionally, your achievements include {achievement_details}.\n",
" \n",
" Write a cold email to a potential employer or client, showcasing your skills, education, experience (including responsibilities and achievements), projects (with descriptions), and achievements. Explain how your background makes you an ideal candidate for their needs.\n",
"\n",
" Remember, you are {name}, ready to make a significant impact in your new role.\n",
" \"\"\"\n",
" return email_prompt"
]
},
{
"cell_type": "code",
"execution_count": 33,
"id": "4c0342dc-6f12-4d93-a35f-ec5754ebc212",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"\"\\n You are Mandar Bhalerao, educated at Master of Technology - Computer Science and Automation from Indian Institute of Science (Aug 2023 – Jul 2025), Bachelor of Engineering - Computer Engineering from P.E.S. Modern College of Engineering (Aug 2019 – Jul 2023). Your skills include Languages: Python, C++; Developertools: VS Code, Jupyter Notebook, Google Colab; Technical: Neural Networks, Machine Learning, Deep Learning, Gen AI, Natural Language Processing (NLP).\\n \\n You have experience as Deep Learning Research Intern at NeuroPixel.AI (May 2024 – July 2024): Worked on optimization of Stable Diffusion models to improve performance, achieving significant efficiency gains., Implemented the Hyper-SD framework to enhance image synthesis efficiency by Knowledge Distillation techniques., Combined the advantages of Trajectory Preserving and Reformulation Distillation techniques for faster inference., Trained a Control Net for SDXL, resulting in a 30% improvement of the inference steps from the base SDXL model.; Software Intern at Western Union (Jan 2023 – Jun 2023): Engaged with Quantum Metric to enrich powerful UX analysis, streamlining user experience design and functionality., Analyzed global transaction data, identified bugs, and implementing solutions that boosted conversion rates by 10%.; Intern at Amazon Web Services (Oct 2021 – Dec 2021): Acquired foundational skills in AWS, utilizing essential tools and services to support scalable cloud architectures., Completed the Solutions Architect Project and gained insights about the need of Cloud and AWS in today’s world..\\n \\n Some of your key projects include Gurgaon Real Estate Price Prediction (Technologies: Machine Learning, AWS): Conducted data preprocessing, feature engineering, and performed EDA to optimize model performance., Experimented different models including Linear Regression, Decision Tree, Random Forest, XGBoost etc., Achieved a best R² score of 0.90 and a Mean Absolute Error (MAE) of 44 lakhs with the RandomForest model., Created a Geo-map for sectors in Gurgaon with color-coded pricing making it easy for the user to select property., Developed a dual-layer recommendation system to boost user engagement by suggesting top 5 properties to the user., Deployed the modules using Streamlit and AWS, enabling real-time access and interactive analytics for end-users.; Optimizing Performance of Dilated Convolution (Technologies: C++, CUDA): Implemented different optimization methods to reduce the overall time required for Dialated Convolution., Optimized it using single threading and achieved a maximum improvement of 85.77%., Achieved a maximum improvement of 96% through multi-threading by changing the number of threads., Implemented it for a GPU using CUDA resulting in the speedup of 600.47 and improvement of 99.83%.; Movie Recommendation System (Technologies: Python): Created an end to end Machine Learning project using Streamlit framework in Python and movies dataset from Kaggle., Developed a Content based Recommendation System using cosine similarity to analyze similarities among 5000 movies., Successfully deployed the application on Streamlit Community Cloud, enabling real-time user interactions and feedback..\\n \\n Additionally, your achievements include Teaching Assistant - Course: UENG-101 Algorithms and Programming, Professors: ['Prof. Y.Narahari', 'Prof. Viraj Kumar']; First Position - Competition: Chase The Py By CODEFIESTA 2022; Global Rank of 157 - Competition: February Long Challenge at Codechef; Gold badges - Domains: ['Python', 'C++', 'Problem Solving Domain'], Platform: HackerRank.\\n \\n Write a cold email to a potential employer or client, showcasing your skills, education, experience (including responsibilities and achievements), projects (with descriptions), and achievements. Explain how your background makes you an ideal candidate for their needs.\\n\\n Remember, you are Mandar Bhalerao, ready to make a significant impact in your new role.\\n \""
]
},
"execution_count": 33,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"generate_cold_email(candidate_resume_details)\n"
]
},
{
"cell_type": "code",
"execution_count": 35,
"id": "d95500fa-0688-4969-99e4-b181ec7a2ed2",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"str"
]
},
"execution_count": 35,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"resume_details = generate_cold_email(candidate_resume_details)\n",
"type(resume_details)"
]
},
{
"cell_type": "code",
"execution_count": 36,
"id": "47ca8cd9-9294-4d8b-9486-fbbe718deabb",
"metadata": {},
"outputs": [],
"source": [
"# this is prompt template for writing an email\n",
"\n",
"prompt_email = PromptTemplate.from_template(\n",
" \"\"\"\n",
" ### JOB DESCRIPTION:\n",
" {job_description}\n",
"\n",
" ### INSTRUCTION:\n",
" Introduce yourself from the below details\n",
" {resume_details}\n",
" End the email with Name and Designation. \n",
" Do not provide a preamble.\n",
" ### EMAIL (NO PREAMBLE):\n",
"\n",
" \"\"\"\n",
" )"
]
},
{
"cell_type": "code",
"execution_count": 54,
"id": "ed8d8c37-5e74-46ae-8410-2ad131e9fc77",
"metadata": {},
"outputs": [],
"source": [
"# job_description"
]
},
{
"cell_type": "code",
"execution_count": 53,
"id": "1b1b3c75-9ac6-4c34-937f-1a45009b7be0",
"metadata": {},
"outputs": [],
"source": [
"# candidate_resume_details"
]
},
{
"cell_type": "code",
"execution_count": 40,
"id": "b398c4f0-d2c2-4718-bfe1-a1a9f56d3389",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"I am a highly motivated and detail-oriented Data Scientist with a strong educational background in Computer Science and Automation. I hold a Master of Technology degree from the Indian Institute of Science and a Bachelor of Engineering degree from P.E.S. Modern College of Engineering.\n",
"\n",
"With over a year of industry experience, I have worked as a Deep Learning Research Intern at NeuroPixel.AI, where I optimized Stable Diffusion models to improve performance, achieving significant efficiency gains. I also worked as a Software Intern at Western Union, where I analyzed global transaction data, identified bugs, and implemented solutions that boosted conversion rates by 10%. Additionally, I have completed internships at Amazon Web Services, where I acquired foundational skills in AWS and utilized essential tools and services to support scalable cloud architectures.\n",
"\n",
"I have a strong technical skillset, with expertise in Python, C++, Neural Networks, Machine Learning, Deep Learning, Gen AI, and Natural Language Processing (NLP). I am proficient in using developer tools such as VS Code, Jupyter Notebook, and Google Colab.\n",
"\n",
"I have worked on various projects, including a Gurgaon Real Estate Price Prediction model, where I achieved a best R² score of 0.90 and a Mean Absolute Error (MAE) of 44 lakhs with the RandomForest model. I also developed a dual-layer recommendation system to boost user engagement by suggesting top 5 properties to the user. Additionally, I have worked on optimizing the performance of Dilated Convolution using C++ and CUDA, achieving a maximum improvement of 96% through multi-threading and a speedup of 600.47 and improvement of 99.83% using CUDA.\n",
"\n",
"I am excited to apply my skills and experience to a Data Scientist role, where I can design, develop, and deploy machine learning models, algorithms, and systems to solve complex business problems.\n",
"\n",
"Mandar Bhalerao\n",
"Data Scientist\n"
]
}
],
"source": [
"# again creating a chain of prompt_email and llm\n",
"# invoking the chain by passing the parameter of job_description and link_list\n",
"\n",
"# chain_email = prompt_email | llm\n",
"# res = chain_email.invoke({\"job_description\": str(job_description), \"resume_details\": candidate_resume_details})\n",
"# print(res.content)"
]
},
{
"cell_type": "code",
"execution_count": 96,
"id": "44c12cb4-6ec5-45dc-a7df-2865d5d5eb59",
"metadata": {},
"outputs": [],
"source": [
"# this is prompt template for writing an email\n",
"\n",
"prompt_email = PromptTemplate.from_template(\n",
" \"\"\"\n",
" ### JOB DESCRIPTION:\n",
" This is a job description\n",
" \n",
" {job_description}\n",
"\n",
" ### INSTRUCTION:\n",
" These are the person's details.\n",
" {summary}\n",
" Consider yourself as this person. \n",
" \n",
" Introduce yourself in an engaging way from above with your name from the above details and your current designation. \n",
" Try to find some similar things in the job description with your details. Mention those things which are similar. Mention your experience details.\n",
" Your job is to write a cold email to the hiring manager regarding the job mentioned above describing the capability of you \n",
" in fulfilling their needs.\n",
" End the email with Name and Current place where your are working or studying. \n",
" Do not provide a preamble.\n",
" ### EMAIL (NO PREAMBLE):\n",
"\n",
" \"\"\"\n",
" )"
]
},
{
"cell_type": "code",
"execution_count": 97,
"id": "0e6d6187-ca88-451b-8a36-3db0299cbb84",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Subject: Application for Data Scientist Role at Myntra\n",
"\n",
"Dear Hiring Manager,\n",
"\n",
"I'm Mandar Bhalerao, a highly skilled and enthusiastic individual with a strong background in computer science and automation, currently pursuing my Master of Technology in Computer Science and Automation at the Indian Institute of Science.\n",
"\n",
"As I came across the Data Scientist role at Myntra, I was excited to see the alignment between the job requirements and my skills. With a solid foundation in computer science and a CGPA of 7.30/10.0 in my current program, I'm confident in my ability to design, develop, and deploy machine learning models to solve complex business problems.\n",
"\n",
"I noticed that the job description mentions expertise in machine learning frameworks like TensorFlow, PyTorch, or scikit-learn, which I've gained experience with through my projects, including a real estate price prediction model and optimizing performance of dilated convolution. Additionally, my proficiency in Python, a high-level programming language, aligns with the job requirements.\n",
"\n",
"My experience in internships at NeuroPixel.AI, Western Union, and Amazon Web Services has provided me with valuable insights into cloud architecture, user experience design, and data analysis. I've also worked on projects that involve natural language processing, recommender systems, and optimization, which are mentioned in the job description.\n",
"\n",
"As a skilled data scientist, I've achieved several accolades, including securing the first position in Chase The Py By CODEFIESTA 2022, earning gold badges on HackerRank, and achieving a global rank of 157 in the February Long Challenge at Codechef. I'm confident that my technical skills, combined with my experience and passion for machine learning, make me an ideal candidate for this role.\n",
"\n",
"I'd love the opportunity to discuss how my skills and experience align with the requirements of the Data Scientist role at Myntra. Please find my resume attached for your reference.\n",
"\n",
"Thank you for considering my application.\n",
"\n",
"Best regards,\n",
"\n",
"Mandar Bhalerao\n",
"Indian Institute of Science, Bangalore\n"
]
}
],
"source": [
"# again creating a chain of prompt_email and llm\n",
"# invoking the chain by passing the parameter of job_description and link_list\n",
"\n",
"chain_email = prompt_email | llm\n",
"res5 = chain_email.invoke({\"job_description\": str(job_description), \"summary\": summary})\n",
"print(res5.content)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "a9f23c90-47da-43ee-8017-3dd4c4082cc9",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"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.10.7"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
|