Skip to content

gopalkrishna2004/AI-Interview-Agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

9 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

AI Interview Agent ๐Ÿค–

Python Streamlit LangChain Google Gemini

An intelligent AI-powered interview system that analyzes candidate resumes against job descriptions and conducts personalized, interactive interviews using Google's Gemini AI and LangGraph workflow orchestration.

๐Ÿš€ Features

๐Ÿ“Š Intelligent Analysis

  • Resume-JD Compatibility Analysis: Evaluates alignment between candidate background and job requirements
  • Skills Gap Identification: Identifies missing skills and extra strengths
  • Experience Matching: Analyzes relevant experience and domain expertise
  • PDF Processing: Automatically extracts text from resume and job description PDFs

๐ŸŽฏ Dynamic Question Generation

  • Technical Questions: Based on candidate's technical background and job requirements
  • Behavioral Questions: STAR method-based questions focusing on soft skills and leadership
  • Situational Questions: Scenario-based problem-solving challenges
  • Context-Aware: Questions tailored to candidate's specific experience and role

๐Ÿ’ฌ Interactive Interview Experience

  • Conversational Interface: Natural, AI-driven interview conversations
  • Follow-up Questions: Dynamic questioning based on candidate responses
  • Real-time Evaluation: Continuous assessment during the interview
  • Multi-modal Interface: Both web-based (Streamlit) and command-line options

๐Ÿ“ˆ Comprehensive Evaluation

  • Response Analysis: AI-powered evaluation of candidate answers
  • Depth Assessment: Measures the depth and quality of responses
  • Interview Summary: Detailed evaluation report with recommendations
  • JSON Export: Structured data export for further analysis

๐Ÿ—๏ธ Architecture

Workflow Structure

๐Ÿ“ AI-Interview-Agent/
โ”œโ”€โ”€ ๐ŸŽฏ main.py                      # Command-line entry point
โ”œโ”€โ”€ ๐ŸŒ streamlit_app.py             # Web interface 
โ”œโ”€โ”€ ๐Ÿƒ run_streamlit.py             # Streamlit launcher script
โ”œโ”€โ”€ ๐Ÿง  llm.py                       # Google Gemini AI integration
โ”œโ”€โ”€ ๐Ÿ”„ graph.py                     # LangGraph workflow orchestration
โ”œโ”€โ”€ ๐Ÿ“‹ requirements.txt             # Python dependencies
โ”œโ”€โ”€ ๐Ÿ“ tools/                       # Core processing modules
โ”‚   โ”œโ”€โ”€ ๐Ÿ” analyzer.py              # Resume-JD compatibility analysis
โ”‚   โ”œโ”€โ”€ ๐Ÿ“Š context_splitter.py      # Context categorization engine
โ”‚   โ”œโ”€โ”€ โ“ question_generator.py    # Interview question generation
โ”‚   โ””โ”€โ”€ ๐Ÿ’ฌ interview_conversational_agent.py # Interactive interview conductor
โ”œโ”€โ”€ ๐Ÿ“ resources/                   # Sample documents
โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ cv-ml.pdf               # Sample resume
โ”‚   โ””โ”€โ”€ ๐Ÿ“„ JD-ml.pdf               # Sample job description
โ””โ”€โ”€ ๐Ÿ“– README.md                    # This documentation

Processing Pipeline

graph TD
    A[๐Ÿ“„ PDF Resume] --> B[๐Ÿ“‹ To Markdown ]
    C[๐Ÿ“„ PDF Job Description] --> B
    B --> D[๐Ÿ” Resume-JD Analysis]
    D --> E[๐Ÿ“Š Context Splitting]
    E --> F[โ“ Question Generation]
    F --> G[๐Ÿ’ฌ Interactive Interview]
    G --> H[๐Ÿ“ˆ Response Evaluation]
    H --> I[๐Ÿ“Š Final Assessment]
Loading

โš™๏ธ Installation

Prerequisites

  • Python
  • Google API key for Gemini AI

Setup Steps

  1. Clone the repository

    git clone https://github.com/gopalkrishna2004/AI-Interview-Agent.git
    cd AI-Interview-Agent
  2. Install dependencies

    pip install -r requirements.txt
  3. Configure API Key

    Edit llm.py and replace the placeholder:

    os.environ["GOOGLE_API_KEY"] = "your-actual-api-key-here"

    Or set as environment variable:

    export GOOGLE_API_KEY="your-actual-api-key-here"
  4. Verify installation

    python run_streamlit.py

๐ŸŽฎ Usage

Option 1: Web Interface (Recommended)

Launch the Streamlit web application:

python run_streamlit.py

Then open your browser to http://localhost:8501

Features:

  • ๐Ÿ“ค File Upload: Upload resume and job description PDFs
  • ๐ŸŽจ Modern UI: Clean, professional interface
  • ๐Ÿ“Š Visual Results: Interactive display of analysis and questions
  • ๐Ÿ’ฌ Live Chat: Real-time interview conversation
  • ๐Ÿ“ฑ Responsive Design: Works on desktop and mobile

Option 2: Command Line

For programmatic usage or testing:

python main.py

Note: Update the file paths in main.py:

resume_pdf_path = "path/to/your/resume.pdf"
jd_pdf_path = "path/to/your/job_description.pdf"

๐Ÿ”ง Core Components

1. LLM Integration (llm.py)

  • Google Gemini 2.5 Flash: High-performance AI model integration
  • Standardized Interface: Consistent AI interaction across all modules
  • Error Handling: Robust API communication

2. Workflow Orchestration (graph.py)

  • LangGraph Framework: State-based workflow management
  • Two-Phase Processing:
    • Phase 1: Analysis โ†’ Context Split โ†’ Question Generation
    • Phase 2: Interactive Interview โ†’ Evaluation
  • State Management: Comprehensive data flow between components

3. Resume-JD Analyzer (tools/analyzer.py)

# Key Analysis Areas:
โœ… Matching Skills        # Skills alignment assessment
๐Ÿ“ˆ Experience Alignment   # Background compatibility  
๐Ÿ”ฌ Research Fit          # Domain expertise evaluation
โš ๏ธ Skill Gaps           # Missing requirements identification
โญ Extra Strengths       # Additional candidate value

4. Context Splitter (tools/context_splitter.py)

Categorizes candidate background into three contexts:

  • ๐Ÿ”ง Technical Context: Skills, projects, technical experience
  • ๐Ÿ‘ฅ Behavioral Context: Leadership, teamwork, communication
  • ๐ŸŽฏ Situational Context: Problem-solving, challenges, decision-making

5. Question Generator (tools/question_generator.py)

  • Technical Questions: Role-specific technical assessments
  • Behavioral Questions: STAR method-based soft skill evaluation
  • Situational Questions: Scenario-based problem-solving
  • Customizable Difficulty: Adjustable complexity levels

6. Interview Agent (tools/interview_conversational_agent.py)

  • Natural Conversation Flow: Human-like interview interactions
  • Dynamic Follow-ups: Context-aware follow-up questions
  • Real-time Evaluation: Continuous candidate assessment
  • Conversation Memory: Maintains context throughout interview

๐Ÿ“Š Output & Results

Analysis Report

{
  "compatibility_score": 85,
  "matching_skills": ["Python", "Machine Learning", "Docker"],
  "missing_skills": ["Kubernetes", "AWS"],
  "experience_alignment": "Strong background in ML engineering",
  "recommendation": "Highly suitable candidate"
}

Generated Questions

  • Technical: "Explain your experience with distributed systems and how you've handled scalability challenges."
  • Behavioral: "Tell me about a time when you had to lead a cross-functional team through a difficult project."
  • Situational: "If you discovered a critical bug in production right before a major release, how would you handle it?"

Interview Evaluation

{
  "overall_score": 4.2,
  "technical_competency": 4.5,
  "communication_skills": 4.0,
  "problem_solving": 4.3,
  "cultural_fit": 4.1,
  "recommendations": ["Strong technical skills", "Good communication"]
}

๐Ÿ› ๏ธ Configuration

Customizing Question Difficulty

Edit tools/question_generator.py:

difficulty_level = "advanced"  # Options: basic, intermediate, advanced

Adjusting Interview Flow

Modify tools/interview_conversational_agent.py:

question_type_order = ["technical", "behavioral", "situational"]
max_follow_ups = 2
conversation_depth = 3

API Configuration

Update model settings in llm.py:

model_name = "gemini-2.5-flash"  # or "gemini-pro"
temperature = 0.7
max_tokens = 1000

๐Ÿ“ Dependencies

Core Frameworks

  • streamlit - Web interface framework
  • langchain - AI application framework
  • langchain-google-genai - Google Gemini integration
  • langgraph - Workflow orchestration
  • langgraph-checkpoint - State management
  • langgraph-prebuilt - Pre-built components

PDF Processing

  • PyMuPDF - PDF text extraction
  • pymupdf4llm - LLM-optimized PDF processing

Utilities

  • tempfile2 - Temporary file handling
  • typing - Type hints and annotations

๐Ÿš€ Getting Started Example

  1. Prepare your documents: Have a resume PDF and job description PDF ready
  2. Start the application: python run_streamlit.py
  3. Upload files: Use the web interface to upload your documents
  4. Review analysis: Check the compatibility assessment
  5. Start interview: Begin the interactive interview session
  6. Get evaluation: Receive comprehensive feedback and recommendations

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature-name
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

About

AI-Interview-Agent

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages