DEV Community

Cover image for πŸš€ Building an AI Resume Screener with GPT-4 + LangChain + FAISS
Brahmini K
Brahmini K

Posted on

πŸš€ Building an AI Resume Screener with GPT-4 + LangChain + FAISS

Hi everyone πŸ‘‹ β€” I recently built and deployed a full-stack AI Resume Screener that ranks, scores, and evaluates resumes using GPT-4, LangChain, and FAISS. Here’s a technical breakdown of how it works!

🧠 What It Does

  • Upload .pdf, .docx, or .txt resumes
  • Paste a job description
  • GPT-4 scores and summarizes best-fit candidates
  • Shows results in a Streamlit UI with star ratings
  • Exports final shortlist as CSV

βš™οΈ Tech Stack

  • 🧠 GPT-4 (OpenAI) β€” scoring, summarization
  • 🧱 LangChain β€” for chunking & vector search
  • 🧲 FAISS β€” similarity search
  • πŸ“„ Unstructured β€” DOCX/PDF parsing
  • πŸ§‘β€πŸ’Ό Streamlit β€” interactive UI
  • 🐍 Python, Pandas, dotenv

πŸ“‚ Directory Structure


πŸ“Œ Key Component 1: Resume Indexing

from langchain_unstructured import UnstructuredLoader
from langchain_community.vectorstores import FAISS
def embed_resumes_from_folder(folder_path):
    docs = []
    for file in os.listdir(folder_path):
        path = os.path.join(folder_path, file)
        resume = UnstructuredLoader(path).load()
        docs.extend(resume)
    vectordb = FAISS.from_documents(docs, embedding_model)
    vectordb.save_local("vectorstore_ui")
Enter fullscreen mode Exit fullscreen mode


πŸ“Œ Key Component 2: Similarity Search

def search_similar_resumes(job_desc, db_path, k=5):
    vectordb = FAISS.load_local(db_path, embedding_model)
    return vectordb.similarity_search(job_desc, k=k)
Enter fullscreen mode Exit fullscreen mode

πŸ“Œ Key Component 3: GPT-4 Evaluation

def evaluate_resume(resume_text, job_description):
    prompt = f"""Evaluate the following resume...
    Resume: {resume_text}
    Job: {job_description}

    Return:
    Score: X/10
    Summary: ...
    Fit: Strong/Moderate/Low"""

    return openai.ChatCompletion.create(...)  # GPT-4 call
Enter fullscreen mode Exit fullscreen mode

πŸ’‘ Why I Built This


I'm currently job hunting and wanted a smarter way to check how well my resume matches each job. So I built this for myself β€” and now use it before every application.
It saves me time, gives me confidence, and acts like my personal AI career coach.
πŸ§ͺ Try It Yourself
πŸ”— GitHub Repository
πŸš€ Live App (Streamlit Cloud)

πŸ“₯ Contributions Welcome
Ideas to improve:

  • Add email notifications for top candidates
  • Use GPT function calling for structured scoring
  • Add recruiter login + notes feature

Originally published on Medium. Cross-posted to reach more developers!

Top comments (0)