Files changed (2) hide show
  1. app.py +4 -4
  2. prompts/matches.py +5 -1
app.py CHANGED
@@ -33,7 +33,7 @@ def call_endpoint(resume_preprocessed):
33
  return response_data
34
 
35
 
36
- def postprocess_vancy(vacancies, resume):
37
  if "prediction" in vacancies:
38
  prediction = vacancies["prediction"]
39
  if isinstance(prediction, list):
@@ -75,10 +75,10 @@ def postprocess_vancy(vacancies, resume):
75
  formatted_vacancy = vacancy.replace(".,", "<br/>")
76
  formatted_vacancy = f"VACATURE {i + 1}:<br/>{formatted_vacancy}"
77
  matches_html = "<br/> - ".join(matched_skills)
78
- macthes_formatted = (
79
  f"Score: {len(matched_skills)}<br/>-{matches_html}"
80
  )
81
- html_table += f"<tr><td>{formatted_vacancy}</td><td>{macthes_formatted}</td></tr>"
82
  html_table += "</table>"
83
  return html_table
84
 
@@ -89,7 +89,7 @@ def search(resume):
89
  original_resume = resume
90
  resume_preprocessed = preprocess_resume(llm, resume)
91
  vacancies = call_endpoint(resume_preprocessed)
92
- vacancies_formatted = postprocess_vancy(vacancies, original_resume)
93
  return vacancies_formatted
94
 
95
 
 
33
  return response_data
34
 
35
 
36
+ def postprocess_vacancy(vacancies, resume):
37
  if "prediction" in vacancies:
38
  prediction = vacancies["prediction"]
39
  if isinstance(prediction, list):
 
75
  formatted_vacancy = vacancy.replace(".,", "<br/>")
76
  formatted_vacancy = f"VACATURE {i + 1}:<br/>{formatted_vacancy}"
77
  matches_html = "<br/> - ".join(matched_skills)
78
+ matches_formatted = (
79
  f"Score: {len(matched_skills)}<br/>-{matches_html}"
80
  )
81
+ html_table += f"<tr><td>{formatted_vacancy}</td><td>{matches_formatted}</td></tr>"
82
  html_table += "</table>"
83
  return html_table
84
 
 
89
  original_resume = resume
90
  resume_preprocessed = preprocess_resume(llm, resume)
91
  vacancies = call_endpoint(resume_preprocessed)
92
+ vacancies_formatted = postprocess_vacancy(vacancies, original_resume)
93
  return vacancies_formatted
94
 
95
 
prompts/matches.py CHANGED
@@ -117,6 +117,10 @@ def get_skills_match(llm, vacancy, resume) -> SequentialChain:
117
 
118
  Both the vacancy and resume are delimited by three backticks.
119
  Can you list any matches you find in both the vacancy and the resume.
 
 
 
 
120
 
121
  Each match is constructed as the following JSON object:
122
 
@@ -145,4 +149,4 @@ def get_skills_match(llm, vacancy, resume) -> SequentialChain:
145
  ],
146
  verbose=False,
147
  )
148
- return chain({"vacancy": vacancy, "resume": resume})
 
117
 
118
  Both the vacancy and resume are delimited by three backticks.
119
  Can you list any matches you find in both the vacancy and the resume.
120
+ Take into the account the following rules about the matches:
121
+ - words with similar meaning should be counted as one and the same, for example 'magazijn' and 'magazijnier' should just be magazijn
122
+ - words that hold no significant meaning should not be listed, such as 'ervaring' on its own
123
+ - take into account the meaning of the matches and whether or not it is relevant
124
 
125
  Each match is constructed as the following JSON object:
126
 
 
149
  ],
150
  verbose=False,
151
  )
152
+ return chain({"vacancy": vacancy, "resume": resume})