ApplyPal 🧠- How to Build Your Own Career Advisor AI Agent!
Table of Contents
In today’s competitive job market, crafting the perfect job application can be a daunting task. To make the process easier, I built a Career Advisor AI Agent—a personalized assistant that evaluates your resume for a specific job description and helps you tailor your application. By leveraging the power of GPT-4 and LangChain, this tool provides a score and highlights positive and negative points of your resume across four key criteria—Technical Skills, Experience, Education, and Soft Skills—along with a global score. But that’s not all! The agent also features an interactive chat interface where you can ask questions, like requesting a customized motivation letter tailored to the job description, and get actionable advice using direct references from your resume.
This blog walks you through how I built this project, including the tools and techniques used, with code snippets and insights along the way. Before diving in, check out this quick demo video showcasing the project in action!
Introduction #
Agentic AI #
Agentic AI refers to AI systems that act as intelligent agents, capable of autonomously performing tasks and making decisions on behalf of users. These systems are typically designed to assist in a specific domain by interpreting and responding to input from users, offering personalized solutions, and improving over time through interaction.
The growing popularity of Agentic AI can be attributed to several factors:
- Automation of Repetitive Tasks: AI agents can handle tasks that would otherwise be time-consuming for individuals, such as scheduling, answering emails, or generating tailored content. This level of automation frees up users to focus on more complex and creative work.
- Advances in Natural Language Processing (NLP): With the rise of sophisticated NLP models, such as OpenAI’s GPT series, Agentic AI systems can engage in meaningful conversations, interpret instructions, and offer detailed responses, making them much more interactive and efficient than earlier AI systems.
- Personalization: By processing large amounts of data and learning from user interactions, these AI systems can offer highly personalized advice and solutions. For example, in the case of career development, an AI agent can evaluate resumes against specific job descriptions and provide tailored recommendations.
- Integration with Existing Platforms: Agentic AI can be integrated into widely used platforms like Slack, Zoom, or in this case, job boards and recruitment systems. These integrations make it easy for users to adopt AI in their daily routines without needing to switch to new tools.
Some common tasks automated by Agentic AI include:
- Content Generation: Writing articles, social media posts, or reports.
- Customer Support: Chatbots that handle inquiries, provide recommendations, and solve problems in real-time.
- Data Analysis: Automating the process of cleaning, analyzing, and visualizing data.
- Personalized Recommendations: Tailoring advice, such as for job applications, product suggestions, or learning paths.
Used Technologies #
The Career Advisor AI Agent relies on a combination of powerful tools and technologies to deliver seamless functionality and an intuitive user experience. Below is a quick overview of the key components that power this AI-driven tool:
-
LangChain: LangChain is a framework designed for developing applications powered by language models (such as GPT-4). It simplifies the process of integrating large language models (LLMs) with other tools and data sources, allowing you to build more sophisticated AI-driven applications. In this project, LangChain is used to orchestrate the interactions between the resume, job description, and the evaluation logic, helping to create a coherent and context-aware AI agent. LangChain’s ability to interface with multiple data sources and APIs makes it a key tool for handling complex workflows and decision-making processes.
-
OpenAI API (GPT-4): The OpenAI API provides access to some of the most powerful language models available today, including GPT-4. In the Career Advisor AI Agent, GPT-4 is used to process both the resume and job description, evaluating them based on criteria like technical skills, experience, education, and soft skills. Additionally, GPT-4 powers the chat interface, allowing users to interact with the AI agent for personalized advice, feedback, and even generating motivation letters. Its advanced natural language understanding makes it ideal for the complex tasks of matching resumes to job descriptions and responding to user queries in a meaningful way.
-
Streamlit: Streamlit is a Python framework for building interactive web applications with minimal effort. It allows developers to create user-friendly interfaces that can be easily deployed and shared. Streamlit has been widely adopted by developers, particularly for quick demos and proof-of-concept (POC) projects, due to its simplicity and fast integration capabilities. In the context of Generative AI (GenAI), Streamlit provides an efficient way to showcase AI models and their capabilities in an intuitive and interactive manner. In this project, Streamlit serves as the front-end for the Career Advisor AI Agent, facilitating features like resume uploads, job description input, displaying evaluation results, and enabling the chat interface. Its ease of use and flexibility make it an ideal choice for rapidly developing AI applications and engaging users in a seamless experience.
Key Features #
Resume Upload and Parsing #
ApplyPal allows users to easily upload their resumes in PDF format using Streamlit’s file uploader component. Once the resume is uploaded, PyPDFLoader
from langchain_community.document_loader
is used to extract the text from the PDF. This tool efficiently converts the resume’s content into a structured format, making it ready for processing by the AI. By combining Streamlit’s simple file upload interface with PyPDFLoader
’s powerful text extraction capabilities, the process is seamless, allowing the AI to analyze the resume and generate a comprehensive evaluation based on its content.
Job Description Input #
ApplyPal simplifies the process of providing job descriptions by using a straightforward text input field. Users can copy and paste job descriptions from any platform, such as LinkedIn, Welcome to The Jungle, or company websites, directly into the input field. The structure of the text does not matter—whether it’s a neatly formatted job posting or an unstructured snippet, the AI will effectively process it. This flexibility ensures that users can easily provide the required job description without worrying about formatting or compatibility issues, making the process intuitive and user-friendly.
Evaluation Metrics #
To evaluate the candidate’s resume against the job description, our AI Agent uses carefully crafted prompt engineering powered by LangChain. By defining specific criteria, the AI assesses the resume on multiple aspects, including Technical Skills, Experience, Education, Soft Skills, and a calculated Global Score. This approach ensures a comprehensive evaluation tailored to the job description.
The evaluation process is designed to provide structured and actionable insights by leveraging a predefined output schema. Below is an example of how the evaluation is configured using LangChain:
skills_schema = ResponseSchema(
name="skills",
description="Evaluate how well the candidate's skills align with the job requirements. "
"Output a relevance score between 0 and 10. Provide the matched skills in a Python list "
"under 'positive' and the missing skills in a Python list under 'negative'."
)
experience_schema = ResponseSchema(
name="experience",
description="Evaluate the relevance of the candidate's professional experience to the job requirements. "
"Output a relevance score between 0 and 10. Provide a description of relevant experience "
"under 'positive' and a description of missing or inadequate experience under 'negative'."
)
education_schema = ResponseSchema(
name="education",
description="Evaluate how well the candidate's educational background matches the job requirements. "
"Output a relevance score between 0 and 10. Provide a description of matching qualifications "
"under 'positive' and missing qualifications under 'negative'."
)
soft_skills_schema = ResponseSchema(
name="soft_skills",
description="Evaluate any additional relevant aspects, such as certifications, languages, or cultural fit. "
"Output a relevance score between 0 and 10. Provide a description of relevant attributes "
"under 'positive' and any missing or insufficient aspects under 'negative'."
)
global_score_schema = ResponseSchema(
name="global_score",
description="Calculate a weighted global score between 0 and 10 by applying the following weights: "
"Skills (40%), Experience (30%), Education (20%), Soft Skills (10%)."
)
title_schema = ResponseSchema(
name="title",
description="The job title and company name. Format: 'job_title at company'."
)
response_schemas = [skills_schema,
experience_schema,
education_schema,
soft_skills_schema,
global_score_schema,
title_schema,
]
output_parser = StructuredOutputParser.from_response_schemas(response_schemas)
format_instructions = output_parser.get_format_instructions()
By including these schemas in the prompt, the AI is guided to return a JSON (or Python dictionary) containing the evaluation results in a structured format. Here’s how the final prompt is constructed to ensure consistent and reliable output:
template=(
"""Evaluate the relevance of the following resume to the job description
and provide detailed feedback\n
Resume: {resume}\n\n
Job Description: {job_description}\n\n
{format_instructions}\nreturn the json only without additional paragraphs"""
)
prompt = ChatPromptTemplate.from_template(template=template)
By using this structured prompt, the AI generates output in a predefined format every time. This makes it easy to extract the information programmatically and present it to the user in a concise, clear, and visually appealing manner. Each evaluation criterion is scored on a scale of 0 to 10, with details about matched and missing elements provided for better clarity and actionable feedback.
Chat Interface #
The Career Advisor AI includes an intuitive chat interface powered by GPT-4. This interface allows users to interact directly with the AI agent to ask tailored questions about the job application process. For instance, users can request a custom motivation letter, clarify specific job requirements, or seek personalized career advice based on their resume and the job description.
To maintain context and consistency, the chat interface leverages Streamlit’s session_state
for memory management. This ensures that the user’s previous queries and the AI’s responses are stored and can be accessed throughout the session without loss of information.
At the core of the chat functionality lies an initial system prompt that defines the AI’s behavior. Below is the system prompt used to initialize the chat:
{
"role": "system",
"content": f"""
You are a career advisor for a candidate with the resume delimited by <<<>>> and the job description delimited by ((( ))).
Resume:
<<<
{resume}
>>>
Job description:
(((
{job_description}
)))
Answer the questions giving the given information only. If the candidate asks a question that you don't have an answer to, say that you don't know the answer.
"""
}
This system prompt ensures that:
- Contextual Relevance: The AI only uses the provided resume and job description to answer questions, keeping its responses accurate and specific.
- Honesty: If the AI cannot infer an answer from the available information, it explicitly states, “I don’t know the answer.”
- Professional Guidance: The AI consistently behaves like a career advisor, providing helpful, job-specific recommendations.
By combining the power of GPT-4 with a well-structured prompt and Streamlit’s session management, the chat interface offers a seamless and highly interactive user experience. Users can pick up conversations exactly where they left off, making the Career Advisor AI both practical and user-friendly.
History #
One of the important features of ApplyPal that were added at the very end is its History Functionality, which ensures a seamless and personalized user experience. This feature automatically saves all relevant data from the user’s interactions, including:
- Job Descriptions: Each job description provided is saved alongside its evaluation.
- Resume Evaluations: The scores and detailed feedback across the evaluation metrics (Technical Skills, Experience, Education, Soft Skills, and Global Score) are stored for future reference.
- Chat History: Every interaction in the chat interface is logged, allowing users to resume their conversation with the AI exactly where they left off.
This feature is built using Streamlit’s session_state
to handle temporary data storage during a session. It is currently basic and stored temporarily while ApplyPal is running; For persistent storage across sessions, a simple database or file-based approach can be employed. Each session can be tied to a unique identifier (e.g., the job title and date), ensuring that users can easily retrieve specific evaluations and conversations.
Benefits for Users:
- Convenience: Users can revisit previous evaluations without needing to re-upload their resume or job description.
- Continuity: Conversations with the AI remain intact, making it easier to pick up discussions without starting over.
- Personalization: By having a history of their interactions, users can compare evaluations for different jobs and refine their applications accordingly.
Future and Potential Improvements #
While the current version of the Career Advisor AI offers robust features, there’s always room for innovation and expansion. In addition to the database that saves user histories for later access, several exciting ideas and enhancements could take this project to the next level:
Integrate additional LLM models #
Expanding the project to include open-source, free models that run locally (e.g., Llama or Mistral) would reduce dependency on APIs and lower costs for users. This would also make the tool more accessible to those who prefer self-hosted solutions.
Add the Ability to Provide a Job URL #
Instead of manually inputting or pasting the job description, users could simply provide a URL to the job posting. A scraper could then extract relevant information directly from platforms like LinkedIn or Welcome to The Jungle, making the process even faster and more seamless.
Job Opportunity Scraper #
A more advanced feature could involve integrating a scraper that searches job platforms based on the user’s resume. By analyzing the resume, the AI could recommend opportunities that align with the user’s skills, experience, and preferences, directly pulling relevant jobs from platforms like LinkedIn, Welcome to The Jungle, or other job boards.
Challenges and Learnings #
Every project comes with its own set of challenges, and building the Career Advisor AI was no exception. Here are some of the key obstacles I faced and the lessons I learned along the way:
Output Format for the Evaluation AI Agent #
One of the biggest challenges was ensuring that the LLM adhered strictly to a single output format. Since the data had to be parsed and visualized, consistency in the response format was critical. This was tackled by leveraging LangChain’s structured output tools and extensive prompt engineering. Although achieving this level of precision required multiple iterations and adjustments, the final solution ensures that the AI always returns a well-structured JSON or Python dictionary, which can be easily processed and displayed.
Rethinking the Need for Retrieval-Augmented Generation (RAG) #
Initially, I approached the project as a potential use case for RAG (Retrieval-Augmented Generation). However, I quickly realized that the referenced data sources—namely, the resume and the job description—are concise enough to fit comfortably within GPT-4’s context window. Introducing a RAG mechanism, which involves splitting texts, creating embeddings, and retrieving specific parts, would have added unnecessary complexity without any significant benefits. Instead, I opted for a simpler approach that directly passes the relevant data to GPT-4, resulting in a more efficient and streamlined process.
Designing the Frontend for Optimal UI/UX #
Creating a user-friendly and intuitive interface was another critical aspect of the project. I relied heavily on feedback and tips from my network to refine the design. A special thanks goes to Youcef Salemi, a UI/UX expert, who provided invaluable insights into improving the user experience, and Haithem Herbadji, a talented software engineer, who shared practical advice on interface design. Their guidance ensured that the platform is not only functional but also visually appealing and easy to navigate.
Conclusion #
ApplyPal 🧠marks a significant achievement in my journey of deepening my experience with Generative AI and exploring the vast potential of Agentic AI. This project is more than just a tool; it’s a demonstration of how AI can be harnessed to simplify and enhance complex processes like job applications. By combining technologies like LangChain
, OpenAI’s GPT-4
, and Streamlit
, I was able to create a functional, intuitive platform that empowers job seekers with actionable insights and personalized guidance.
This project also reaffirmed the transformative potential of Agentic AI—AI agents capable of automating tasks, delivering intelligent feedback, and facilitating seamless human interaction. The possibilities are immense, and I’m excited to continue pushing the boundaries of what’s possible with these technologies.