codegood commited on
Commit
bc5a923
Β·
1 Parent(s): d594ea6

resume generated in perfect format and skills are aligned

Browse files
Files changed (3) hide show
  1. graph.py +3 -1
  2. resume.py +1 -1
  3. skills/generate-resume.md +77 -26
graph.py CHANGED
@@ -217,7 +217,9 @@ def build_graph(api_key=None, profile_data=None):
217
  ])
218
  return {"messages": [AIMessage(content=format_ats_report(analysis))]}
219
 
220
- resume_llm = build_llm(api_key=api_key, model=RESUME_MODEL)
 
 
221
 
222
  def resume_generation(state: ChatState):
223
  """Draft, check and render a one-page .docx resume for the loaded job description."""
 
217
  ])
218
  return {"messages": [AIMessage(content=format_ats_report(analysis))]}
219
 
220
+ # Cap at 4096 β€” a one-page resume never needs more, and reasoning models
221
+ # on the free tier silently burn 20k tokens on CoT with nothing left for output.
222
+ resume_llm = build_llm(api_key=api_key, model=RESUME_MODEL, max_tokens=75000)
223
 
224
  def resume_generation(state: ChatState):
225
  """Draft, check and render a one-page .docx resume for the loaded job description."""
resume.py CHANGED
@@ -37,7 +37,7 @@ logger = logging.getLogger(__name__)
37
  # Free model with 131K context β€” handles the full profile+JD prompt reliably.
38
  # The default openrouter/free model silently returns empty content for large prompts.
39
  # Override with the RESUME_MODEL env var (a non-reasoning model is faster and never returns empty).
40
- RESUME_MODEL = os.getenv("RESUME_MODEL", "nvidia/nemotron-3-nano-omni-30b-a3b-reasoning:free")
41
 
42
  MAX_ATTEMPTS = 3
43
  COVERAGE_TARGET = 0.9
 
37
  # Free model with 131K context β€” handles the full profile+JD prompt reliably.
38
  # The default openrouter/free model silently returns empty content for large prompts.
39
  # Override with the RESUME_MODEL env var (a non-reasoning model is faster and never returns empty).
40
+ RESUME_MODEL = os.getenv("RESUME_MODEL", "nvidia/nemotron-3.5-lightning:free")
41
 
42
  MAX_ATTEMPTS = 3
43
  COVERAGE_TARGET = 0.9
skills/generate-resume.md CHANGED
@@ -13,36 +13,82 @@ surface at least 90% of those the candidate documents honestly support, using
13
  the job description's own wording where the candidate has the skill (for
14
  example write "Model Context Protocol (MCP)" or "Retrieval-Augmented
15
  Generation (RAG)" if that is how the job description says it).
16
- Place them in the Skills lines, and inside experience/project bullets where the
17
- work really involved them. If a keyword has no support in the candidate
18
- documents, leave it out: never add it to Skills "to match".
19
 
20
  ## Tailoring rules (what makes it job-aligned, not just keyword-stuffed)
21
 
22
  - Order the Skills lines, and the items inside each line, so the terms the job
23
  description asks for come first. Rename the three category labels if a
24
  better-fitting label is supported (e.g. "Agentic AI & GenAI").
25
- - Within each role, put the bullets most relevant to the job description first,
26
- and reword them to emphasise the matching technologies and outcomes.
27
- - Keep every role, but trim the least relevant bullets to fit one page.
28
- Choose which Volunteer and Project entries to keep by relevance to the job.
29
  - Reuse the real numbers from the documents (percentages, accuracy, counts).
30
  Never invent a number.
31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  ## Strict output rules
33
 
34
  1. Output ONLY the resume. No preamble, no explanation, no closing note, no code fences.
35
- 2. No italics, code spans or tables. The ONLY allowed inline markup is `**bold**`, as described under "Bold emphasis".
36
  3. No first-person pronouns (I, me, my).
37
- 4. No placeholders such as [ADD METRIC]. If a number is not in the documents, write the bullet without one.
38
  5. Follow the exact structure below; the formatter parses it line by line.
39
  6. The result MUST fit on one US Letter page (0.44in side margins, 10pt Times New Roman).
40
 
41
  ## Line length
42
 
43
  - Full-width lines: 120 characters maximum.
44
- - Bullets: 115 characters maximum including the leading "- ". Split or shorten longer ones.
45
- - Skills lines may wrap to two rendered lines; keep each category under 330 characters.
46
  - Row lines (`### Left | Right`): keep Left + Right under 120 characters.
47
 
48
  ## Required output format
@@ -58,19 +104,24 @@ City, State | [Email](mailto:email) | Phone | [LinkedIn](url) | [GitHub](url)
58
 
59
  ## Experience
