File size: 25,852 Bytes
d3a8deb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
"""
Generates sample_candidates.xlsx for testing the JD Candidate Matching System.

Run from the sample_data/ directory:
    python generate_sample_data.py

Produces: sample_candidates.xlsx (15 candidates, mix of AI and Backend Engineers)

Column schema matches the expected XLSX format:
  name, parsed_skills, parsed_summary, parsed_work_experience,
  parsed_metadata_calculated_years_experience, engineer_type,
  current_position, current_title, gen_ai_experience,
  is_actively_or_passively_looking, parsed_metadata_most_recent_company,
  notice_period
"""
import openpyxl
from openpyxl.styles import Font, PatternFill, Alignment
from pathlib import Path


def we(company, role, duration, description):
    """Format a single work experience entry as Python dict literal."""
    desc = description.replace("'", "\\'")
    return f"{{'company': '{company}', 'role': '{role}', 'duration': '{duration}', 'description': '{desc}'}}"


CANDIDATES = [
    # ── AI Engineers ─────────────────────────────────────────────────────────
    {
        "id": "AI-001",
        "name": "Priya Sharma",
        "engineer_type": "AI Engineer",
        "current_position": "Senior AI Engineer",
        "current_title": "Senior AI Engineer",
        "parsed_metadata_calculated_years_experience": 5.5,
        "parsed_metadata_most_recent_company": "Google India",
        "gen_ai_experience": "2+ years",
        "is_actively_or_passively_looking": True,
        "notice_period": "30 days",
        "parsed_skills": (
            "Python (Expert), LangChain (Advanced), RAG pipelines (Advanced), "
            "PyTorch (Advanced), HuggingFace Transformers (Advanced), "
            "FastAPI (Core), Vector Databases - Pinecone FAISS (Advanced), "
            "LLM fine-tuning (Core), AWS SageMaker (Core), Docker (Core)"
        ),
        "parsed_summary": (
            "AI Engineer with 5+ years building production ML systems. "
            "Led RAG pipeline for Google Search quality team. "
            "Published research on LLM evaluation metrics."
        ),
        "parsed_work_experience": ", ".join([
            we("Google India", "Senior AI Engineer", "2.5 years",
               "Led RAG pipeline design serving 10M queries/day. Fine-tuned LLaMA 3 on domain-specific corpora. "
               "Built LangChain agents for automated QA. Used Pinecone for vector search. Deployed on GCP Vertex AI."),
            we("Flipkart AI Labs", "ML Engineer", "2 years",
               "Built recommendation models using PyTorch. Developed FastAPI inference service. "
               "RAG-based product Q&A system using FAISS. LLM prompt engineering for catalog enrichment."),
            we("Infosys AI Studio", "Junior ML Engineer", "1 year",
               "Trained NLP classification models with HuggingFace. Deployed models on AWS SageMaker. "
               "Experimented with GPT-3 embeddings for semantic search."),
        ]),
    },
    {
        "id": "AI-002",
        "name": "Rahul Mehta",
        "engineer_type": "AI Engineer",
        "current_position": "AI Engineer",
        "current_title": "AI Engineer",
        "parsed_metadata_calculated_years_experience": 4.0,
        "parsed_metadata_most_recent_company": "Swiggy",
        "gen_ai_experience": "1.5 years - 2 years",
        "is_actively_or_passively_looking": True,
        "notice_period": "45 days",
        "parsed_skills": (
            "Python (Core), TensorFlow (Advanced), FastAPI (Core), "
            "LangChain (Basic), OpenAI API (Core), "
            "PostgreSQL (Core), Redis (Basic), Docker (Basic), AWS (Basic)"
        ),
        "parsed_summary": (
            "AI Engineer at Swiggy building demand forecasting and LLM-powered "
            "chatbot systems. Experience with LLM APIs and RAG architectures."
        ),
        "parsed_work_experience": ", ".join([
            we("Swiggy", "AI Engineer", "2 years",
               "Built LLM-powered customer support chatbot using OpenAI GPT-4 and LangChain. "
               "Integrated RAG with Redis vector store. Developed FastAPI endpoints for real-time inference. "
               "Demand forecasting using TensorFlow time-series models."),
            we("Ola Electric", "Data Scientist", "2 years",
               "Built anomaly detection models for battery management. "
               "Developed Python ETL pipelines and SQL dashboards. "
               "First LLM experiment: GPT-3 for log summarisation."),
        ]),
    },
    {
        "id": "AI-003",
        "name": "Ananya Patel",
        "engineer_type": "AI Engineer",
        "current_position": "Principal AI Engineer",
        "current_title": "Principal AI Engineer",
        "parsed_metadata_calculated_years_experience": 7.0,
        "parsed_metadata_most_recent_company": "Microsoft India",
        "gen_ai_experience": "2+ years",
        "is_actively_or_passively_looking": False,
        "notice_period": "60 days",
        "parsed_skills": (
            "Python (Expert), LangChain (Expert), LangGraph (Advanced), "
            "RAG (Expert), Vector Databases (Expert), LLM fine-tuning (Advanced), "
            "Azure OpenAI (Expert), HuggingFace (Advanced), FastAPI (Advanced), "
            "Kubernetes (Core), MLflow (Core)"
        ),
        "parsed_summary": (
            "Principal AI Engineer at Microsoft with 7 years in ML/AI. "
            "Architect of Azure OpenAI enterprise integrations. "
            "Expert in multi-agent LangGraph systems and production RAG."
        ),
        "parsed_work_experience": ", ".join([
            we("Microsoft India", "Principal AI Engineer", "3 years",
               "Architected enterprise RAG systems using Azure OpenAI and Cognitive Search. "
               "Built multi-agent LangGraph workflows for document processing. "
               "Led team of 8 engineers. LLM fine-tuning on proprietary datasets. "
               "Pinecone and Weaviate for vector search at scale."),
            we("Samsung Research", "Senior ML Engineer", "2.5 years",
               "Built on-device NLP models using HuggingFace and PyTorch. "
               "Generative AI for Bixby voice assistant. "
               "Fine-tuned LLaMA models for multilingual tasks."),
            we("Mu Sigma", "ML Engineer", "1.5 years",
               "Statistical ML models for retail analytics. Python, scikit-learn, FastAPI."),
        ]),
    },
    {
        "id": "AI-004",
        "name": "Sneha Iyer",
        "engineer_type": "AI Engineer",
        "current_position": "ML Engineer",
        "current_title": "ML Engineer",
        "parsed_metadata_calculated_years_experience": 3.5,
        "parsed_metadata_most_recent_company": "Freshworks",
        "gen_ai_experience": "6 months - 1 year",
        "is_actively_or_passively_looking": True,
        "notice_period": "30 days",
        "parsed_skills": (
            "Python (Core), scikit-learn (Advanced), FastAPI (Basic), "
            "LangChain (Basic), OpenAI API (Basic), "
            "SQL (Core), pandas (Core), Docker (Basic)"
        ),
        "parsed_summary": (
            "ML Engineer at Freshworks. Recently started exploring LLMs and GenAI. "
            "Strong classical ML background, transitioning to GenAI workloads."
        ),
        "parsed_work_experience": ", ".join([
            we("Freshworks", "ML Engineer", "2 years",
               "Built NLP models for customer sentiment analysis using scikit-learn. "
               "Developed FastAPI endpoints for ML inference. "
               "Started exploring LangChain for RAG-based knowledge base. "
               "Used OpenAI API for text classification experiments."),
            we("Tata Consultancy Services", "Software Engineer", "1.5 years",
               "Developed Python data pipelines. SQL reporting. Some ML model training."),
        ]),
    },
    {
        "id": "AI-005",
        "name": "Vikram Nair",
        "engineer_type": "AI Engineer",
        "current_position": "Software Engineer",
        "current_title": "Software Engineer",
        "parsed_metadata_calculated_years_experience": 2.5,
        "parsed_metadata_most_recent_company": "Wipro",
        "gen_ai_experience": "only internship/project experience",
        "is_actively_or_passively_looking": True,
        "notice_period": "15 days",
        "parsed_skills": (
            "Python (Basic), scikit-learn (Basic), TensorFlow (Basic), "
            "pandas (Core), SQL (Core), REST APIs (Basic)"
        ),
        "parsed_summary": (
            "Software Engineer pivoting to AI/ML. "
            "Completed LLM project during internship. "
            "Eager to grow in GenAI space."
        ),
        "parsed_work_experience": ", ".join([
            we("Wipro", "Software Engineer", "2.5 years",
               "Backend Java development. REST APIs. Some Python scripting for data tasks. "
               "Built a small text classifier using scikit-learn as a side project."),
        ]),
    },
    {
        "id": "AI-006",
        "name": "Divya Krishnan",
        "engineer_type": "AI Engineer",
        "current_position": "Research Engineer",
        "current_title": "AI Research Engineer",
        "parsed_metadata_calculated_years_experience": 4.5,
        "parsed_metadata_most_recent_company": "IIT Bangalore AI Lab",
        "gen_ai_experience": "2+ years",
        "is_actively_or_passively_looking": True,
        "notice_period": "30 days",
        "parsed_skills": (
            "Python (Expert), PyTorch (Expert), HuggingFace Transformers (Expert), "
            "LLM fine-tuning (Advanced), RLHF (Core), "
            "FAISS (Advanced), LangChain (Core), FastAPI (Core), "
            "CUDA (Basic), MLflow (Core)"
        ),
        "parsed_summary": (
            "Research Engineer specializing in LLM fine-tuning and RLHF. "
            "Published 2 papers on instruction-tuned models. "
            "Strong PyTorch and HuggingFace expertise."
        ),
        "parsed_work_experience": ", ".join([
            we("IIT Bangalore AI Lab", "Research Engineer", "2 years",
               "Fine-tuned LLaMA 2 and Mistral models using RLHF and LoRA. "
               "Built RAG evaluation benchmarks using FAISS and LangChain. "
               "Published research on hallucination mitigation in LLMs. "
               "Generative AI for code generation tasks."),
            we("Anthropic (Intern)", "AI Safety Research Intern", "6 months",
               "Red-teaming Claude models. Prompt injection research. Constitutional AI experiments."),
            we("Samsung Research", "ML Engineer", "2 years",
               "On-device transformer models with HuggingFace. MLflow for experiment tracking. "
               "FastAPI for model serving. RAG prototype using FAISS."),
        ]),
    },
    {
        "id": "AI-007",
        "name": "Arjun Bose",
        "engineer_type": "AI Engineer",
        "current_position": "Data Scientist",
        "current_title": "Senior Data Scientist",
        "parsed_metadata_calculated_years_experience": 6.0,
        "parsed_metadata_most_recent_company": "Paytm",
        "gen_ai_experience": "1 to 1.5 years",
        "is_actively_or_passively_looking": False,
        "notice_period": "90 days",
        "parsed_skills": (
            "Python (Expert), XGBoost (Expert), TensorFlow (Core), "
            "SQL (Expert), Spark (Core), AWS (Core), "
            "OpenAI API (Basic), LangChain (Basic)"
        ),
        "parsed_summary": (
            "Senior Data Scientist at Paytm with strong classical ML background. "
            "Recently began integrating LLMs into fraud detection pipeline. "
            "More DS than AI Engineer profile."
        ),
        "parsed_work_experience": ", ".join([
            we("Paytm", "Senior Data Scientist", "3 years",
               "Built fraud detection models with XGBoost. A/B testing frameworks. "
               "Recently added LLM-based transaction explanation using OpenAI API. "
               "LangChain for internal audit Q&A chatbot."),
            we("HDFC Bank", "Data Analyst", "3 years",
               "SQL reporting and Python data pipelines. Credit risk models."),
        ]),
    },
    # ── Backend Engineers ─────────────────────────────────────────────────────
    {
        "id": "BE-001",
        "name": "Kiran Kumar",
        "engineer_type": "Backend Engineer",
        "current_position": "Senior Backend Engineer",
        "current_title": "Senior Backend Engineer",
        "parsed_metadata_calculated_years_experience": 6.0,
        "parsed_metadata_most_recent_company": "Razorpay",
        "gen_ai_experience": "i do not have gen ai experience",
        "is_actively_or_passively_looking": True,
        "notice_period": "30 days",
        "parsed_skills": (
            "Node.js (Expert), Express.js (Expert), AWS (Advanced), "
            "PostgreSQL (Advanced), Redis (Advanced), "
            "Microservices (Advanced), Docker (Advanced), "
            "Kubernetes (Core), REST APIs (Expert), GraphQL (Core)"
        ),
        "parsed_summary": (
            "Senior Backend Engineer at Razorpay. 6 years building high-throughput "
            "payment APIs. Expert in Node.js microservices on AWS."
        ),
        "parsed_work_experience": ", ".join([
            we("Razorpay", "Senior Backend Engineer", "3 years",
               "Led backend for payment gateway handling 50K TPS. Node.js microservices on AWS ECS. "
               "PostgreSQL + Redis for transaction state. Built GraphQL API layer. "
               "Kafka for event streaming between services."),
            we("PhonePe", "Backend Engineer", "2 years",
               "Node.js Express APIs for UPI payment flows. "
               "Redis caching for session management. PostgreSQL sharding. Docker deployment."),
            we("Cognizant", "Software Engineer", "1 year",
               "Java Spring Boot backend. REST API development. MySQL. Agile team."),
        ]),
    },
    {
        "id": "BE-002",
        "name": "Meera Joshi",
        "engineer_type": "Backend Engineer",
        "current_position": "Backend Engineer",
        "current_title": "Backend Engineer",
        "parsed_metadata_calculated_years_experience": 4.0,
        "parsed_metadata_most_recent_company": "Zomato",
        "gen_ai_experience": None,
        "is_actively_or_passively_looking": True,
        "notice_period": "45 days",
        "parsed_skills": (
            "Node.js (Advanced), Express.js (Advanced), MongoDB (Advanced), "
            "PostgreSQL (Core), Redis (Core), AWS (Core), "
            "Docker (Core), REST APIs (Advanced), Microservices (Core)"
        ),
        "parsed_summary": (
            "Backend Engineer at Zomato. Strong Node.js and Express expertise. "
            "Built food delivery order management APIs serving millions of users."
        ),
        "parsed_work_experience": ", ".join([
            we("Zomato", "Backend Engineer", "2.5 years",
               "Built order management microservices in Node.js/Express. "
               "MongoDB for order storage. Redis for caching menu data. "
               "AWS Lambda for async order events. REST APIs consumed by mobile apps."),
            we("MakeMyTrip", "Junior Backend Engineer", "1.5 years",
               "Node.js APIs for hotel booking. PostgreSQL. Docker containers."),
        ]),
    },
    {
        "id": "BE-003",
        "name": "Arjun Singh",
        "engineer_type": "Backend Engineer",
        "current_position": "Tech Lead",
        "current_title": "Backend Tech Lead",
        "parsed_metadata_calculated_years_experience": 8.0,
        "parsed_metadata_most_recent_company": "Zerodha",
        "gen_ai_experience": "i do not have gen ai experience",
        "is_actively_or_passively_looking": False,
        "notice_period": "90 days",
        "parsed_skills": (
            "Node.js (Expert), Express.js (Expert), AWS (Expert), "
            "PostgreSQL (Expert), DynamoDB (Advanced), Redis (Advanced), "
            "Microservices (Expert), Docker (Expert), Kubernetes (Advanced), "
            "REST APIs (Expert), System Design (Expert)"
        ),
        "parsed_summary": (
            "Tech Lead at Zerodha (India's largest stock broker). "
            "8 years of backend experience. Led architecture of trading platform "
            "backend serving 10M users."
        ),
        "parsed_work_experience": ", ".join([
            we("Zerodha", "Backend Tech Lead", "4 years",
               "Architected Node.js microservices for stock trading platform. "
               "AWS EKS for container orchestration. DynamoDB for order book. "
               "PostgreSQL for account management. Redis Cluster for real-time positions. "
               "Led team of 12 backend engineers."),
            we("CRED", "Senior Backend Engineer", "2.5 years",
               "High-performance REST APIs in Node.js/Express. AWS + Kubernetes deployment. "
               "PostgreSQL with read replicas. Redis caching."),
            we("Infosys", "Software Engineer", "1.5 years",
               "Java Spring Boot. REST APIs. MySQL. Agile development."),
        ]),
    },
    {
        "id": "BE-004",
        "name": "Kavya Reddy",
        "engineer_type": "Backend Engineer",
        "current_position": "Backend Engineer",
        "current_title": "Software Engineer - Backend",
        "parsed_metadata_calculated_years_experience": 3.0,
        "parsed_metadata_most_recent_company": "OYO Rooms",
        "gen_ai_experience": None,
        "is_actively_or_passively_looking": True,
        "notice_period": "30 days",
        "parsed_skills": (
            "Node.js (Core), Express.js (Advanced), MongoDB (Advanced), "
            "AWS (Basic), Docker (Basic), REST APIs (Advanced)"
        ),
        "parsed_summary": (
            "Backend Engineer at OYO with 3 years Node.js experience. "
            "Solid Express and MongoDB skills. Limited cloud exposure."
        ),
        "parsed_work_experience": ", ".join([
            we("OYO Rooms", "Backend Engineer", "2 years",
               "Node.js/Express APIs for hotel inventory management. "
               "MongoDB for property data. REST APIs for mobile apps. "
               "Basic AWS EC2 deployment."),
            we("Wipro", "Junior Developer", "1 year",
               "Python and Node.js scripting. REST API testing. QA tasks."),
        ]),
    },
    {
        "id": "BE-005",
        "name": "Dev Agarwal",
        "engineer_type": "Backend Engineer",
        "current_position": "Junior Backend Developer",
        "current_title": "Backend Developer",
        "parsed_metadata_calculated_years_experience": 1.5,
        "parsed_metadata_most_recent_company": "Startup XYZ",
        "gen_ai_experience": None,
        "is_actively_or_passively_looking": True,
        "notice_period": "15 days",
        "parsed_skills": (
            "Node.js (Basic), Express.js (Basic), MongoDB (Basic), "
            "REST APIs (Basic), JavaScript (Core)"
        ),
        "parsed_summary": (
            "Junior backend developer with 1.5 years experience. "
            "Learning Node.js and Express. Early in career."
        ),
        "parsed_work_experience": ", ".join([
            we("Startup XYZ", "Junior Backend Developer", "1.5 years",
               "Node.js Express REST APIs for e-commerce app. MongoDB CRUD operations. "
               "Basic deployment on Heroku."),
        ]),
    },
    # ── Edge Cases ────────────────────────────────────────────────────────────
    {
        "id": "EDGE-001",
        "name": "Rohan Verma",
        "engineer_type": "AI Engineer",
        "current_position": "Fresh Graduate",
        "current_title": None,
        "parsed_metadata_calculated_years_experience": None,  # years_unknown
        "parsed_metadata_most_recent_company": None,
        "gen_ai_experience": "only internship/project experience",
        "is_actively_or_passively_looking": True,
        "notice_period": "Immediate",
        "parsed_skills": (
            "Python (Basic), TensorFlow (Basic), scikit-learn (Basic), "
            "LangChain (Basic), SQL (Basic)"
        ),
        "parsed_summary": (
            "Recent CS graduate. Built a RAG chatbot as final year project using LangChain. "
            "Eager to start career in AI Engineering."
        ),
        "parsed_work_experience": ", ".join([
            we("University Project", "AI Intern", "6 months",
               "Built RAG-based document Q&A using LangChain and FAISS. "
               "Experimented with LLM prompt engineering. Python, FastAPI for serving."),
        ]),
    },
    {
        "id": "EDGE-002",
        "name": "Pooja Gupta",
        "engineer_type": "Frontend Engineer",  # wrong type for AI JD
        "current_position": "Frontend Developer",
        "current_title": "React Developer",
        "parsed_metadata_calculated_years_experience": 4.0,
        "parsed_metadata_most_recent_company": "Accenture",
        "gen_ai_experience": "i do not have gen ai experience",
        "is_actively_or_passively_looking": False,
        "notice_period": "30 days",
        "parsed_skills": (
            "React (Expert), JavaScript (Expert), TypeScript (Advanced), "
            "Next.js (Advanced), CSS (Expert), REST APIs (Core)"
        ),
        "parsed_summary": (
            "Senior Frontend Developer specializing in React and Next.js. "
            "No backend or AI experience."
        ),
        "parsed_work_experience": ", ".join([
            we("Accenture", "Frontend Developer", "4 years",
               "React and Next.js UI development. TypeScript. REST API integration. CSS animations."),
        ]),
    },
    {
        "id": "EDGE-003",
        "name": "Siddharth Rao",
        "engineer_type": "AI Engineer",
        "current_position": "AI Engineer",
        "current_title": "AI Engineer",
        "parsed_metadata_calculated_years_experience": 3.0,
        "parsed_metadata_most_recent_company": "TCS",
        "gen_ai_experience": "2+ years",  # claims 2+ years but work history won't support it
        "is_actively_or_passively_looking": True,
        "notice_period": "60 days",
        "parsed_skills": (
            "Python (Core), SQL (Core), pandas (Core), "
            "Excel (Advanced), PowerPoint (Advanced)"
        ),
        "parsed_summary": (
            "AI Engineer at TCS with self-reported 2+ years GenAI experience. "
            "Work history reveals primarily data analyst tasks, not AI engineering."
        ),
        "parsed_work_experience": ", ".join([
            we("TCS", "Business Analyst", "3 years",
               "Data analysis using SQL and Excel. PowerPoint presentations for clients. "
               "Python scripting for data cleanup. No LLM or ML model work."),
        ]),
    },
]


