FilipinosRich
commited on
Commit
·
555b71a
1
Parent(s):
5684a81
changed prompt and fixed typo
Browse files- app.py +4 -4
- prompts/matches.py +10 -2
app.py
CHANGED
@@ -33,7 +33,7 @@ def call_endpoint(resume_preprocessed):
|
|
33 |
return response_data
|
34 |
|
35 |
|
36 |
-
def
|
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 |
-
|
79 |
f"Score: {len(matched_skills)}<br/>-{matches_html}"
|
80 |
)
|
81 |
-
html_table += f"<tr><td>{formatted_vacancy}</td><td>{
|
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 =
|
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
@@ -112,11 +112,19 @@ def get_skills_match(llm, vacancy, resume) -> SequentialChain:
|
|
112 |
|
113 |
```
|
114 |
RESUME:
|
|
|
115 |
{resume}
|
116 |
```
|
117 |
|
118 |
-
|
119 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
|
121 |
Each match is constructed as the following JSON object:
|
122 |
|
|
|
112 |
|
113 |
```
|
114 |
RESUME:
|
115 |
+
|
116 |
{resume}
|
117 |
```
|
118 |
|
119 |
+
Given the vacancy and resume above, both delimited by three backticks, fill in the following JSON object below.
|
120 |
+
The goal is to count matches between the vacancy and the resume and the number of occurrences.
|
121 |
+
For the content, take into the account the following rules:
|
122 |
+
- the final json object should not have duplicates
|
123 |
+
- words with similar meaning should be counted as one and the same, for example 'magazijn' and 'magazijnier' should just be magazijn
|
124 |
+
- words that hold no significant meaning should not be listed, such as 'ervaring' on its own
|
125 |
+
- take into account the meaning of the matches and whether or not it is relevant
|
126 |
+
- only take into account matches that are related to job specific content, experience and/or location
|
127 |
+
- only take the key words that are important to the specific job, limit it to the 10 most relevant matches at most
|
128 |
|
129 |
Each match is constructed as the following JSON object:
|
130 |
|