HR AI
AI HR & Recruitment Otomasyonu
Yapay zeka ile CV tarama, aday eşleştirme, interview chatbot, yetenek analizi. Resume parsing, ATS entegrasyonu ve recruitment automation.
👔AI HR Kullanım Alanları
AI-powered HR, işe alım süresini %70 azaltır ve %40 daha kaliteli aday bulur. CV tarama, interview, onboarding süreçlerini otomatikleştirir.
Recruitment
• CV/Resume parsing
• Candidate matching
• Interview scheduling
• Chatbot pre-screening
Employee Management
• Performance prediction
• Attrition risk
• Skill gap analysis
• Career path suggestions
Onboarding
• Document automation
• Training recommendations
• Buddy matching
• Progress tracking
Resume Parsing (NLP)
# spaCy + GPT-4 ile CV parsing
import spacy
from openai import OpenAI
import json
import re
client = OpenAI()
nlp = spacy.load("en_core_web_sm")
def parse_resume(resume_text):
"""CV'den yapılandırılmış veri çıkar"""
# 1. spaCy ile entity extraction
doc = nlp(resume_text)
# Email extraction
emails = re.findall(r'\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b', resume_text)
# Phone extraction
phones = re.findall(r'\b\d{10}\b|\b\d{3}[-.]?\d{3}[-.]?\d{4}\b', resume_text)
# 2. GPT-4 ile detaylı parsing
response = client.chat.completions.create(
model="gpt-4-turbo-preview",
messages=[
{
"role": "system",
"content": """Sen bir CV parsing asistanısın.
CV'den şu bilgileri JSON formatında çıkar:
- name, email, phone
- education: [{"degree", "institution", "year", "gpa"}]
- experience: [{"title", "company", "duration", "responsibilities": []}]
- skills: [teknik ve soft skills]
- certifications: []
- languages: [{"language", "proficiency"}]
"""
},
{
"role": "user",
"content": f"CV:\n\n{resume_text}"
}
],
response_format={"type": "json_object"}
)
parsed_data = json.loads(response.choices[0].message.content)
# spaCy ile bulunan email/phone'u ekle (GPT miss ederse)
if not parsed_data.get('email') and emails:
parsed_data['email'] = emails[0]
if not parsed_data.get('phone') and phones:
parsed_data['phone'] = phones[0]
return parsed_data
# Örnek CV
cv_text = """
John Doe
john.doe@email.com | (555) 123-4567 | linkedin.com/in/johndoe
EDUCATION
B.S. Computer Science, MIT (2018-2022) - GPA: 3.8/4.0
EXPERIENCE
Senior Software Engineer, Google (2022-Present)
- Developed microservices using Go and Kubernetes
- Led team of 5 engineers on Search Ads project
- Improved latency by 40% through optimization
Software Engineer Intern, Microsoft (Summer 2021)
- Built REST APIs with C# and .NET Core
SKILLS
Technical: Python, Go, JavaScript, React, PostgreSQL, Docker, AWS
Soft Skills: Leadership, Communication, Problem-solving
CERTIFICATIONS
- AWS Solutions Architect (2023)
- Google Cloud Professional (2022)
LANGUAGES
English (Native), Spanish (Intermediate)
"""
result = parse_resume(cv_text)
print(json.dumps(result, indent=2))
# Çıktı:
# {
# "name": "John Doe",
# "email": "john.doe@email.com",
# "phone": "(555) 123-4567",
# "education": [
# {"degree": "B.S. Computer Science", "institution": "MIT", "year": "2018-2022", "gpa": "3.8"}
# ],
# "experience": [
# {
# "title": "Senior Software Engineer",
# "company": "Google",
# "duration": "2022-Present",
# "responsibilities": [
# "Developed microservices using Go and Kubernetes",
# "Led team of 5 engineers",
# "Improved latency by 40%"
# ]
# }
# ],
# "skills": {
# "technical": ["Python", "Go", "JavaScript", "React", "PostgreSQL", "Docker", "AWS"],
# "soft": ["Leadership", "Communication", "Problem-solving"]
# },
# "certifications": ["AWS Solutions Architect", "Google Cloud Professional"],
# "languages": [
# {"language": "English", "proficiency": "Native"},
# {"language": "Spanish", "proficiency": "Intermediate"}
# ]
# }Candidate Matching (Embedding)
# OpenAI Embeddings ile aday-iş eşleştirme
from openai import OpenAI
import numpy as np
from sklearn.metrics.pairwise import cosine_similarity
client = OpenAI()
# Job description
job = {
"title": "Senior Python Developer",
"description": """
We are looking for a Senior Python Developer with 5+ years of experience.
Must have: Python, Django/Flask, PostgreSQL, Docker, AWS
Nice to have: React, Kubernetes, CI/CD
Responsibilities: Lead backend development, mentor junior devs, architecture design
"""
}
# Candidate resumes
candidates = [
{
"id": 1,
"name": "Alice",
"summary": "7 years Python, Django expert, PostgreSQL, AWS, Docker. Led team of 4."
},
{
"id": 2,
"name": "Bob",
"summary": "3 years Python, Flask, MySQL. Beginner in Docker."
},
{
"id": 3,
"name": "Carol",
"summary": "10 years full-stack, Python, React, Kubernetes, AWS. Architect experience."
}
]
# Embedding oluştur
def get_embedding(text):
response = client.embeddings.create(
input=text,
model="text-embedding-3-small" # $0.02/1M tokens
)
return response.data[0].embedding
# Job embedding
job_embedding = get_embedding(f"{job['title']}. {job['description']}")
# Candidate embeddings
candidate_embeddings = [
get_embedding(c['summary'])
for c in candidates
]
# Similarity hesapla
similarities = cosine_similarity(
[job_embedding],
candidate_embeddings
)[0]
# Skorları ekle
for i, candidate in enumerate(candidates):
candidate['match_score'] = round(similarities[i] * 100, 2)
# Sırala
ranked_candidates = sorted(candidates, key=lambda x: x['match_score'], reverse=True)
print("\nCandidate Ranking:")
for rank, candidate in enumerate(ranked_candidates, 1):
print(f"{rank}. {candidate['name']}: {candidate['match_score']}% match")
print(f" Summary: {candidate['summary'][:80]}...")
print()
# Çıktı:
# 1. Carol: 94.5% match (Full-stack, Python, React, K8s, AWS, Architect)
# 2. Alice: 88.2% match (7y Python, Django, PostgreSQL, AWS, Team Lead)
# 3. Bob: 62.1% match (3y Python, Flask, beginner Docker)Interview Chatbot
# GPT-4 ile pre-screening interview chatbot
from openai import OpenAI
import json
client = OpenAI()
class InterviewBot:
def __init__(self, job_description):
self.job_description = job_description
self.conversation_history = [
{
"role": "system",
"content": f"""Sen bir HR interview chatbot'usun.
Pozisyon: {job_description}
Görevlerin:
1. Adayı nezaketle karşıla
2. 5-7 teknik/soft skill sorusu sor
3. Cevapları değerlendir (1-10 skala)
4. Son olarak skor ve öneri sun
Her cevaptan sonra:
- Kısa feedback ver
- Bir sonraki soruyu sor
- Cevap kalitesini not et (internal)
"""
}
]
self.scores = []
def start_interview(self):
return self.chat("Merhaba, görüşmeye başlayalım.")
def chat(self, user_message):
self.conversation_history.append({
"role": "user",
"content": user_message
})
response = client.chat.completions.create(
model="gpt-4-turbo-preview",
messages=self.conversation_history,
temperature=0.7
)
bot_message = response.choices[0].message.content
self.conversation_history.append({
"role": "assistant",
"content": bot_message
})
return bot_message
def get_final_evaluation(self):
"""Final değerlendirme"""
eval_prompt = """
Görüşme bitti. Adayı 1-10 arası skorla:
- technical_skills
- communication
- problem_solving
- culture_fit
- overall_score
- recommendation: "Strong Hire", "Hire", "Maybe", "No Hire"
- reasoning: kısa açıklama
JSON döndür.
"""
self.conversation_history.append({
"role": "user",
"content": eval_prompt
})
response = client.chat.completions.create(
model="gpt-4-turbo-preview",
messages=self.conversation_history,
response_format={"type": "json_object"}
)
return json.loads(response.choices[0].message.content)
# Kullanım
bot = InterviewBot("Senior Python Developer - 5+ years experience, Django, PostgreSQL, AWS")
print(bot.start_interview())
# "Merhaba! Ben HR asistanınızım. Bugün Senior Python Developer pozisyonu için görüşme yapacağız.
# Hazırsanız başlayalım. Önce kendinizden bahseder misiniz?"
# Aday cevap
print(bot.chat("Merhaba, ben 7 yıldır Python geliştiriyorum. Django ve Flask ile çalıştım."))
# "Harika! 7 yıllık deneyim oldukça değerli. Peki, en son hangi projede çalıştınız ve
# bu projede karşılaştığınız en zor teknik challenge neydi?"
print(bot.chat("Bir e-ticaret platformu geliştirdik. En zor kısım 1M+ concurrent user'a scale etmekti."))
# "Çok iyi bir örnek. Scale sorununu nasıl çözdünüz?"
# ... görüşme devam eder ...
# Final değerlendirme
evaluation = bot.get_final_evaluation()
print(json.dumps(evaluation, indent=2))
# {
# "technical_skills": 8,
# "communication": 9,
# "problem_solving": 8,
# "culture_fit": 7,
# "overall_score": 8,
# "recommendation": "Strong Hire",
# "reasoning": "Candidate demonstrated strong technical expertise with 7 years of Python
# experience, excellent problem-solving in scaling challenges, and clear
# communication skills. Recommended for next round."
# }Attrition Prediction (Churn)
# Employee attrition (churn) tahmini
import pandas as pd
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import train_test_split
# Employee data
df = pd.DataFrame({
'employee_id': range(1000),
'age': [25, 32, 45, ...], # Yaş
'tenure_months': [12, 48, 120, ...], # Şirkette çalışma süresi
'satisfaction_score': [3.5, 4.2, 2.8, ...], # 1-5 memnuniyet
'performance_score': [4.1, 3.8, 4.5, ...], # 1-5 performans
'salary': [60000, 85000, 120000, ...], # Maaş
'promotions': [0, 1, 3, ...], # Terfi sayısı
'projects_completed': [5, 12, 25, ...],
'avg_monthly_hours': [160, 180, 200, ...],
'work_accident': [0, 0, 1, ...], # İş kazası geçirdi mi
'left': [0, 0, 1, ...] # Ayrıldı mı (target)
})
# Features
features = [
'age', 'tenure_months', 'satisfaction_score', 'performance_score',
'salary', 'promotions', 'projects_completed', 'avg_monthly_hours', 'work_accident'
]
X = df[features]
y = df['left']
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
# Model
model = RandomForestClassifier(n_estimators=100, random_state=42)
model.fit(X_train, y_train)
# Tahmin
y_pred = model.predict(X_test)
y_pred_proba = model.predict_proba(X_test)[:, 1]
from sklearn.metrics import classification_report
print(classification_report(y_test, y_pred))
# Risk skorları
df_test = df.iloc[X_test.index].copy()
df_test['attrition_risk'] = y_pred_proba
# Yüksek riskli çalışanlar
high_risk = df_test[df_test['attrition_risk'] > 0.7].sort_values('attrition_risk', ascending=False)
print("\nHigh Attrition Risk Employees:")
print(high_risk[['employee_id', 'satisfaction_score', 'tenure_months', 'attrition_risk']])
# Aksiyon önerileri
def recommend_retention_action(employee):
risk = employee['attrition_risk']
if employee['satisfaction_score'] < 3.0:
return "Schedule 1-on-1, address concerns"
elif employee['promotions'] == 0 and employee['tenure_months'] > 24:
return "Consider promotion/raise"
elif employee['avg_monthly_hours'] > 200:
return "Reduce workload, prevent burnout"
elif risk > 0.8:
return "Urgent: Counter-offer, retention bonus"
else:
return "Monitor closely"
high_risk['action'] = high_risk.apply(recommend_retention_action, axis=1)
print(high_risk[['employee_id', 'attrition_risk', 'action']])İş Etkileri ve ROI
AI HR Performansı
-70%
Screening Süresi
+40%
Aday Kalitesi
-50%
Hiring Cost
Örnek ROI: Tech Company (200 çalışan)
• Yıllık işe alım: 50 pozisyon
• Manuel süreç: 30 gün/pozisyon × 2 HR = 3000 saat
• AI ile: 9 gün/pozisyon × 1 HR = 450 saat (%85 azalma)
• HR saat maliyeti: 500 TL/saat
• Tasarruf: 2550 saat × 500 TL = 1.275M TL/yıl
• AI sistem: 150K TL (kurulum) + 60K TL/yıl (lisans)
• Net kazanç: 1.065M TL (ilk yıl)
AI HR Çözümünüzü Kuralım
CV parsing, candidate matching, interview chatbot ve attrition prediction ile işe alım sürecinizi %70 hızlandırın.
Demo İste→