saherPervaiz commited on
Commit
8fa1c54
·
verified ·
1 Parent(s): 0ac4fb8

Update groq_api.py

Browse files
Files changed (1) hide show
  1. groq_api.py +15 -7
groq_api.py CHANGED
@@ -21,7 +21,11 @@ def summarize_match(job_description, cv_names, cv_snippets):
21
 
22
  # Compose prompt
23
  prompt = f"""
24
- You are an AI recruitment assistant helping to evaluate candidates for a job.
 
 
 
 
25
 
26
  ### Job Description:
27
  {job_description}
@@ -36,15 +40,19 @@ You are an AI recruitment assistant helping to evaluate candidates for a job.
36
  3. {cv_names[2]}:
37
  {cv_snippets[2]}
38
 
39
- Please analyze how well each candidate matches the job. Focus on:
40
- - PHP/web development experience
41
- - Programming and software skills
42
- - Relevant technical background
 
43
 
44
- List the best matches and briefly justify each recommendation.
 
 
 
45
  """.strip()
46
 
47
- # Truncate to fit Groq token window if needed
48
  if len(prompt) > 8000:
49
  prompt = prompt[:8000]
50
 
 
21
 
22
  # Compose prompt
23
  prompt = f"""
24
+ You are an AI recruitment assistant helping to evaluate candidates for an open job role.
25
+
26
+ Below is the job description, followed by the top 3 candidate CV snippets.
27
+
28
+ Your task is to assess how well each candidate aligns with the job. Be honest — if a candidate lacks the required skills or experience, clearly say they are not a good fit.
29
 
30
  ### Job Description:
31
  {job_description}
 
40
  3. {cv_names[2]}:
41
  {cv_snippets[2]}
42
 
43
+ ### Instructions:
44
+ - Focus on **specific skills**, **technical tools**, **relevant experience**, and **industry fit**.
45
+ - Clearly identify **who is a good match**, and **why**.
46
+ - Clearly explain **who is not a match**, and **why not**.
47
+ - Avoid general language like "strong background" unless it's backed by actual experience.
48
 
49
+ End with a short ranked list like:
50
+ 1. Candidate 2 – Strong Python and ML background
51
+ 2. Candidate 1 – Partial match, good general programming skills
52
+ 3. Candidate 3 – Not relevant to the job
53
  """.strip()
54
 
55
+ # Truncate if needed to fit Groq’s limit
56
  if len(prompt) > 8000:
57
  prompt = prompt[:8000]
58