Skip to content

k-Rohit/AI-Interview-copilot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

43 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 AI-Interview-copilot

An intelligent interview preparation tool that generates tailored candidate summaries and technical interview questions using AI. Built with LangChain, OpenAI GPT-4, FastAPI, and Streamlit.

Caution

Please start the backend server by going to the backend URL: https://ai-interview-copilot-backend.onrender.com/
It’s using the free tier, so it spins down after a few minutes of inactivity. Sorry for the inconvenience.


πŸš€ Features

βœ… Smart Resume Analysis

  • Extract and analyze resume content from PDF/TXT files.

βœ… Tailored Candidate Summaries

  • AI-generated summaries highlighting relevant skills, experience, and alignment with job descriptions.

βœ… Technical Interview Questions

  • Generate role-specific technical questions focusing on:
    • Deep technical concepts and implementations.
    • Problem-solving scenarios.
    • System design challenges.
    • Debugging and optimization skills.

βœ… AI Powered Interview and evaluation

  • Conduct a voice interview using AI.
  • Record answers and save transcripts for review.
  • Evaluate the candidate on the basis of the answers he gave in the interview

🌐 Live Demo


πŸ›  Tech Stack

Component Technology
Backend FastAPI + Python 3.12
AI/ML LangChain + OpenAI GPT-4
Frontend Streamlit
PDF Processing PyMuPDF (fitz)
HTTP Client Requests
Environment python-dotenv

⚑ Quick Start (Local Development)

1. Clone the Repository

git clone https://github.com/yourusername/ai-interview-assistant.git
cd ai-interview-assistant

2. Install Dependencies

pip install -r requirements.txt

3. Set Up Environment Variables

Create a .env file in the root directory and add your OpenAI API key:

OPENAI_API_KEY=your_openai_api_key

4. Run the Application

Terminal 1 - Start Backend:

cd backend
python main.py

βœ… Backend will run on http://localhost:8000

Terminal 2 - Start Frontend:

cd frontend
streamlit run app.py

βœ… Frontend will open at http://localhost:8501


πŸ–₯️ Application Workflow

1. Generate Summary

  • Upload a candidate's resume (PDF or TXT).
  • Paste the job description.
  • Click "Generate Summary" to get:
    • A detailed candidate summary.
    • Skills gap analysis.

2. Generate Questions

  • Select the interview type (e.g., Technical, HR/Behavioral, etc.).
  • Click "Generate Questions" to get tailored interview questions.

3. AI-Powered Voice Interview

  • Conduct a voice interview using AI.
  • Record answers and save transcripts for review.

4. Evaluation of results

  • Evaluate the candidate on the basis of the answers he gave in the interview

πŸ“‚ Project Structure

AI-Interview-copilot/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ chains/
β”‚   β”‚   β”œβ”€β”€ question_generator.py  # Generates interview questions
β”‚   β”‚   β”œβ”€β”€ summary_generator.py   # Generates candidate summaries
β”‚   β”‚   └── __init__.py
β”‚   β”œβ”€β”€ models.py                  # Pydantic models for API responses
β”‚   β”œβ”€β”€ main.py                    # FastAPI backend
β”‚   └── __init__.py
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ app.py                     # Streamlit frontend
β”‚   β”œβ”€β”€ config.py                  # Configuration for frontend
β”‚   β”œβ”€β”€ utils.py                   # Utility functions for frontend
β”‚   β”œβ”€β”€ interview_types.txt        # List of interview types
β”‚   β”œβ”€β”€ interview_transcript.txt   # Stores interview transcripts
β”‚   └── __init__.py
β”œβ”€β”€ requirements.txt               # Python dependencies
β”œβ”€β”€ README.md                      # Project documentation
β”œβ”€β”€ .env                           # Environment variables
└── .gitignore                     # Git ignore file

πŸ›  Configuration

Environment Variables for running locally -

Add the following to your .env file:

OPENAI_API_KEY=your_openai_api_key

Configuration File

The frontend/config.py file contains:

API_BASE_URL = "https://ai-interview-copilot-backend.onrender.com/"  # Deployed backend URL
INTERVIEW_TYPES_FILE = "interview_types.txt"  # File for interview types
TRANSCRIPT_FILE = "interview_transcript.txt"  # File for saving transcripts
RESUME_TYPES = ["pdf", "txt"]  # Supported resume file types

πŸ” Troubleshooting

Common Issues

1. OpenAI API Key Error

Error: OPENAI_API_KEY not found or is invalid

Solution: Ensure the api key is valid

2. Connection Error

Cannot connect to backend server

Solution: Ensure the backend URL is correct and the server is running. You may have to start the backend server by going to the backend url as currently its using free servive so it spins down after few minutes of inactivity.

4. Missing Interview Types

Error: Interview type file not found

Solution: Ensure interview_types.txt exists in the frontend directory.



Made with ❀️ for better hiring decisions.

About

Using AI to analyse the JD and Resume of a candidate

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages