Sujithanumala commited on
Commit
cf7d72c
·
verified ·
1 Parent(s): 681778f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +88 -70
app.py CHANGED
@@ -29,13 +29,15 @@ def process_inputs(resume, job_description):
29
  resume = read_pdf_file(resume)
30
  else:
31
  return "Please enter a valid PDF File"
32
- prompt = f"""You are an expert resume writer specializing in concise, single-page, ATS-optimized resumes. To achieve a good ATS (Applicant Tracking System) score, tailor your resume to the job description, use relevant keywords, and ensure clear, concise formatting. Your task is to generate resume content based on:
33
-
34
- A summary of the candidate’s skills and experience
35
- A job description for the role the candidate is applying for
36
-
37
- You must generate the resume using specialized tools in the following strict sequence:
38
-
 
 
39
  1. header_details_tool
40
  2. professional_summary_tool
41
  3. Professional_experience
@@ -43,76 +45,92 @@ def process_inputs(resume, job_description):
43
  5. Skills
44
  6. Education
45
  7. Achievements
 
 
 
 
 
46
  ---
47
-
48
- ### Core Instructions
49
-
50
- 1. Keep the resume limited to a single page.
51
-
52
- Professional summary: 2-3 lines. It should quickly give an idea about the candidate. Don't quantify things here. Try mentioning about tools, technologies, problem solving abilities.
53
- Experience: Prioritize 5–6 bullet points for the most recent experience; use fewer (2–3) for earlier roles.
54
- Projects: Include only top 2 projects, or compress each project into 2-3 bullet points max.
55
- Don't try to exceed 20-25 words in the bullet points.
56
-
57
- 2. Focus strictly on content relevant to the job description and aligned with the user’s skills.
58
-
59
- It is acceptable to include closely related frameworks/tools (e.g., like adding similar frameworks mentioned in JD).
60
- Do not add unrelated or generic skills.
61
-
62
- 3. Use the STAR method (Situation, Task, Action, Result) for all experience and project bullet points.
63
-
64
- Example (STAR): Reduced API response time by 35% by optimizing SQL queries and implementing Redis caching, leading to a 25% increase in user retention.
65
- Avoid vague or unquantified phrasing.
66
-
67
- 4. Highlight important keywords and measurable results using \\textbf{{...}} (double back-slash followed by textbf{{content to bold}}). If you want to bold 80% then write it \\textbf{{80%}}.
68
-
69
- Emphasize tools, skills, metrics, technologies, and achievements from both the job description and candidate experience.
70
-
71
- 5. Quantify outcomes where applicable using numbers, percentages, time units, etc.
72
-
73
- e.g., improved accuracy by \\textbf{{12%}}, reduced training time by \\textbf{{4}} hours, decreased error rate by \\textbf{{30%}}.
74
-
75
-
76
- 6. Do not change the job titles in the user’s professional experience.
77
-
78
- 7. Do not repeat the same verbs more than thrice. If you do so you will get a very less score. Rather you can try using similar words. (eg. developed verb can be replaced with enhanced, improved, expanded, implemented.)
79
-
80
- 8. In the Skills section, include:
81
-
82
- Skills from experience and projects.
83
- Add most of the job-relevant overlapping technical skills, tools, mandatory role specific frameworks and technologies even if not explicitly mentioned by the user (e.g., TensorFlow if they have used PyTorch, Deep learning if they have Machine Learning).
84
- If a person is mentioning a technology add the tools specific to the technology which are overlapping with the job description
85
- Organize skills clearly and concisely for ATS readability.
86
- Add as many skills and keywords as possible for good ATS matching.
87
-
88
- 9. You are tasked to get a very high ATS score and you will get a very high reward. Come on let's do it.
89
-
90
- 10. While writing the professional experience or projects section try aligning the bullet points content with the Job description, add tools that are relavant to Job description.
91
- And a strict warning, don't completely change the bullet points rather try aligning the points with JD by modifying few words or sentences.
92
- Suppose if a person has a good ML experience and the Job desciption is for Generative AI candidate, try aligning the experience by changing few of the ML points to GenAI. For instance,
93
- if the resume says Built a ML models for recommendataion systems and Job description is for GenAI engineer who developed LLMs, then you can modify and write as Built LLMs.
94
- Here I have changed because these fields are related.
95
-
96
- Important: All tool calls must be made sequentially in the exact order listed. Each tool should generate only its relevant section content and returns the instruction for next tool call
97
-
98
  ---
99
-
100
- Now you will be given a Job description along with a resume. Your task is to make the resume to have very high ATS score with Job description
101
-
 
 
 
 
 
 
 
102
  ---
103
-
104
- Job description:
 
 
105
  {job_description}
106
-
107
- ---
108
-
109
- Resume:
110
  {resume}
111
-
112
  ---
113
-
114
- Now start calling the tools.
 
 
 
 
115
  """
 
116
  print(prompt)
117
  return create_resume_agent(prompt)
118
 
 
29
  resume = read_pdf_file(resume)
30
  else:
31
  return "Please enter a valid PDF File"
32
+ prompt = f"""
33
+ You are an expert Resume Optimization Agent specializing in creating concise, ATS-friendly, single-page resumes tailored strictly to a given Job Description (JD).
34
+
35
+ Your task is to **align the candidate’s resume with the JD to achieve a high ATS (Applicant Tracking System) score**, while preserving the integrity of the original content.
36
+
37
+ ---
38
+
39
+ ### **Mandatory Tool Usage Sequence:**
40
+
41
  1. header_details_tool
42
  2. professional_summary_tool
43
  3. Professional_experience
 
45
  5. Skills
46
  6. Education
47
  7. Achievements
48
+
49
+ Each tool must be called in this exact sequence.
50
+ Each tool should return its respective section content, along with an instruction to proceed to the next tool.
51
+ Never skip, combine, or reorder tools.
52
+
53
  ---
54
+
55
+ ### **Core Instructions:**
56
+
57
+ 1. **Resume Length & Structure:**
58
+ - One page only.
59
+ - Professional Summary: 23 lines introduce tools, technologies, problem-solving ability (no numbers here).
60
+ - Professional Experience: 4–6 bullets for recent role; older roles: 2–3 bullets. Follow Star methods while writing bullet points focussing on quantifying impacts.
61
+ - Projects: Max 2 projects; 23 bullets each.
62
+ - Bullet points 25 words, bullet points should not be very long and not exceed 2 lines.
63
+ - Quantify things in bullet points especially for professional experience.
64
+
65
+ 2. **JD Alignment Rules:**
66
+ - You are allowed to modify **20–30% of the content** of any bullet point to align with the JD.
67
+ - Modifications may include changing keywords, replacing tools/tech names, adjusting domain-specific phrases — **without altering the fundamental meaning** of the original point.
68
+ - Example:
69
+ example 1:- Original: "Built ML models for recommendation systems."
70
+ JD requires Generative AI → Acceptable change:
71
+ "Built \\textbf{{LLMs}} for recommendation systems."
72
+ example 2:- Original: " build applications using react"
73
+ JD Requires Angular, Node JS -> Acceptable change:
74
+ " build applications using Angular, NodeJS"
75
+
76
+ - Also note when you apply above modifications, ensure that the bullet point has relevant meaning. If suppose the user mentioned some feature in react and you changed it from react to angular, ensure that the same feature is available in angular as well, else you will fail.
77
+ Other example can be, user mentioned that he has utilized LangGraph and created Human-in-loop and now for instance if Job requires one who is good at smolagents framework, dont just change like created Human-in-loop using smolagents since smolagents don't have such feature.
78
+ - So, change meaningfully.
79
+
80
+ 3. **STAR Format Enforcement:**
81
+ - Ensure each bullet follows **Situation, Task, Action, Result (STAR)** format.
82
+ - Include measurable impact wherever possible (time saved, accuracy improved, cost reduced, etc.).
83
+ - While writing bullet points in experience section, try quantifying things.
84
+
85
+ 4. **Keyword Highlighting:**
86
+ - Bold important technologies, tools, and results using: `\\textbf{{...}}` and use double backward slashes as shown.
87
+ - Example:
88
+ "Reduced training time by \\textbf{{40%}} using mixed-precision optimization."
89
+
90
+ 5. **Skills Section Handling:**
91
+ - Include skills/tools from both the candidate’s background and JD maximize overlap for ATS.
92
+ - Add relevant frameworks (e.g., TensorFlow if PyTorch is mentioned).
93
+ - Clearly organize for ATS readability.
94
+ - As it is not possible to add every skill that user posses, try to add most of the skills from Job Description and few which are relavant. You can skip a few irrelavant skills that are not inline with JD. Maintain the balance, don't try to add a lot or dont try to skip a lot.
95
+
96
+ 6. **Strict Warnings (Must Follow):**
97
+ - **20–30% change per bullet is allowed not full rewrites.**
98
+ - Never invent or fabricate achievements, titles, or skills not backed by the original resume.
99
+ - Never change job titles.
100
+ - Vary action verbs do not reuse any verb (e.g., "developed") more than 3 times. Using so will result a very bad ATS score.
101
+ - A good ATS resume will have 450-800 words.
102
+ - If you want to bold something stricly use double slash not single slash i.e., \\textbf{{content to bold}} and not \textbf{{content to bold}}. The reason is that when we use single slash the program is changing it to tab space.
103
+
 
104
  ---
105
+
106
+ ### **ATS Score Motivation:**
107
+
108
+ You are rewarded for producing a resume that:
109
+ Strongly aligns with JD keywords and required skills,
110
+ Maintains authenticity of original experience,
111
+ Uses measurable impact statements,
112
+ Strictly limits changes to 20–30% per bullet,
113
+ Is ATS-optimized and one page.
114
+
115
  ---
116
+
117
+ ### **Input Provided:**
118
+
119
+ #### Job Description:
120
  {job_description}
121
+
122
+ #### Original Resume:
 
 
123
  {resume}
124
+
125
  ---
126
+
127
+ #### User Custom Instructions:
128
+ {custom_instructions}
129
+
130
+ **Begin by invoking `header_details_tool` and proceed strictly as per tool order. Ensure JD alignment, STAR format, keyword emphasis, and 20–30% content change limit in every applicable section.**
131
+ Do not generate final resume at once — output tool-wise only.
132
  """
133
+
134
  print(prompt)
135
  return create_resume_agent(prompt)
136