Commit
·
6f544fe
1
Parent(s):
f54a323
Added past experiences
Browse files- recruiting_assistant.py +15 -10
recruiting_assistant.py
CHANGED
|
@@ -71,16 +71,17 @@ def create_intro(vacancy, resume):
|
|
| 71 |
{past_experiences}
|
| 72 |
```
|
| 73 |
|
| 74 |
-
Based on the above list of past experiences by
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
- "relevant_experiences": <list the relevant experiences. If no experiences are relevant return an empty list, do not make up an answer. >
|
| 78 |
-
- "irrelevant_experiences": <list the irrelevant experiences. If all experiences are relevant return an empty list, do not make up an answer.>
|
| 79 |
-
- "score": <calculate a percentage of the number of skills present with respect to the total skills requested>
|
| 80 |
|
| 81 |
```
|
| 82 |
-
{
|
| 83 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
"""
|
| 85 |
|
| 86 |
prompt_vacancy_check_past_experiences = ChatPromptTemplate.from_template(
|
|
@@ -110,8 +111,8 @@ def create_intro(vacancy, resume):
|
|
| 110 |
- Role: < the role of the vacancy >
|
| 111 |
- Candidate: < name of the candidate >
|
| 112 |
- Education: < name the education of the candidate >
|
| 113 |
-
- Experience: < name the 2 most relevant experiences from the candidate for this vacancy. Get them from the "relevant_experiences" key of the JSON object {past_experiences}. If there
|
| 114 |
-
- Skills: print here a comma seperated list of the "skills_present" key of the JSON object {resume_skills}
|
| 115 |
"""
|
| 116 |
|
| 117 |
prompt_introduction_email = ChatPromptTemplate.from_template(
|
|
@@ -163,7 +164,11 @@ def create_intro(vacancy, resume):
|
|
| 163 |
score = f"""
|
| 164 |
Skills (Score: {score_skills}%)
|
| 165 |
Relevant Skills: {",".join(resume_skills["skills_present"])}
|
| 166 |
-
Not Relevant Skills: {",".join(resume_skills["skills_not_present"])}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 167 |
"""
|
| 168 |
return result["introduction_email"], score
|
| 169 |
|
|
|
|
| 71 |
{past_experiences}
|
| 72 |
```
|
| 73 |
|
| 74 |
+
Based on the above list of past experiences a candidate has delimited by three backticks and the vacancy below delimited by three backticks,
|
| 75 |
+
create a JSON object based on the below keys each starting with '-'.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
|
| 77 |
```
|
| 78 |
+
{vacancy}
|
| 79 |
```
|
| 80 |
+
|
| 81 |
+
- "relevant_experiences": <list the experiences from the past experiences that are relevant to the vacancy. If no experiences are relevant return an empty list, do not make up an answer. >
|
| 82 |
+
- "irrelevant_experiences": <list the experiences from the past experiences that are not relevant to the vacancy. If all experiences are relevant return an empty list, do not make up an answer.>
|
| 83 |
+
- "score": <calculate a percentage of the number of skills present with respect to the total skills requested>
|
| 84 |
+
|
| 85 |
"""
|
| 86 |
|
| 87 |
prompt_vacancy_check_past_experiences = ChatPromptTemplate.from_template(
|
|
|
|
| 111 |
- Role: < the role of the vacancy >
|
| 112 |
- Candidate: < name of the candidate >
|
| 113 |
- Education: < name the education of the candidate >
|
| 114 |
+
- Experience: < name the 2 most relevant experiences from the candidate for this vacancy. Get them from the "relevant_experiences" key of the JSON object {past_experiences}. If there are no relevant experience, leave this empty. Do not make up an answer or get them from the irrelevant experiences. >
|
| 115 |
+
- Skills: print here a comma seperated list of the "skills_present" key of the JSON object {resume_skills}.
|
| 116 |
"""
|
| 117 |
|
| 118 |
prompt_introduction_email = ChatPromptTemplate.from_template(
|
|
|
|
| 164 |
score = f"""
|
| 165 |
Skills (Score: {score_skills}%)
|
| 166 |
Relevant Skills: {",".join(resume_skills["skills_present"])}
|
| 167 |
+
Not Relevant Skills: {",".join(resume_skills["skills_not_present"])}
|
| 168 |
+
{new_line}
|
| 169 |
+
Experiences (Score: {score_experiences}%)
|
| 170 |
+
Relevant Experiences: {",".join(check_past_experiences["relevant_experiences"])}
|
| 171 |
+
Irrelevant Experiences: {",".join(check_past_experiences["irrelevant_experiences"])}
|
| 172 |
"""
|
| 173 |
return result["introduction_email"], score
|
| 174 |
|