Skip to content

About

An AI-powered interview question generator that uses RAG and Large Language Models to create personalized technical and behavioral interview questions based on candidate profiles and job descriptions.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

AI-Interview-Question-Generator

An AI-powered interview question generator that uses RAG and Large Language Models to create personalized technical and behavioral interview questions based on candidate profiles and job descriptions. **NOTE:-## Dataset

The original question bank contains a large collection of interview questions.

Due to GitHub file size limitations, a representative sample is included in this repository.**

An AI-powered interview assistant that automatically generates personalized technical and behavioral interview questions based on a candidate's profile, skills, experience, education, and job requirements.

The system uses Retrieval Augmented Generation (RAG) with semantic search and Llama Large Language Model to generate relevant, non-generic interview questions with expected answer points.


📌 Project Overview

Traditional interview preparation requires recruiters and interviewers to manually create questions, which can be time-consuming and often produces repetitive questions.

This project solves that problem by creating an AI-based interview question generation system that:

  • Understands candidate background
  • Retrieves relevant interview examples
  • Uses an LLM to generate customized questions
  • Provides expected answer points for interview evaluation

The system combines information retrieval with generative AI to create a smarter interview preparation workflow.


🚀 Key Features

✅ Candidate-specific interview question generation
✅ Technical and behavioral question generation
✅ Retrieval Augmented Generation (RAG) pipeline
✅ Semantic similarity-based question retrieval
✅ Llama-powered text generation
✅ Expected answer points generation
✅ Job description-aware questions
✅ Interactive Gradio interface


🏗️ System Architecture

                Candidate Profile
                       |
                       |
                       ↓
              Text Preprocessing
                       |
                       |
                       ↓
        Sentence Transformer Embeddings
                       |
                       |
                       ↓
          Semantic Similarity Search
                       |
                       |
                       ↓
       Retrieve Relevant Interview Questions
                       |
                       |
                       ↓
              RAG Prompt Construction
                       |
                       |
                       ↓
             Llama Instruct Model
                       |
                       |
                       ↓
        Personalized Interview Questions

🧠 How the System Works

1. Candidate Information Processing

The user provides:

  • Job role
  • Technical skills
  • Previous experience
  • Education background
  • Job description

Example:

Role:
Machine Learning Intern

Skills:
Python, TensorFlow, Pandas, NumPy

Experience:
Built image classification models using CNN and U-Net

2. Retrieval Augmented Generation (RAG)

The system uses a question bank containing interview questions.

The process:

  1. Interview questions are converted into vector embeddings using a Sentence Transformer model.
  2. Candidate information is converted into an embedding.
  3. Cosine similarity is used to find the most relevant questions.
  4. Retrieved questions are provided as context to the Llama model.

This helps the LLM generate more relevant and domain-specific questions.


3. Llama-Based Question Generation

The retrieved context and candidate profile are passed to a Llama Instruct model.

The model generates:

  • 5 Technical Interview Questions
  • 5 Behavioral Interview Questions
  • Expected Answer Points
  • Medium Difficulty Questions

The generated questions are designed according to the candidate's skills and target role.


🛠️ Technologies Used

Technology Purpose
Python Core programming language
PyTorch Deep learning framework
Hugging Face Transformers LLM loading and inference
Llama Instruct Model Question generation
Sentence Transformers Text embedding generation
Cosine Similarity Semantic retrieval
Pandas Dataset processing
NumPy Numerical operations
Gradio Interactive AI interface

📂 Project Structure

AI-Interview-Question-Generator/

│
├── AI_Interview_Question_Generator.ipynb
│
├── question_bank.csv
│
├── requirements.txt
│
└── README.md

📊 Dataset

The project uses an interview question dataset containing technical and behavioral interview questions.

The dataset is used for:

  • Generating embeddings
  • Semantic retrieval
  • Providing contextual examples for RAG generation

⚙️ Installation

Clone the repository:

git clone https://github.com/yourusername/AI-Interview-Question-Generator.git

Navigate to the project directory:

cd AI-Interview-Question-Generator

Install dependencies:

pip install -r requirements.txt

▶️ Running the Project

Open the notebook:

jupyter notebook AI_Interview_Question_Generator.ipynb

Run all cells.

The Gradio interface will launch and allow users to generate personalized interview questions.


🎯 Example Output

Technical Question

Question:

Explain the difference between CNN and U-Net architectures and their applications.

Expected Answer Points:

  • Explain CNN feature extraction process
  • Explain U-Net encoder-decoder architecture
  • Describe image segmentation use cases

Difficulty: Medium


Behavioral Question

Question:

Describe a time when you solved a challenging technical problem.

Expected Answer Points:

  • Explain the problem situation
  • Describe the approach taken
  • Explain the final outcome

Difficulty: Medium


🎥 Demo

A Gradio demo video is included demonstrating:

  • Candidate information input
  • AI question generation
  • Technical and behavioral interview output

🔮 Future Improvements

Future versions can include:

  • Resume PDF upload and automatic extraction
  • Candidate answer evaluation
  • AI-based interview scoring
  • Voice-based AI interviewer
  • Multi-language interview generation
  • Cloud deployment

👨‍💻 Author

Aiman WAzir

Machine Learning | Generative AI | RAG Applications


📜 License

This project is developed for educational and portfolio purposes.

About

An AI-powered interview question generator that uses RAG and Large Language Models to create personalized technical and behavioral interview questions based on candidate profiles and job descriptions.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages