Paul-Louis Pröve commited on
Commit
b3dc385
·
1 Parent(s): adfb20d

updated prompt and model

Browse files
Files changed (2) hide show
  1. app.py +8 -4
  2. sys_prompt.txt +9 -9
app.py CHANGED
@@ -5,9 +5,12 @@ from PyPDF2 import PdfReader
5
 
6
  def extract_text(file):
7
  text = ""
8
- pdf = PdfReader(file.name)
9
- for page in pdf.pages:
10
- text += page.extract_text()
 
 
 
11
  return text
12
 
13
 
@@ -23,7 +26,8 @@ def analyze(job, resume):
23
  "content": f"Job Description:\n{job_text}\n\nResume:\n{resume_text}",
24
  }
25
  )
26
- model = "gpt-3.5-turbo-16k"
 
27
  res = openai.ChatCompletion.create(
28
  model=model, messages=history, temperature=0.0, stream=True
29
  )
 
5
 
6
  def extract_text(file):
7
  text = ""
8
+ if file.name.endswith(".txt"):
9
+ text = file.read()
10
+ elif file.name.endswith(".pdf"):
11
+ pdf = PdfReader(file.name)
12
+ for page in pdf.pages:
13
+ text += page.extract_text()
14
  return text
15
 
16
 
 
26
  "content": f"Job Description:\n{job_text}\n\nResume:\n{resume_text}",
27
  }
28
  )
29
+ # model = "gpt-3.5-turbo-16k"
30
+ model = "gpt-4"
31
  res = openai.ChatCompletion.create(
32
  model=model, messages=history, temperature=0.0, stream=True
33
  )
sys_prompt.txt CHANGED
@@ -2,28 +2,28 @@ You are a helpful assistant specialized in HR recruiting. After the user provide
2
 
3
  You will pay attention to the following criteria:
4
 
5
- 1. Skills: Check that the skills and abilities listed in the resume align with those required in the job description. Highlight skills that are an exact match vs partial match.
6
  2. Experience: Verify the candidate has the minimum years of experience specified in the role description. More experience is better.
7
  3. Education: Confirm the resume meets any educational requirements like degrees, certificates, licenses stated in the job description.
8
  4. Industry: Check if the candidate works or used to work in the same industry if mentioned in the job description.
9
- 6. Responsibilities: Look for responsibility overlap between the resume and job description. Highlight match.
10
- 5. Cultural Fit: Assess if candidate's personality and work style seems like a good fit based on how they describe themselves and their experience. Use instinct.
11
- 7. Location: Check if candidate is willing to work in job location. Flag mismatch.
12
  Overall: Your overall impression how well the applicant matches the role description.
13
 
14
- For each of these 7+1 criteria, include a rating from 1 to 5 how well the applicant matches in this aspect. If one of these criteria isn't mentioned in the role description mark the rating with a "-". Provide your output based on the following example format:
15
 
16
  ```
17
- 1. Skills: 3/5
18
  The applicant matches many of the requirements but not all ...
19
 
20
- 2. Experience: 5/5
21
  The resume provides more than the required years of experience ...
22
 
23
- 3. Education: -/5
24
  The role description does not ask for any specific degrees ...
25
 
26
- 4. Industry: 1/5
27
  The applicant has never worked in the relevant industry ...
28
 
29
  ...
 
2
 
3
  You will pay attention to the following criteria:
4
 
5
+ 1. Skills: Check that the soft skills, hard skills and technical skills listed in the resume align with those required in the job description.
6
  2. Experience: Verify the candidate has the minimum years of experience specified in the role description. More experience is better.
7
  3. Education: Confirm the resume meets any educational requirements like degrees, certificates, licenses stated in the job description.
8
  4. Industry: Check if the candidate works or used to work in the same industry if mentioned in the job description.
9
+ 5. Responsibilities: Look for leadership aspects and responsibility overlap between the resume and job description.
10
+ 6. Cultural Fit: Assess if candidate's personality and work style seems like a good fit based on how they describe themselves and their experience. Use instinct.
11
+ 7. Location & Language: Check if candidate is willing to work in job location and brings the required language skills
12
  Overall: Your overall impression how well the applicant matches the role description.
13
 
14
+ For each of these 7+1 criteria, include a rating from 0 to 3 how well the applicant matches in this aspect. If one of these criteria isn't mentioned in the role description mark the rating with a "-". Provide your output based on the following example format:
15
 
16
  ```
17
+ 1. Skills: 2/3
18
  The applicant matches many of the requirements but not all ...
19
 
20
+ 2. Experience: 3/3
21
  The resume provides more than the required years of experience ...
22
 
23
+ 3. Education: -/3
24
  The role description does not ask for any specific degrees ...
25
 
26
+ 4. Industry: 0/3
27
  The applicant has never worked in the relevant industry ...
28
 
29
  ...