Back to Hub Directory

AI-Assisted Resume Screening & Candidate Ranking

By Weavecode Team
Published 2026-07-14
2 min read
AI-Assisted Resume Screening & Candidate Ranking

AI-Assisted Resume Screening & Candidate Ranking

Reviewing job applications is one of the most time-consuming workflows in corporate HR. For a single open position, hiring teams often receive hundreds of resume submissions. Manually screening each candidate for matching qualifications, experience level, and certifications takes days.

By leveraging Weavecode API and structured schemas, HR teams can build automated parsing pipelines that extract candidate profiles and rank them against job descriptions in seconds.


1. Automated Recruitment Pipeline Architecture

To avoid bias and ensure high accuracy, the system extracts resume text using a standard layout parser, maps variables to a strict candidate profile schema, and scores the profile against a specific rubric.

  Resumes (PDF/Docx) ──► [ Layout Extraction ] ──► Structured Profile


  Ranked Dashboard   ◄── [ Scoring Rubric ] ◄── Weavecode API

2. Python Implementation Guide

Step 2.1: Define the Candidate Schema

from pydantic import BaseModel, Field
from typing import List, Optional
 
class CandidateProfile(BaseModel):
    name: str
    email: Optional[str]
    phone: Optional[str]
    years_of_experience: float
    skills: List[str]
    education_level: str = Field(description="e.g. Bachelors, Masters, PhD")
    certifications: List[str]
    current_role: Optional[str]
 
class CandidateRanking(BaseModel):
    fit_score: int = Field(description="Rubric score from 0 (poor fit) to 100 (perfect match)")
    reasoning: str = Field(description="Clear logic for the assigned fit score")
    key_advantages: List[str]
    missing_requirements: List[str]

Step 2.2: Extract & Score Candidate

import os
from openai import OpenAI
 
client = OpenAI(base_url="https://api.weavecode.ai/v1", api_key=os.getenv("WEAVECODE_KEY"))
 
def rank_candidate(resume_text: str, job_description: str) -> CandidateRanking:
    prompt = f"""
    Compare the candidate's resume details against this Job Description.
    
    Job Description:
    {job_description}
    
    Candidate Resume:
    {resume_text}
    """
    
    response = client.beta.chat.completions.parse(
        model="google/gemini-1.5-pro",
        messages=[
            {"role": "system", "content": "You are a professional HR recruiter scoring candidates objectively based on qualifications."},
            {"role": "user", "content": prompt}
        ],
        response_format=CandidateRanking
    )
    return response.choices[0].message.parsed

3. Key Benefits

  • Zero Bias: Candidates are evaluated strictly based on matching skills, certifications, and experience levels defined in the rubric.
  • Speed to Interview: Hiring managers can review an objectively ranked dashboard within minutes of posting a role, accelerating candidate contact times.

Related Articles