Monday, June 1, 2026
banner
Top Selling Multipurpose WP Theme

Imported items

First, import some guide Python libraries. The vital ones are: open evening for accessing GPT-4o-mini, and value discount and weezy print Create a PDF model of your closing resume. Notice: This mission requires an OpenAI API key. I imported this from one other Python script.

from IPython.show import show, Markdown
from openai import OpenAI
from top_secret import my_sk

from markdown import markdown
from weasyprint import HTML

Step 1: Enter your resume and JD

Subsequent, load the entered resume into Python as a string, and write Python’s enter() The operate means that you can copy and paste into the job description when operating the script.

# open and browse the markdown file
with open("resumes/resume.md", "r", encoding="utf-8") as file:
resume_string = file.learn()

# enter job description
jd_string = enter()

The small print listed below are Resumes are saved in markdown format. That is vital as a result of it permits GPT-4o-mini to generate a brand new resume in markdown and simply model it right into a PDF. Notice: ChatGPT (or related) can convert PDF resumes to markdown.

Step 2: Create a immediate

Now that you have imported your resume and JD, you may create a immediate that tells the mannequin to optimize your resume. This is a professional tip: Create an preliminary model of this immediate utilizing ChatGPT It is because 1) it’s fairly lengthy and a couple of) LLMs have a tendency to put in writing directions which might be in step with the expectations of different LLMs.

After some experimentation, I ended up with a immediate template that appeared like this: This template rewrites your resume the place talent gaps exist and gives extra solutions for enchancment.

prompt_template = lambda resume_string, jd_string : f"""
You're a skilled resume optimization skilled specializing in tailoring
resumes to particular job descriptions. Your aim is to optimize my resume and
present actionable solutions for enchancment to align with the goal position.

### Pointers:
1. **Relevance**:
- Prioritize experiences, expertise, and achievements **most related to the
job description**.
- Take away or de-emphasize irrelevant particulars to make sure a **concise** and
**focused** resume.
- Restrict work expertise part to 2-3 most related roles
- Restrict bullet factors underneath every position to 2-3 most related impacts

2. **Motion-Pushed Outcomes**:
- Use **robust motion verbs** and **quantifiable outcomes** (e.g.,
percentages, income, effectivity enhancements) to focus on impression.

3. **Key phrase Optimization**:
- Combine **key phrases** and phrases from the job description naturally to
optimize for ATS (Applicant Monitoring Programs).

4. **Further Solutions** *(If Gaps Exist)*:
- If the resume doesn't absolutely align with the job description, recommend:
1. **Further technical or delicate expertise** that I might add to make my
profile stronger.
2. **Certifications or programs** I might pursue to bridge the hole.
3. **Undertaking concepts or experiences** that may higher align with the position.

5. **Formatting**:
- Output the tailor-made resume in **clear Markdown format**.
- Embrace an **"Further Solutions"** part on the finish with
actionable enchancment suggestions.

---

### Enter:
- **My resume**:
{resume_string}

- **The job description**:
{jd_string}

---

### Output:
1. **Tailor-made Resume**:
- A resume in **Markdown format** that emphasizes related expertise,
expertise, and achievements.
- Incorporates job description **key phrases** to optimize for ATS.
- Makes use of robust language and is not than **one web page**.

2. **Further Solutions** *(if relevant)*:
- Listing **expertise** that would strengthen alignment with the position.
- Suggest **certifications or programs** to pursue.
- Recommend **particular tasks or experiences** to develop.
"""

Step 3: Make the API name

Utilizing the immediate template above, you may dynamically construct a immediate utilizing your enter resume and JD and ship it to OpenAI by way of the API.

# create immediate
immediate = prompt_template(resume_string, jd_string)

# setup api shopper
shopper = OpenAI(api_key=my_sk)

# make api name
response = shopper.chat.completions.create(
mannequin="gpt-4o-mini",
messages=[
{"role": "system", "content": "Expert resume writer"},
{"role": "user", "content": prompt}
],
temperature = 0.7
)

# extract response
response_string = response.decisions[0].message.content material

Step 4: Save your new resume

Lastly, you may extract an optimized resume and solutions for enchancment.

# separate new resume from enchancment solutions
response_list = response_string.cut up("## Further Solutions")

For resumes, you should utilize a markdown library to transform markdown output to HTML. Then convert the HTML to PDF utilizing weasyprint.

# save as PDF
output_pdf_file = "resumes/resume_new.pdf"

# Convert Markdown to HTML
html_content = markdown(response_list[0])

# Convert HTML to PDF and save
HTML(string=html_content).write_pdf(output_pdf_file,
stylesheets=['resumes/style.css'])

The ultimate end result will appear like this:

Remaining PDF model of your resume. Picture by writer.

For enchancment solutions, you may print them immediately.

show(Markdown(response_list[1]))
Enchancment solutions. Picture by writer.

Bonus: Construct a GUI

The code above streamlines this course of to some extent, however I am certain it might be improved additional. To enhance the usability of this device, you may: Create a easy net interface utilizing Gradio.

The ultimate product is proven beneath. Customers can add a markdown file of their resume and simply paste it right into a job description. We have additionally added an space the place customers can edit their new resume earlier than exporting it as a PDF.

Remaining GUI demo. GIF by writer.

of Pattern code is on the market on GitHub repository here. Please examine YouTube video Watch me discuss by the code.

Tailoring your resume to a particular job description is an efficient method to make your software stand out, however it may be a really tedious process. This text describes the implementation of an AI-powered resume optimization device utilizing Python and OpenAI APIs.

If in case you have any questions or need to know extra concerning the subjects coated, tell us within the feedback 🙂
—
y2b.io It helped me write this text.

banner
Top Selling Multipurpose WP Theme

Converter

Top Selling Multipurpose WP Theme

Newsletter

Subscribe my Newsletter for new blog posts, tips & new photos. Let's stay updated!

banner
Top Selling Multipurpose WP Theme

Leave a Comment

banner
Top Selling Multipurpose WP Theme

Latest

Best selling

22000,00 $
16000,00 $
6500,00 $

Top rated

6500,00 $
22000,00 $
900000,00 $

Products

Knowledge Unleashed
Knowledge Unleashed

Welcome to Ivugangingo!

At Ivugangingo, we're passionate about delivering insightful content that empowers and informs our readers across a spectrum of crucial topics. Whether you're delving into the world of insurance, navigating the complexities of cryptocurrency, or seeking wellness tips in health and fitness, we've got you covered.