def build_workbook():
    wb = openpyxl.Workbook()
    ws = wb.active
    ws.title = "Candidates"

    headers = [
        "id", "name", "engineer_type", "current_position", "current_title",
        "parsed_metadata_calculated_years_experience",
        "parsed_metadata_most_recent_company",
        "gen_ai_experience", "is_actively_or_passively_looking", "notice_period",
        "parsed_skills", "parsed_summary", "parsed_work_experience",
    ]

    # Header row styling
    header_fill = PatternFill("solid", fgColor="1F4E79")
    header_font = Font(bold=True, color="FFFFFF", size=11)
    for col_idx, header in enumerate(headers, start=1):
        cell = ws.cell(row=1, column=col_idx, value=header)
        cell.fill = header_fill
        cell.font = header_font
        cell.alignment = Alignment(horizontal="center", vertical="center")

    # Data rows
    row_fill_a = PatternFill("solid", fgColor="EBF3FB")
    row_fill_b = PatternFill("solid", fgColor="FFFFFF")
    wrap = Alignment(wrap_text=True, vertical="top")

    for row_idx, cand in enumerate(CANDIDATES, start=2):
        fill = row_fill_a if row_idx % 2 == 0 else row_fill_b
        values = [
            cand.get("id"),
            cand.get("name"),
            cand.get("engineer_type"),
            cand.get("current_position"),
            cand.get("current_title"),
            cand.get("parsed_metadata_calculated_years_experience"),
            cand.get("parsed_metadata_most_recent_company"),
            cand.get("gen_ai_experience"),
            cand.get("is_actively_or_passively_looking"),
            cand.get("notice_period"),
            cand.get("parsed_skills"),
            cand.get("parsed_summary"),
            cand.get("parsed_work_experience"),
        ]
        for col_idx, value in enumerate(values, start=1):
            cell = ws.cell(row=row_idx, column=col_idx, value=value)
            cell.fill = fill
            cell.alignment = wrap

    # Column widths
    widths = [12, 20, 18, 22, 22, 10, 22, 20, 10, 12, 60, 50, 120]
    for col_idx, width in enumerate(widths, start=1):
        ws.column_dimensions[ws.cell(row=1, column=col_idx).column_letter].width = width

    ws.row_dimensions[1].height = 20
    ws.freeze_panes = "A2"

    return wb


if __name__ == "__main__":
    out_path = Path(__file__).parent / "sample_candidates.xlsx"
    wb = build_workbook()
    wb.save(out_path)
    print(f"Generated: {out_path}")
    print(f"Total candidates: {len(CANDIDATES)}")
    types = {}
    for c in CANDIDATES:
        t = c["engineer_type"]
        types[t] = types.get(t, 0) + 1
    for t, n in types.items():
        print(f"  {t}: {n}")