60
  ### Company - Job Title, City, State | Month Year – Month Year
61
- - Past-tense action verb, what was built, with technologies and a real metric.
 
 
 
62
 
63
  ## Volunteer Experiences & Leadership
64
  ### Organisation: Role | Remote | Month Year – Month Year
65
- - Bullet.
 
66
 
67
  ## Projects
68
  ### Project Name https://github.com/user/repo | Month Year
69
- - Bullet naming impact and key technologies.
 
70
 
71
  ## Awards & Honors
72
  - Award or publication title | Month Year
73
- - Award sentence.
74
 
75
  ## Education
76
  ### University Name | City, Country
@@ -85,22 +136,22 @@ Details:
85
  - Section order is fixed: Skills, Experience, Volunteer Experiences & Leadership,
86
  Projects, Awards & Honors, Education. Omit a section only if the documents
87
  have nothing for it.
88
- - Experience roles in reverse-chronological order, 3-4 bullets each, every bullet
89
  starting with a strong past-tense verb (Built, Deployed, Reduced, Engineered...).
90
  - Contact line: keep exactly the details found in the documents, with the
91
  LinkedIn and GitHub URLs as `[LinkedIn](url)` / `[GitHub](url)` links.
92
  Keep the name's wording; no blank line between name and contact line.
93
- - Skills: exactly three labelled lines taken from the candidate's own skills
94
- (e.g. ML & GenAI / Languages & Frameworks / MLOps, Cloud & Data).
95
- - Awards: one line per item; add " | Month Year" at the end when a date is known (shown flush right).
 
96
 
97
  ## Bold emphasis
98
 
99
  In Experience, Volunteer and Project bullets, wrap the single most important
100
- metric or technology phrase of a bullet in `**double asterisks**` (for example
101
  `cutting per-query inference cost **30% at production scale**`). At most one
102
- span per bullet, only where there is a real number or key technology. Never
103
- bold anything else.
104
 
105
  ## Grounding rules
106
 
@@ -108,9 +159,9 @@ These override everything else:
108
 
109
  - The candidate documents are the only source of truth about the candidate.
110
  Never invent employers, titles, dates, metrics, technologies or outcomes.
111
- - The job description describes what the employer wants, not what the
112
- candidate has. A requirement is never evidence of a skill the candidate has.
113
- Requirements such as security clearance, citizenship or degrees the
114
- candidate lacks are NOT mentioned.
115
  - If no job description is provided, produce the best general resume from the
116
  documents alone and skip the keyword step.
 
13
  the job description's own wording where the candidate has the skill (for
14
  example write "Model Context Protocol (MCP)" or "Retrieval-Augmented
15
  Generation (RAG)" if that is how the job description says it).
16
+ Place them in the Skills lines AND reword experience/project bullets to use the
17
+ JD's exact terminology where the work honestly involved those technologies.
18
+ If a keyword has no support in the candidate documents, leave it out.
19
 
20
  ## Tailoring rules (what makes it job-aligned, not just keyword-stuffed)
21
 
22
  - Order the Skills lines, and the items inside each line, so the terms the job
23
  description asks for come first. Rename the three category labels if a
24
  better-fitting label is supported (e.g. "Agentic AI & GenAI").
25
+ - Reword experience bullets to use the JD's own language and emphasise the
26
+ matching technologies β€” do not change the facts, only the framing.
27
+ - Within each role, put the bullets most relevant to the job description first.
 
28
  - Reuse the real numbers from the documents (percentages, accuracy, counts).
29
  Never invent a number.
30
 
31
+ ## EXACT PAGE LAYOUT β€” match this structure precisely
32
+
33
+ The resume must fill exactly one US Letter page (0.44 in side margins, 10pt
34
+ Times New Roman). Use the following section structure and bullet counts β€” no
35
+ more, no less. This is derived from the validated reference layout.
36
+
37
+ ```
38
+ Name + contact line β€” 2 lines
39
+
40
+ SKILLS (heading) β€” 1 line
41
+ 3 skill category lines (each may wrap) β€” ~6 lines
42
+
43
+ EXPERIENCE (heading) β€” 1 line
44
+ Role 1 header β€” 1 line
45
+ 4 bullets β€” 4 lines
46
+ Role 2 header β€” 1 line
47
+ 4 bullets β€” 4 lines
48
+
49
+ VOLUNTEER EXPERIENCES & LEADERSHIP β€” 1 line
50
+ Role 1 header + 2 bullets β€” 3 lines
51
+ Role 2 header + 2 bullets β€” 3 lines
52
+ Role 3 header + 2 bullets β€” 3 lines
53
+
54
+ PROJECTS (heading) β€” 1 line
55
+ Project 1 header + 2 bullets β€” 3 lines
56
+ Project 2 header + 2 bullets β€” 3 lines
57
+ Project 3 header + 2 bullets β€” 3 lines
58
+
59
+ AWARDS & HONORS (heading) β€” 1 line
60
+ 3 award / publication lines β€” 3 lines
61
+
62
+ EDUCATION (heading) β€” 1 line
63
+ University 1 name + degree line β€” 2 lines
64
+ University 2 name + degree line β€” 2 lines
65
+ ```
66
+
67
+ Rules for staying on one page:
68
+ - **Experience: exactly 4 bullets per role.** If a bullet is long, shorten it β€”
69
+ do not drop it.
70
+ - **Volunteer: exactly 3 roles, 2 bullets each.** Use all three from the documents.
71
+ - **Projects: exactly 3 projects, 2 bullets each.** Pick the 3 most JD-relevant.
72
+ - **Skills: exactly 3 labelled category lines.** Each line may wrap to 2 rendered
73
+ lines; keep each category under 330 characters.
74
+ - **Bullet line length: 115 characters maximum** including the leading "- ".
75
+ Split long bullets across two logical parts rather than one very long line.
76
+ - Education: university name line + one degree/italic line each. No extra lines.
77
+
78
  ## Strict output rules
79
 
80
  1. Output ONLY the resume. No preamble, no explanation, no closing note, no code fences.
81
+ 2. No italics, code spans or tables. The ONLY allowed inline markup is `**bold**`.
82
  3. No first-person pronouns (I, me, my).
83
+ 4. No placeholders such as [ADD METRIC]. If a number is not in the documents, omit it.
84
  5. Follow the exact structure below; the formatter parses it line by line.
85
  6. The result MUST fit on one US Letter page (0.44in side margins, 10pt Times New Roman).
86
 
87
  ## Line length
88
 
89
  - Full-width lines: 120 characters maximum.
90
+ - Bullets: 115 characters maximum including the leading "- ".
91
+ - Skills lines may wrap; keep each category under 330 characters.
92
  - Row lines (`### Left | Right`): keep Left + Right under 120 characters.
93
 
94
  ## Required output format
 
104
 
105
  ## Experience
106
  ### Company - Job Title, City, State | Month Year – Month Year
107
+ - Bullet 1
108
+ - Bullet 2
109
+ - Bullet 3
110
+ - Bullet 4
111
 
112
  ## Volunteer Experiences & Leadership
113
  ### Organisation: Role | Remote | Month Year – Month Year
114
+ - Bullet 1
115
+ - Bullet 2
116
 
117
  ## Projects
118
  ### Project Name https://github.com/user/repo | Month Year
119
+ - Bullet 1
120
+ - Bullet 2
121
 
122
  ## Awards & Honors
123
  - Award or publication title | Month Year
124
+ - Award sentence | Month Year
125
 
126
  ## Education
127
  ### University Name | City, Country
 
136
  - Section order is fixed: Skills, Experience, Volunteer Experiences & Leadership,
137
  Projects, Awards & Honors, Education. Omit a section only if the documents
138
  have nothing for it.
139
+ - Experience roles in reverse-chronological order, 4 bullets each, every bullet
140
  starting with a strong past-tense verb (Built, Deployed, Reduced, Engineered...).
141
  - Contact line: keep exactly the details found in the documents, with the
142
  LinkedIn and GitHub URLs as `[LinkedIn](url)` / `[GitHub](url)` links.
143
  Keep the name's wording; no blank line between name and contact line.
144
+ - Skills: exactly three labelled lines (e.g. ML & GenAI / Languages & Frameworks /
145
+ MLOps, Cloud & Data). Include every tool from the candidate's documents that is
146
+ relevant to the JD. Add JD-matched terms first within each line.
147
+ - Awards: one line per item; add " | Month Year" at the end when a date is known.
148
 
149
  ## Bold emphasis
150
 
151
  In Experience, Volunteer and Project bullets, wrap the single most important
152
+ metric or technology phrase in `**double asterisks**` (e.g.
153
  `cutting per-query inference cost **30% at production scale**`). At most one
154
+ span per bullet, only where there is a real number or key technology.
 
155
 
156
  ## Grounding rules
157
 
 
159
 
160
  - The candidate documents are the only source of truth about the candidate.
161
  Never invent employers, titles, dates, metrics, technologies or outcomes.
162
+ - The job description describes what the employer wants, not what the candidate
163
+ has. A requirement is never evidence of a skill the candidate has.
164
+ - Do not remove any employer, project or volunteer role from the documents.
165
+ Reword bullets to match the JD's language; do not drop them.
166
  - If no job description is provided, produce the best general resume from the
167
  documents alone and skip the keyword step.