DISCLAIMER: The thought of doing Cowl Letter and even Resume with AI doesn’t clearly begin with me. Lots of people have completed this earlier than (very efficiently) and have constructed web sites and even corporations from the thought. That is only a tutorial on tips on how to construct your individual Cowl Letter AI Generator App utilizing Python and some strains of code. All of the code you’ll say on this weblog publish could be present in my public Github folder. Take pleasure in. 🙂
Pep Guardiola is a (very profitable) Manchester Metropolis soccer coach. Throughout Barcelona’s Leo Messi years, he invented a manner of enjoying soccer generally known as “Tiki-Taka”. Which means that as quickly as you obtain the ball, you cross the ball, instantly, with out even controlling it. You possibly can cross the ball 30–40 occasions earlier than scoring a aim.
Greater than a decade later, we are able to see how the way in which of enjoying soccer made Guardiola and his Barcelona well-known is gone. For those who have a look at a Manchester Metropolis match, they take the ball and instantly search for the striker or the winger. You solely want just a few, vertical passes, instantly on the lookout for the chance. It’s extra predictable, however you do it so many occasions that you’ll ultimately discover the area to hit the goal.
I believe that the job market has in some way gone in the identical path.
Earlier than you had the chance to go to the corporate, hand in your resume, discuss to them, be round them, schedule an interview, and actively discuss to folks. You’d spend weeks getting ready for that journey, sharpening your resume, and reviewing questions and solutions.
For a lot of, this old school technique nonetheless works, and I imagine it. When you have a great networking alternative, or the suitable time and place, the handing the resume factor works very properly. We love the human connection, and it is rather efficient to truly know somebody.
You will need to take into account that there’s a entire different method as properly. Firms like LinkedIn, Certainly, and even usually the web fully modified the sport. You possibly can ship so many resumes to so many corporations and discover a job out of statistics. AI is altering this sport a little bit bit additional. There are lots of AI instruments to tailor your resume for the precise firm, make your resume extra spectacular, or construct the job particular cowl letter. There are certainly many corporations that promote this type of providers to folks which might be on the lookout for jobs.
Now, imagine me, I’ve obtained nothing towards these corporations, in any respect, however the AI that they’re utilizing it’s not likely “their AI”. What I imply by that’s that when you use ChatGPT, Gemini, or the tremendous new DeepSeek to do the precise process you’ll very doubtless not get a worse response than the (paid) software that you’re utilizing on their web site. You’re actually paying for the “commodity” of getting a backend API that does what we must do by means of ChatGPT. And that’s truthful.
Nonetheless, I need to present you that it’s certainly quite simple and low cost to make your individual “resume assistant” utilizing Giant Language Fashions. Specifically, I need to give attention to cowl letters. You give me your resume and the job description, and I offer you your cowl letter you may copy and paste to LinkedIn, Certainly, or your e-mail.
In a single picture, it would seem like this:
Now, Giant Language Fashions (LLMs) are particular AI fashions that produce textual content. Extra particularly, they’re HUGE Machine Studying fashions (even the small ones are very large).
Which means that constructing your individual LLM or coaching one from scratch may be very, very costly. We gained’t do something like that. We’ll use a superbly working LLM and we’ll neatly instruct it to carry out our process. Extra particularly, we’ll do this in Python and utilizing some APIs. Formally, it’s a paid API. Nonetheless, since I began the entire mission (with all of the trial and error course of) I spent lower than 30 cents. You’ll doubtless spend 4 or 5 cents on it.
Moreover, we’ll make a working internet app that can let you have your cowl letter in just a few clicks. It will likely be an effort of a pair hundred strains of code (with areas 🙂).
To encourage you, listed here are screenshots of the ultimate app:
Fairly cool proper? It took me lower than 5 hours to construct the entire thing from scratch. Imagine me: it’s that straightforward. On this weblog publish, we’ll describe, so as:
- The LLM API Technique. This half will assist the reader perceive what LLM Brokers we’re utilizing and the way we’re connecting them.
- The LLM Object. That is the implementation of the LLM API technique above utilizing Python.
- The Net App and outcomes. The LLM Object is then transferred into an internet app utilizing Streamlit. I’ll present you tips on how to entry it and a few outcomes.
I’ll attempt to be as particular as attainable so that you’ve all the things it’s essential to make it your self, but when these items will get too technical, be at liberty to skip to half 3 and simply benefit from the sundown 🙃.
Let’s get began!
1. LLM API Technique
That is the Machine Studying System Design a part of this mission, which I saved extraordinarily mild, as a result of I needed to maximise the readability of the entire method (and since it truthfully didn’t must be extra difficult than that).
We’ll use two APIs:
- A Doc Parser LLM API will learn the Resume and extract all of the significant info. This info will probably be put in a .json file in order that, in manufacturing, we could have the resume already processed and saved someplace in our reminiscence.
- A canopy letter LLM API. This API will learn the parsed resume (the output of the earlier API) and the job description and it’ll output the Cowl Letter.
Two details:
- What’s the greatest LLM for this process? For textual content extraction and summarization, LLama or Gemma are identified to be a fairly low cost and environment friendly LLM. As we’re going to use LLama for the summarization process, in an effort to hold consistency, we are able to undertake it for the opposite API as properly. If you wish to use one other mannequin, be at liberty to take action.
- How will we join the APIs? There are a number of how you are able to do that. I made a decision to present it a attempt to Llama API. The documentation just isn’t precisely intensive, but it surely works properly and it lets you play with many fashions. You have to to log in, purchase some credit score ($1 is greater than ample for this process), and save your API key. Be happy to modify to a different answer (like Hugging Face or Langchain) when you really feel prefer it.
Okay, now that we all know what to do, we simply want to truly implement it in Python.
2. LLM Object
The very first thing that we want is the precise LLM prompts. Within the API, the prompts are normally handed utilizing a dictionary. As they are often fairly lengthy, and their construction is at all times related, it is sensible to retailer them in .json recordsdata. We’ll learn the JSON recordsdata and use them as inputs for the API name.
2.1 LLM Prompts
On this .json file, you’ll have the mannequin (you may name no matter mannequin you want) and the content material which is the instruction for the LLM. In fact, the content material key has a static half, which is the “instruction” and a “dynamic” half, which is the precise enter of the API name. For instance: that is the .json file for the primary API, I referred to as it resume_parser_api.json:
As you may see from the “content material” there may be the static name:
“You’re a resume parser. You’ll extract info from this resume and put them in a .json file. The keys of your dictionary will probably be first_name, last_name, location, work_experience, school_experience, expertise. In deciding on the knowledge, hold observe of essentially the most insightful.”
The keys I need to extract out of my “.json” recordsdata are:
[first_name, last_name, location, work_experience, school_experience, skills]
Be happy so as to add something extra info that you simply need to be “extracted” out of your resume, however do not forget that that is stuff that ought to matter solely in your cowl letter. The particular resume will probably be added after this textual content to type the total name/instruction. Extra on that later.
The order instruction is the cover_letter_api.json:
Now the instruction is that this one:
“You’re an knowledgeable in job looking and a canopy letter author. Given a resume json file, the job description, and the date, write a canopy letter for this candidate. Be persuasive {and professional}. Resume JSON: {resume_json} ; Job Description: {job_description}, Date: {date}”
As you may see, there are three placeholders: “Resume_json”, “job_description” and “date”. As earlier than, these placeholders will then get replaced with the proper info to type the total immediate.
2.2 constants.py
I made a really small constants.py file with the trail of the 2 .json immediate recordsdata and the API that you need to generate from LLamaApi (or actually no matter API you might be utilizing). Modify this if you wish to run the file domestically.
2.3 file_loader.py
This file is a set of “loaders” in your resume. Boring stuff however vital.
2.4 cover_letter.py
The entire implementation of the LLM Technique could be discovered on this object that I referred to as CoverLetterAI. There it’s:
I spent fairly a while attempting to make all the things modular and straightforward to learn. I additionally made lots of feedback to all of the features so you may see precisely what does what. How will we use this beast?
So the entire code runs in 5 easy strains. Like this:
from cover_letter import CoverLetterAI
cover_letter_AI = CoverLetterAI()
cover_letter_AI.read_candidate_data('path_to_your_resume_file')
cover_letter_AI.profile_candidate()
cover_letter_AI.add_job_description('Insert job description')
cover_letter_AI.write_cover_letter()
So so as:
- You name the CoverLetterAI object. It will likely be the star of the present
- You give me the trail to your resume. It may be PDF or Phrase and I learn your info and retailer them in a variable.
- You name profile_candidate(), and I run my first LLM. This course of the candidate phrase data and creates the .json file we’ll use for the second LLM
- You give me the job_description and also you add it to the system. Saved.
- You name write_cover_letter() and I run my second LLM that generates, given the job description and the resume .json file, the quilt letter
3. Net App and Outcomes
So that’s actually it. You noticed all of the technical particulars of this weblog publish within the earlier paragraphs.
Simply to be further fancy and present you that it really works, I additionally made it an internet app, the place you may simply add your resume, add your job description and click on generate cowl letter. That is the hyperlink and that is the code.
Now, the cowl letters which might be generated are scary good.
This can be a random one:
February 1, 2025
Hiring Supervisor,
[Company I am intentionally blurring]I’m thrilled to use for the Distinguished AI Engineer place at [Company I am intentionally blurring], the place I can leverage my ardour for constructing accountable and scalable AI techniques to revolutionize the banking trade. As a seasoned machine studying engineer and researcher with a powerful background in physics and engineering, I’m assured that my expertise and expertise align with the necessities of this position.
With a Ph.D. in Aerospace Engineering and Engineering Mechanics from the College of Cincinnati and a Grasp’s diploma in Physics of Complicated Programs and Massive Knowledge from the College of Rome Tor Vergata, I possess a singular mix of theoretical and sensible information. My expertise in creating and deploying AI fashions, designing and implementing machine studying algorithms, and dealing with massive datasets has outfitted me with the talents to drive innovation in AI engineering.
As a Analysis and Educating Assistant on the College of Cincinnati, I utilized surrogate fashions to detect and classify cracks in pipes, attaining a 14% enchancment in harm detection experiments. I additionally developed surrogate fashions utilizing deep studying algorithms to speed up Finite Aspect Strategies (FEM) simulations, leading to a 1M-fold discount in computational time. My expertise in educating and creating programs in sign processing and picture processing for teenagers occupied with AI has honed my capability to speak complicated ideas successfully.
In my earlier roles as a Machine Studying Engineer at Gen 9, Inc., Apex Microdevices, and Accenture, I’ve efficiently designed, developed, and deployed AI-powered options, together with configuring mmWave radar and Jetson units for information assortment, implementing state-of-the-art level cloud algorithms, and main the FastMRI mission to speed up MRI scan occasions. My experience in programming languages equivalent to Python, TensorFlow, PyTorch, and MATLAB, in addition to my expertise with cloud platforms like AWS, Docker, and Kubernetes, has enabled me to develop and deploy scalable AI options.
I’m notably drawn to [Company I am intentionally blurring] dedication to creating accountable and dependable AI techniques that prioritize buyer expertise and ease. My ardour for staying abreast of the most recent AI analysis and my capability to judiciously apply novel strategies in manufacturing align with the corporate’s imaginative and prescient. I’m excited concerning the alternative to work with a cross-functional workforce of engineers, analysis scientists, and product managers to ship AI-powered merchandise that remodel how [Company I am intentionally blurring] serves its clients.
Along with my technical expertise and expertise, I possess wonderful communication and presentation expertise, which have been demonstrated by means of my technical writing expertise at In the direction of Knowledge Science, the place I’ve written complete articles on machine studying and information science, reaching a broad viewers of 50k+ month-to-month viewers.
Thanks for contemplating my software. I’m keen to debate how my expertise and expertise can contribute to the success of the [Company I am intentionally blurring] and [Company I am intentionally blurring]’s mission to carry humanity and ease to banking by means of AI. I’m assured that my ardour for AI, my technical experience, and my capability to work collaboratively will make me a priceless asset to your workforce.
Sincerely,
Piero Paialunga
They appear identical to I might write them for a particular job description. That being mentioned, in 2025, it’s essential to watch out as a result of hiring managers do know that you’re utilizing AI to write down them and the “pc tone” is fairly simple to identify (e.g. phrases like “keen” are very ChatGPT-ish lol). Because of this, I’d wish to say to use these instruments correctly. Certain, you may construct your “template” with them, however make sure you add your private contact, in any other case your cowl letter will probably be precisely like the opposite 1000’s of canopy letters that the opposite candidates are sending in.
That is the code to construct the online app.
4. Conclusions
On this weblog article, we found tips on how to use LLM to transform your resume and job description into a particular cowl letter. These are the factors we touched:
- Using AI in job looking. Within the first chapter we mentioned how job looking is now fully revolutionized by AI.
- Giant Language Fashions concept. You will need to design the LLM APIs correctly. We did that within the second paragraph
- LLM API implementation. We used Python to implement the LLM APIs organically and effectively
- The Net App. We used streamlit to construct a Net App API to show the facility of this method.
- Limits of this method. I believe that AI generated cowl letters are certainly excellent. They’re on level, skilled and properly crafted. Nonetheless, if everybody begins utilizing AI to construct cowl letters, all of them actually look the identical, or no less than all of them have the identical tone, which isn’t nice. One thing to consider.
5. References and different good implementations
I really feel that’s simply truthful to say lots of good folks that have had this concept earlier than me and have made this public and accessible for anybody. That is just a few of them I discovered on-line.
Cowl Letter Craft by Balaji Kesavan is a Streamlit app that implements a really related concept of crafting the quilt letter utilizing AI. What we do completely different from that app is that we extract the resume straight from the phrase or PDF, whereas his app requires copy-pasteing. That being mentioned, I believe the man is extremely gifted and really inventive and I like to recommend giving a glance to his portoflio.
Randy Pettus has a related concept as properly. The distinction between his method and the one proposed on this tutorial is that he’s very particular within the info, asking questions like “present hiring supervisor” and the temperature of the mannequin. It’s very attention-grabbing (and good) you could clearly see the way in which he’s considering of Cowl Letters to information the AI to construct it the way in which he likes them. Extremely beneficial.
Juan Esteban Cepeda does an excellent job in his app as properly. You can even inform that he was engaged on making it greater than a easy streamlit add as a result of he added the hyperlink to his firm and a bunch of opinions by customers. Nice job and nice hustle. 🙂
6. About me!
Thanks once more in your time. It means loads ❤
My title is Piero Paialunga and I’m this man right here:
I’m a Ph.D. candidate on the College of Cincinnati Aerospace Engineering Division and a Machine Studying Engineer for Gen 9. I speak about AI, and Machine Studying in my weblog posts and on Linkedin. For those who preferred the article and need to know extra about machine studying and comply with my research you may:
A. Comply with me on Linkedin, the place I publish all my tales
B. Subscribe to my e-newsletter. It can hold you up to date about new tales and provide the likelihood to textual content me to obtain all of the corrections or doubts you will have.
C. Develop into a referred member, so that you gained’t have any “most variety of tales for the month” and you may learn no matter I (and 1000’s of different Machine Studying and Knowledge Science prime writers) write concerning the latest expertise accessible.
D. Wish to work with me? Verify my charges and initiatives on Upwork!
If you wish to ask me questions or begin a collaboration, go away a message right here or on Linkedin: