420 lines
15 KiB
Python
420 lines
15 KiB
Python
# Personal Information Template
|
||
personal_information_template = """
|
||
Answer the following question based on the provided personal information.
|
||
|
||
## Rules
|
||
- Answer questions directly.
|
||
|
||
## Example
|
||
My resume: John Doe, born on 01/01/1990, living in Milan, Italy.
|
||
Question: What is your city?
|
||
Milan
|
||
|
||
Personal Information: {resume_section}
|
||
Question: {question}
|
||
"""
|
||
|
||
|
||
|
||
# Personal Information Template
|
||
personal_information_template = """
|
||
Answer the following question based on the provided personal information.
|
||
|
||
## Rules
|
||
- Answer questions directly.
|
||
|
||
## Example
|
||
My resume: John Doe, born on 01/01/1990, living in Milan, Italy.
|
||
Question: What is your city?
|
||
Milan
|
||
|
||
Personal Information: {resume_section}
|
||
Question: {question}
|
||
"""
|
||
|
||
# Self Identification Template
|
||
self_identification_template = """
|
||
Answer the following question based on the provided self-identification details.
|
||
|
||
## Rules
|
||
- Answer questions directly.
|
||
|
||
## Example
|
||
My resume: Male, uses he/him pronouns, not a veteran, no disability.
|
||
Question: What are your gender?
|
||
Male
|
||
|
||
Self-Identification: {resume_section}
|
||
Question: {question}
|
||
"""
|
||
|
||
# Legal Authorization Template
|
||
legal_authorization_template = """
|
||
Answer the following question based on the provided legal authorization details.
|
||
|
||
## Rules
|
||
- Answer questions directly.
|
||
|
||
## Example
|
||
My resume: Authorized to work in the EU, no US visa required.
|
||
Question: Are you legally allowed to work in the EU?
|
||
Yes
|
||
|
||
Legal Authorization: {resume_section}
|
||
Question: {question}
|
||
"""
|
||
|
||
# Work Preferences Template
|
||
work_preferences_template = """
|
||
Answer the following question based on the provided work preferences.
|
||
|
||
## Rules
|
||
- Answer questions directly.
|
||
|
||
## Example
|
||
My resume: Open to remote work, willing to relocate.
|
||
Question: Are you open to remote work?
|
||
Yes
|
||
|
||
Work Preferences: {resume_section}
|
||
Question: {question}
|
||
"""
|
||
|
||
# Education Details Template
|
||
education_details_template = """
|
||
Answer the following question based on the provided education details.
|
||
|
||
## Rules
|
||
- Answer questions directly.
|
||
- If it seems likely that you have the experience, even if not explicitly defined, answer as if you have the experience.
|
||
- If unsure, respond with "I have no experience with that, but I learn fast" or "Not yet, but willing to learn."
|
||
- Keep the answer under 140 characters.
|
||
|
||
## Example
|
||
My resume: Bachelor's degree in Computer Science with experience in Python.
|
||
Question: Do you have experience with Python?
|
||
Yes, I have experience with Python.
|
||
|
||
Education Details: {resume_section}
|
||
Question: {question}
|
||
"""
|
||
|
||
# Experience Details Template
|
||
experience_details_template = """
|
||
Answer the following question based on the provided experience details.
|
||
|
||
## Rules
|
||
- Answer questions directly.
|
||
- If it seems likely that you have the experience, even if not explicitly defined, answer as if you have the experience.
|
||
- If unsure, respond with "I have no experience with that, but I learn fast" or "Not yet, but willing to learn."
|
||
- Keep the answer under 140 characters.
|
||
|
||
## Example
|
||
My resume: 3 years as a software developer with leadership experience.
|
||
Question: Do you have leadership experience?
|
||
Yes, I have 3 years of leadership experience.
|
||
|
||
Experience Details: {resume_section}
|
||
Question: {question}
|
||
"""
|
||
|
||
# Projects Template
|
||
projects_template = """
|
||
Answer the following question based on the provided project details.
|
||
|
||
## Rules
|
||
- Answer questions directly.
|
||
- If it seems likely that you have the experience, even if not explicitly defined, answer as if you have the experience.
|
||
- Keep the answer under 140 characters.
|
||
|
||
## Example
|
||
My resume: Led the development of a mobile app, repository available.
|
||
Question: Have you led any projects?
|
||
Yes, led the development of a mobile app
|
||
|
||
Projects: {resume_section}
|
||
Question: {question}
|
||
"""
|
||
|
||
# Availability Template
|
||
availability_template = """
|
||
Answer the following question based on the provided availability details.
|
||
|
||
## Rules
|
||
- Answer questions directly.
|
||
- Keep the answer under 140 characters.
|
||
- Use periods only if the answer has multiple sentences.
|
||
|
||
## Example
|
||
My resume: Available to start immediately.
|
||
Question: When can you start?
|
||
I can start immediately.
|
||
|
||
Availability: {resume_section}
|
||
Question: {question}
|
||
"""
|
||
|
||
# Salary Expectations Template
|
||
salary_expectations_template = """
|
||
Answer the following question based on the provided salary expectations.
|
||
|
||
## Rules
|
||
- Answer questions directly.
|
||
- Keep the answer under 140 characters.
|
||
- Use periods only if the answer has multiple sentences.
|
||
|
||
## Example
|
||
My resume: Looking for a salary in the range of 50k-60k USD.
|
||
Question: What are your salary expectations?
|
||
55000.
|
||
|
||
Salary Expectations: {resume_section}
|
||
Question: {question}
|
||
"""
|
||
|
||
# Certifications Template
|
||
certifications_template = """
|
||
Answer the following question based on the provided certifications.
|
||
|
||
## Rules
|
||
- Answer questions directly.
|
||
- If it seems likely that you have the experience, even if not explicitly defined, answer as if you have the experience.
|
||
- If unsure, respond with "I have no experience with that, but I learn fast" or "Not yet, but willing to learn."
|
||
- Keep the answer under 140 characters.
|
||
|
||
## Example
|
||
My resume: Certified in Project Management Professional (PMP).
|
||
Question: Do you have PMP certification?
|
||
Yes, I am PMP certified.
|
||
|
||
Certifications: {resume_section}
|
||
Question: {question}
|
||
"""
|
||
|
||
# Languages Template
|
||
languages_template = """
|
||
Answer the following question based on the provided language skills.
|
||
|
||
## Rules
|
||
- Answer questions directly.
|
||
- If it seems likely that you have the experience, even if not explicitly defined, answer as if you have the experience.
|
||
- If unsure, respond with "I have no experience with that, but I learn fast" or "Not yet, but willing to learn."
|
||
- Keep the answer under 140 characters.
|
||
|
||
## Example
|
||
My resume: Fluent in Italian and English.
|
||
Question: What languages do you speak?
|
||
Fluent in Italian and English.
|
||
|
||
Languages: {resume_section}
|
||
Question: {question}
|
||
"""
|
||
|
||
# Interests Template
|
||
interests_template = """
|
||
Answer the following question based on the provided interests.
|
||
|
||
## Rules
|
||
- Answer questions directly.
|
||
- Keep the answer under 140 characters.
|
||
- Use periods only if the answer has multiple sentences.
|
||
|
||
## Example
|
||
My resume: Interested in AI and data science.
|
||
Question: What are your interests?
|
||
AI and data science.
|
||
|
||
Interests: {resume_section}
|
||
Question: {question}
|
||
"""
|
||
|
||
summarize_prompt_template = """
|
||
As a seasoned HR expert, your task is to identify and outline the key skills and requirements necessary for the position of this job. Use the provided job description as input to extract all relevant information. This will involve conducting a thorough analysis of the job's responsibilities and the industry standards. You should consider both the technical and soft skills needed to excel in this role. Additionally, specify any educational qualifications, certifications, or experiences that are essential. Your analysis should also reflect on the evolving nature of this role, considering future trends and how they might affect the required competencies.
|
||
|
||
Rules:
|
||
Remove boilerplate text
|
||
Include only relevant information to match the job description against the resume
|
||
|
||
# Analysis Requirements
|
||
Your analysis should include the following sections:
|
||
Technical Skills: List all the specific technical skills required for the role based on the responsibilities described in the job description.
|
||
Soft Skills: Identify the necessary soft skills, such as communication abilities, problem-solving, time management, etc.
|
||
Educational Qualifications and Certifications: Specify the essential educational qualifications and certifications for the role.
|
||
Professional Experience: Describe the relevant work experiences that are required or preferred.
|
||
Role Evolution: Analyze how the role might evolve in the future, considering industry trends and how these might influence the required skills.
|
||
|
||
# Final Result:
|
||
Your analysis should be structured in a clear and organized document with distinct sections for each of the points listed above. Each section should contain:
|
||
This comprehensive overview will serve as a guideline for the recruitment process, ensuring the identification of the most qualified candidates.
|
||
|
||
# Job Description:
|
||
```
|
||
{text}
|
||
```
|
||
|
||
---
|
||
|
||
# Job Description Summary"""
|
||
|
||
|
||
coverletter_template = """
|
||
Compose a brief and impactful cover letter based on the provided job description and resume. The letter should be no longer than three paragraphs and should be written in a professional, yet conversational tone. Avoid using any placeholders, and ensure that the letter flows naturally and is tailored to the job.
|
||
|
||
Analyze the job description to identify key qualifications and requirements. Introduce the candidate succinctly, aligning their career objectives with the role. Highlight relevant skills and experiences from the resume that directly match the job’s demands, using specific examples to illustrate these qualifications. Reference notable aspects of the company, such as its mission or values, that resonate with the candidate’s professional goals. Conclude with a strong statement of why the candidate is a good fit for the position, expressing a desire to discuss further.
|
||
|
||
Please write the cover letter in a way that directly addresses the job role and the company’s characteristics, ensuring it remains concise and engaging without unnecessary embellishments. The letter should be formatted into paragraphs and should not include a greeting or signature.
|
||
|
||
## Rules:
|
||
- Provide only the text of the cover letter.
|
||
- Do not include any introductions, explanations, or additional information.
|
||
- The letter should be formatted into paragraph.
|
||
|
||
## Job Description:
|
||
```
|
||
{job_description}
|
||
```
|
||
## My resume:
|
||
```
|
||
{resume}
|
||
```
|
||
"""
|
||
|
||
numeric_question_template = """
|
||
Read the following resume carefully and answer the specific questions regarding the candidate's experience with a number of years. Follow these strategic guidelines when responding:
|
||
|
||
|
||
1. **Related and Inferred Experience:**
|
||
- **Similar Technologies:** If experience with a technology is not explicitly stated, but the candidate has experience with similar or related technologies, respond with a number of years that reflects this related experience. For example, if the candidate has experience with Python and projects that involve technologies similar to Java, consider a plausible number of years for Java.
|
||
- **Projects and Studies:** Examine the candidate’s projects and studies to infer skills not explicitly mentioned. Complex and advanced projects often indicate deeper expertise. For instance, if a project involves MQTT, you might infer IoT experience even if it's not explicitly mentioned.
|
||
|
||
2. **Indirect Experience and Academic Background:**
|
||
- **Relevant Projects:** Consider the types of projects the candidate has worked on and the time spent on each project. Advanced projects suggest deeper skills. For example, a project involving MQTT packet parsing suggests MQTT and possibly IoT skills.
|
||
- **Roles and Responsibilities:** Evaluate the roles and responsibilities held. If a role suggests knowledge of specific technologies or skills, provide a number based on that experience.
|
||
- **Type of University and Studies:** Also consider the type of university and the duration of studies. Prestigious universities and advanced coursework may indicate solid theoretical knowledge. However, give less weight to academic skills compared to practical experience and projects. For example, a degree from a high-level university should influence answers to technical questions minimally.
|
||
|
||
3. **Inference Over Default Response:** Always strive to infer experience based on the available information. If direct experience cannot be confirmed, use related skills, projects, and academic background to estimate a plausible number of years. Avoid defaulting to 0 if you can infer any relevant experience.
|
||
|
||
4. **Handling Experience Estimates:**
|
||
- **For Low Experience (up to 5 years):** It is acceptable to provide inferred experience for lower amounts of experience (up to 5 years). Use related skills and projects to estimate these numbers reasonably.
|
||
- **For High Experience:** For high levels of experience, ensure the number provided is as certain as possible and based on clear evidence from the resume. Avoid making inferences for high experience levels unless the evidence is strong.
|
||
|
||
|
||
## Rules
|
||
- Answer the question directly (only number).
|
||
|
||
## Example 1
|
||
```
|
||
## Curriculum
|
||
|
||
I am a software engineer with 10 years of experience in Swift and Python. I have worked on projects including an i work 2 years with MQTT protocol.
|
||
|
||
## Question
|
||
|
||
How many years of experience do you have with IoT?
|
||
|
||
## Answer
|
||
|
||
2
|
||
```
|
||
|
||
## Example 2
|
||
```
|
||
## Curriculum
|
||
|
||
I am a software engineer with 5 years of experience in Swift and Python. I have worked on a AI project.
|
||
|
||
## Question
|
||
|
||
How many years of experience do you have with AI?
|
||
|
||
## Answer
|
||
|
||
2
|
||
```
|
||
|
||
## Resume:
|
||
```
|
||
{resume_educations}
|
||
{resume_jobs}
|
||
{resume_projects}
|
||
```
|
||
|
||
## Question:
|
||
{question}
|
||
|
||
---
|
||
|
||
When responding, consider all available information, including projects, work experience, and academic background, to provide an accurate and well-reasoned answer. Make every effort to infer relevant experience and avoid defaulting to 0 if any related experience can be estimated.
|
||
|
||
"""
|
||
|
||
options_template = """The following is a resume and an answered question about the resume, the answer is one of the options.
|
||
|
||
## Rules
|
||
- Never choose the default/placeholder option, examples are: 'Select an option', 'None', 'Choose from the options below', etc.
|
||
- The answer must be one of the options.
|
||
- The answer must exclusively contain one of the options.
|
||
|
||
## Example
|
||
My resume: I'm a software engineer with 10 years of experience on swift, python, C, C++.
|
||
Question: How many years of experience do you have on python?
|
||
Options: [1-2, 3-5, 6-10, 10+]
|
||
10+
|
||
|
||
-----
|
||
|
||
## My resume:
|
||
```
|
||
{resume}
|
||
```
|
||
|
||
## Question:
|
||
{question}
|
||
|
||
## Options:
|
||
{options}
|
||
|
||
## """
|
||
|
||
|
||
try_to_fix_template = """\
|
||
The objective is to fix the text of a form input on a web page.
|
||
|
||
## Rules
|
||
- Use the error to fix the original text.
|
||
- The error "Please enter a valid answer" usually means the text is too large, shorten the reply to less than a tweet.
|
||
- For errors like "Enter a whole number between 3 and 30", just need a number.
|
||
|
||
-----
|
||
|
||
## Form Question
|
||
{question}
|
||
|
||
## Input
|
||
{input}
|
||
|
||
## Error
|
||
{error}
|
||
|
||
## Fixed Input
|
||
"""
|
||
|
||
func_summarize_prompt_template = """
|
||
Following are two texts, one with placeholders and one without, the second text uses information from the first text to fill the placeholders.
|
||
|
||
## Rules
|
||
- A placeholder is a string like "[[placeholder]]". E.g. "[[company]]", "[[job_title]]", "[[years_of_experience]]"...
|
||
- The task is to remove the placeholders from the text.
|
||
- If there is no information to fill a placeholder, remove the placeholder, and adapt the text accordingly.
|
||
- No placeholders should remain in the text.
|
||
|
||
## Example
|
||
Text with placeholders: "I'm a software engineer engineer with 10 years of experience on [placeholder] and [placeholder]."
|
||
Text without placeholders: "I'm a software engineer with 10 years of experience."
|
||
|
||
-----
|
||
|
||
## Text with placeholders:
|
||
{text_with_placeholders}
|
||
|
||
## Text without placeholders:""" |