Compare commits
No commits in common. "099ccc40e878d9cd1598a656bbfd06f21468f8cc" and "2c6d40560c59a077133af72f470157c973392857" have entirely different histories.
099ccc40e8
...
2c6d40560c
7 changed files with 8 additions and 64 deletions
|
@ -8,7 +8,7 @@
|
|||
"content": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "Here is the resume you need to parse:\n\n<resume>\n{{resume}}\n</resume>\n\nYou are an advanced resume parsing system designed to extract key information from resumes and organize it into a structured JSON format. Your task is to analyze the above resume and create a JSON object containing the most relevant and insightful information.\n\nPlease follow these steps to complete the task:\n\n1. Carefully read through the entire resume.\n\n2. Extract the following information:\n - First name\n - Last name\n - Location\n - Email\n - Phone Number\n - Work experience\n - School experience\n - Skills\n\n3. For each category, focus on the most insightful and relevant information.\n\n4. Wrap the resume breakdown in <resume_analysis> tags:\n\n - Quote the relevant sections for first name, last name, email, phone number, and location.\n - For work experience, list out each entry with numbers, quoting relevant details for the company, position, duration, and key responsibilities. Note any achievements or quantifiable results.\n - For school experience, list out each entry with numbers, quoting relevant details for institution, degree, field of study, and graduation year. Include any notable academic achievements.\n - For skills, categorize them into technical skills, soft skills, and domain-specific skills, listing each skill.\n - Identify any unique selling points or standout information in the resume.\n - If any information is missing from the resume, explicitly state that it's not found.\n\n5. Organize the extracted information into a JSON object with the following structure:\n\n```json\n{\n \"first_name\": \"String\",\n \"last_name\": \"String\",\n \"location\": \"String\",\n \"email\": \"String\",\n \"phone_number\": \"String\",\n \"work_experience\": [\n {\n \"company\": \"String\",\n \"position\": \"String\",\n \"duration\": \"String\",\n \"responsibilities\": [\"String\", \"String\"],\n \"achievements\": [\"String\", \"String\"]\n }\n ],\n \"school_experience\": [\n {\n \"institution\": \"String\",\n \"degree\": \"String\",\n \"field_of_study\": \"String\",\n \"graduation_year\": \"Number\",\n \"achievements\": [\"String\", \"String\"]\n }\n ],\n \"skills\": {\n \"technical\": [\"String\", \"String\"],\n \"soft\": [\"String\", \"String\"],\n \"domain_specific\": [\"String\", \"String\"]\n },\n \"unique_selling_points\": [\"String\", \"String\"]\n}\n```\n\nImportant: \n- Include all specified categories in the JSON output, even if the information is not found in the resume. \n- For missing information, use empty string values (\"\") or empty arrays ([]) as appropriate.\n- For work_experience and school_experience, if no entries are found, include an empty array.\n- For skills, if no skills are found in a category, include an empty array for that category.\n\nAfter the <resume_analysis> section, provide the final JSON output in <json_output> tags. Ensure that your JSON output follows the structure provided above, with actual data extracted from the resume or empty values for missing information."
|
||||
"text": "You are an advanced resume parsing system designed to extract key information from resumes and organize it into a structured format. Your task is to analyze the following resume and create a JSON object containing the most relevant and insightful information.\n\nHere is the resume you need to parse:\n\n<resume>\n{{resume}}\n</resume>\n\nPlease follow these steps to complete the task:\n\n1. Carefully read through the entire resume.\n\n2. Extract the following information:\n - First name\n - Last name\n - Location\n - Work experience\n - School experience\n - Skills\n\n3. For each category, focus on the most insightful and relevant information.\n\n4. Organize the extracted information into a JSON object with the following keys:\n - first_name\n - last_name\n - location\n - work_experience\n - school_experience\n - skills\n\nBefore providing the final JSON output, break down the resume inside <resume_breakdown> tags:\n\n- Quote the relevant sections for first name, last name, and location.\n- For work experience, list out each entry with numbers, quoting relevant details for company, position, duration, and key responsibilities.\n- For school experience, list out each entry with numbers, quoting relevant details for institution, degree, field of study, and graduation year.\n- For skills, categorize them into technical and soft skills, listing each skill.\n- Double-check that all required fields in the JSON structure have corresponding information from the resume.\n\nThis breakdown will help ensure a thorough and accurate parsing of the resume.\n\nHere's an example of the expected JSON structure (note that this is just a structural example and does not contain actual data):\n\n```json\n{\n \"first_name\": \"String\",\n \"last_name\": \"String\",\n \"location\": \"String\",\n \"work_experience\": [\n {\n \"company\": \"String\",\n \"position\": \"String\",\n \"duration\": \"String\",\n \"responsibilities\": [\"String\", \"String\"]\n }\n ],\n \"school_experience\": [\n {\n \"institution\": \"String\",\n \"degree\": \"String\",\n \"field_of_study\": \"String\",\n \"graduation_year\": \"Number\"\n }\n ],\n \"skills\": [\"String\", \"String\", \"String\"]\n}\n```\n\nPlease ensure that your final JSON output follows this structure, but with actual data extracted from the provided resume."
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
{
|
||||
"model": "claude-3-5-sonnet-20241022",
|
||||
"max_tokens": 8192,
|
||||
"temperature": 1,
|
||||
"messages": [
|
||||
{
|
||||
"role": "user",
|
||||
"content": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "You are an AI assistant specializing in resume tailoring. Your task is to customize a resume based on a specific job description, highlighting the most relevant experiences, skills, and qualifications for the given job.\n\nFirst, review the original resume provided in JSON format:\n\n<resume_json>\n{{resume_json}}\n</resume_json>\n\nNext, carefully read the job description:\n\n<job_description>\n{{job_description}}\n</job_description>\n\nBefore tailoring the resume, analyze the job description and the original resume. Wrap your analysis inside <detailed_analysis> tags:\n\n1. Identify key requirements, skills, and qualifications from the job description.\n2. List keywords and phrases from the job description that should be incorporated into the resume.\n3. List relevant experiences, skills, and qualifications from the original resume that align with the job description.\n4. Evaluate the quantitative achievements in the resume and how they relate to the job requirements.\n5. Note any areas where the resume could be modified to better match the job requirements.\n6. Identify any potential gaps between the job requirements and the candidate's qualifications.\n\nNow, tailor the resume following these steps:\n\n1. Reorder work experiences to prioritize the most relevant roles.\n2. Adjust responsibility descriptions to emphasize relevant skills and achievements.\n3. Highlight education and certifications that are most applicable to the job.\n4. Reorder and potentially remove skills to focus on those most relevant to the position.\n5. Ensure that the tailored resume maintains the same structure as the original, including all main sections (personal information, work experience, education, and skills).\n6. If certain experiences or skills in the original resume are not directly relevant to the job description, omit them or reduce their emphasis.\n7. Do not invent or add any new information that is not present in the original resume.\n\nAfter tailoring the resume, provide the output in rich text format suitable for saving as a Word document or PDF. Use appropriate formatting such as bold, italics, bullet points, and headings to enhance readability. Present your output within <tailored_resume> tags.\n\nFollowing the tailored resume, provide a summary of key changes made to the original resume. Present this summary within <key_changes> tags.\n\nRemember to maintain accuracy and relevance while tailoring the resume to the specific job description."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"role": "assistant",
|
||||
"content": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "<detailed_analysis>"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -11,13 +11,8 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
#tailoredResumeSection {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@layer base {
|
||||
textarea {
|
||||
resize: auto;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -549,9 +549,6 @@
|
|||
#coverLetterSection {
|
||||
display: none;
|
||||
}
|
||||
#tailoredResumeSection {
|
||||
display: none;
|
||||
}
|
||||
@layer base {
|
||||
textarea {
|
||||
resize: auto;
|
||||
|
|
|
@ -34,12 +34,6 @@
|
|||
<textarea id="coverLetterOutput" rows="15" cols="80"></textarea>
|
||||
<button id="downloadBtn">Download as DOCX</button>
|
||||
</div>
|
||||
<div id="tailoredResumeSection">
|
||||
<h3>Tailored Resume:</h3>
|
||||
<textarea id="tailoredResumeOutput" rows="15" cols="80"></textarea>
|
||||
<h3>Key Updates</h3>
|
||||
<pre id="keyResumeUpdates"></pre>
|
||||
</div>
|
||||
<!-- End Hidden Section -->
|
||||
|
||||
|
||||
|
|
|
@ -104,9 +104,6 @@ document.getElementById("generateCoverLetterBtn").addEventListener("click", asyn
|
|||
const formattedText = formatCoverLetter(data.coverLetter);
|
||||
document.getElementById("coverLetterOutput").value = formattedText;
|
||||
document.getElementById("coverLetterSection").style.display = "grid"; // Show cover letter section
|
||||
document.getElementById("tailoredResumeSection").style.display = "grid";
|
||||
document.getElementById("tailoredResumeOutput").value = data.tailoredResumeText;
|
||||
document.getElementById("keyResumeUpdates").textContent = data.resumeChanges;
|
||||
generateBtn.textContent = "Generate New Cover Letter"
|
||||
}
|
||||
} catch (error) {
|
||||
|
|
|
@ -48,7 +48,7 @@ router.post('/extract-resume', upload.single('resume'), async (req, res) => {
|
|||
const resumeResponse = await anthropic.messages.create(resume_parser_api);
|
||||
|
||||
// Extract JSON-formatted profile from the response
|
||||
const candidateProfile = resumeResponse.content[0].text.split('<json_output>')[1].split('</json_output>')[0].trim();
|
||||
const candidateProfile = resumeResponse.content[0].text.split('```json')[1].split('```')[0].trim();
|
||||
|
||||
res.json({candidateProfile: JSON.parse(candidateProfile) });
|
||||
|
||||
|
@ -61,34 +61,20 @@ router.post('/extract-resume', upload.single('resume'), async (req, res) => {
|
|||
// Handle Resume upload and user input for Job Description
|
||||
router.post('/', async (req, res) => {
|
||||
try {
|
||||
// Load Variables
|
||||
const { candidateProfile, jobDescription, keyPoints } = req.body;
|
||||
const coverLetterAPI = require('../data/cover_letter_api.json');
|
||||
const resumeTailoringAPI = require('../data/resume_tailoring_api.json');
|
||||
|
||||
// Replace API placeholders
|
||||
coverLetterAPI.messages[0].content[0].text = coverLetterAPI.messages[0].content[0].text
|
||||
const cover_letter_api = require('../data/cover_letter_api.json');
|
||||
|
||||
cover_letter_api.messages[0].content[0].text = cover_letter_api.messages[0].content[0].text
|
||||
.replace('{{resume_json}}', candidateProfile)
|
||||
.replace('{{job_description}}', jobDescription)
|
||||
.replace('{{key_points}}', keyPoints )
|
||||
.replace('{{date}}', new Date().toDateString());
|
||||
|
||||
|
||||
resumeTailoringAPI.messages[0].content[0].text = resumeTailoringAPI.messages[0].content[0].text
|
||||
.replace('{{resume_json}}', candidateProfile)
|
||||
.replace('{{job_description}}', jobDescription)
|
||||
|
||||
// Send Messages to LLM
|
||||
const coverLetterResponse = await anthropic.messages.create(coverLetterAPI);
|
||||
const tailoredResumeResponse = await anthropic.messages.create(resumeTailoringAPI);
|
||||
|
||||
// Extract Relevant Responses
|
||||
const coverLetterResponse = await anthropic.messages.create(cover_letter_api);
|
||||
const coverLetterRawText = coverLetterResponse.content[0].text.split('<cover_letter>')[1].split('</cover_letter>')[0].trim();
|
||||
const tailoredResumeText = tailoredResumeResponse.content[0].text.split('<tailored_resume>')[1].split('</tailored_resume>')[0].trim();
|
||||
const resumeChanges = tailoredResumeResponse.content[0].text.split('<key_changes>')[1].split('</key_changes>')[0].trim();
|
||||
|
||||
|
||||
res.json({ coverLetter: coverLetterRawText, tailoredResumeText, resumeChanges });
|
||||
res.json({ coverLetter: coverLetterRawText });
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
res.status(500).json({ error: 'Error generating cover letter' });
|
||||
|
|
Loading…
Reference in a new issue