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.
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.
✅ 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
Candidate Profile
|
|
↓
Text Preprocessing
|
|
↓
Sentence Transformer Embeddings
|
|
↓
Semantic Similarity Search
|
|
↓
Retrieve Relevant Interview Questions
|
|
↓
RAG Prompt Construction
|
|
↓
Llama Instruct Model
|
|
↓
Personalized Interview Questions
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
The system uses a question bank containing interview questions.
The process:
- Interview questions are converted into vector embeddings using a Sentence Transformer model.
- Candidate information is converted into an embedding.
- Cosine similarity is used to find the most relevant questions.
- Retrieved questions are provided as context to the Llama model.
This helps the LLM generate more relevant and domain-specific questions.
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.
| 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 |
AI-Interview-Question-Generator/
│
├── AI_Interview_Question_Generator.ipynb
│
├── question_bank.csv
│
├── requirements.txt
│
└── README.md
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
Clone the repository:
git clone https://github.com/yourusername/AI-Interview-Question-Generator.gitNavigate to the project directory:
cd AI-Interview-Question-GeneratorInstall dependencies:
pip install -r requirements.txtOpen the notebook:
jupyter notebook AI_Interview_Question_Generator.ipynbRun all cells.
The Gradio interface will launch and allow users to generate personalized interview questions.
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
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
A Gradio demo video is included demonstrating:
- Candidate information input
- AI question generation
- Technical and behavioral interview output
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
Aiman WAzir
Machine Learning | Generative AI | RAG Applications
This project is developed for educational and portfolio purposes.