End-to-End Pipeline Overview
ScreenAI automates candidate resume screening by matching CV content directly with a job description.
Unlike simple keyword search, it parses the resume semantics, isolates matching qualifications, and provides a clear, grounded matching score and summary.
Core Execution Lifecycle
- Upload: Recruiter uploads candidate PDF resumes and inputs a Job Description (JD).
- RAG Indexing: The backend extracts text from each PDF, chunks it, and indexes it into a temporary, isolated FAISS vector database.
- Stateful Retrieval: The JD serves as a search query to retrieve the most relevant sections of the candidate's resume (RAG).
- Agent Evaluation: LangGraph orchestrates a multi-step node workflow. Node 1 (Retrieve) retrieves sections. Node 2 (Score & Summarize) prompts the LLM to structure a match evaluation.
- Visual Report: Results are returned in real-time to the dashboard with structured lists of matching skills, missing gaps, and the detailed LangGraph path.
Retrieval-Augmented Generation (RAG)
To prevent LLMs from hallucinating skills or ignoring long sections, ScreenAI uses a per-candidate isolated RAG index.
Chunking & Parsing
PyPDF extracts raw text page-by-page. LangChain's RecursiveCharacterTextSplitter splits it into overlapping blocks (default: 500 chars with 50 overlap). This ensures semantic context is preserved across splits.
Local Vector Indexing
Text chunks are embedded locally using SentenceTransformers (all-MiniLM-L6-v2) into 384-dimensional dense vectors and loaded into an in-memory FAISS index. Indexing is performed per-candidate to guarantee privacy.
Semantic Querying
The Job Description is embedded using the same model. We query FAISS to find the top-K chunks (default: 5) with the highest cosine similarity. Only these segments are passed to the LLM, reducing tokens and keeping evaluation grounded.
Stateful Agentic Orchestration
ScreenAI leverages LangGraph to structure the evaluation pipeline as a stateful graph. This allows step-by-step logging, error recovery, and modular execution.
LangGraph Node Execution
🟢 START → Triggers the state entry.
📥 Node 1: Retrieve → Invokes the candidate's FAISS retriever with the job description query, saves the top-K chunks to the state, and records step execution logs.
🧠 Node 2: Score & Summarize → Formulates a structured system prompt, passes the retrieved chunks and JD context to Gemini/OpenAI, requests a validated JSON response, and updates the candidate's match score and summary state.
🏁 END → Workflow terminates and saves details to results list.
Structured State Schema
CandidateState = TypedDict('CandidateState', {
job_description: str, candidate_name: str,
retriever: FAISS, top_k: int,
retrieved_chunks: List[str], match_score: int,
matching_skills: List[str], missing_skills: List[str],
summary: str, logs: List[str], error: Optional[str]
})
Technologies & Tools Used
The application is built using a modern, fast, and lightweight web stack.
FastAPI & Uvicorn
High-performance, asynchronous Python web framework for handling API endpoints and serving static files.
LangGraph & LangChain
Stateful, agentic orchestration framework and integrations for LLM prompts, embeddings, and message chains.
FAISS (CPU)
Facebook AI Similarity Search library for fast vector indexing and querying in memory.
PyPDF
Pure Python PDF parser to extract raw textual pages from candidate resume documents.
Gemini 1.5 Flash (Default LLM)
Google's low-latency, highly capable Gemini LLM for structured scoring and resume summaries.
SentenceTransformers (Default Embeddings)
HuggingFace local model (all-MiniLM-L6-v2) for generating vector embeddings offline without cost.