Skip to content

An intelligent Interview Question Generation System that automatically creates personalized, unbiased, and structured interview questions based on a candidate’s resume (PDF), a job profile (JSON), and from knowledge base (PDF/TXT).

Notifications You must be signed in to change notification settings

divyeshmutha12/AI-Interview-Question-Generator

Repository files navigation

🤖 AI Interview Question Generator

An intelligent Interview Question Generation System that automatically creates personalized, unbiased, and structured interview questions based on a candidate’s resume (PDF), a job profile (JSON), and an optional knowledge base (PDF/TXT).

This module is part of a larger AI Interviewer System, which also includes an automated evaluation service.


✨ Features

  • 📄 Resume Parsing — Extracts candidate skills, experience, and projects from PDF resumes.
  • 📑 Job Profile Integration — Reads structured JSON job profiles with required skills & responsibilities.
  • 📚 Knowledge Base Support — Ingests text/PDF knowledge bases and stores them in a FAISS vector database for semantic search.
  • 🔍 Automatic Query Generation — Uses an LLM to generate natural queries from resume & job profile context (no manual query typing).
  • 🎯 Unbiased Question Generation — Follows strict rules for fair and evidence-based analysis.
  • 🧩 RAG Pipeline with LangGraph — Retrieves relevant KB chunks and generates high-quality, contextual interview questions.
  • CLI Tool — Easy-to-use command-line interface for KB ingestion and question generation.
  • 📦 Structured JSON Output — Outputs standardized questions for integration with downstream evaluator services.

🏗️ Architecture

Resume (PDF) ─┐
              │
Job Profile ──┼──► Query Generator (LLM) ──► KB Search (FAISS) ──► Question Generator (LLM)
              │
Knowledge Base ┘

Pipeline Flow:

  • Resume (PDF) → Parsed into text (PyMuPDF)
  • Job Profile (JSON) → Role, skills, responsibilities
  • Query Generator → Auto-generates multiple queries from resume + job profile
  • FAISS Vectorstore → Stores KB embeddings for similarity search
  • Retrieval-Augmented Generation (RAG) → Retrieves KB context + feeds into question generation prompt
  • Output → Structured JSON interview questions

⚙️ Installation

1️⃣ Clone the repo

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

2️⃣ Create virtual environment

python -m venv venv
source venv/bin/activate   # (Linux/Mac)
venv\Scripts\activate      # (Windows)

3️⃣ Install dependencies

pip install -r requirements.txt

4️⃣ Configure environment variables

Create a .env file in the root directory:

OPENAI_API_KEY=your_openai_api_key
OPENAI_EMBEDDING_MODEL=text-embedding-3-small

▶️ Usage

Run the CLI

python cli.py

You'll see:

=== Interview Question Generator CLI ===
1. Ingest Knowledge Base (save to FAISS)
2. Generate Questions
3. Exit

Example Flow

1️⃣ Ingest Knowledge Base

Provide KB files (.pdf or .txt) — they'll be stored as a FAISS index in /data/kb_index.

2️⃣ Generate Questions

  • Select Knowledge Base
  • Provide job profile JSON path
  • Provide candidate resume PDF path
  • Choose number of questions

3️⃣ Output

Questions are automatically saved to /data/out_<candidate_name>_<timestamp>.json


📂 Project Structure

.
├── core/
│   └── utils.py          # PDF/KB readers, HTML→Markdown converter
├── models/
│   ├── embeddings.py     # FAISS, OpenAI embeddings
│   ├── llm.py           # LLM integration
│   └── pipeline.py       # LangGraph pipeline
├── config/
│   └── settings.py       # Configuration settings
├── data/
│   ├── candidate_resume.pdf
│   ├── job_profile.json
│   ├── kb_index/         # Saved FAISS indexes
│   └── out_*.json        # Generated questions
├── cli.py                # Command-line interface
├── requirements.txt
├── README.md
└── .env

🧠 Example Output

{
  "candidate_name": "John_Doe",
  "role": "Backend Developer",
  "assessment_summary": {
    "overall_match": "78%",
    "key_strengths": ["Python", "Django", "API Development"],
    "areas_to_probe": ["Kubernetes", "Cloud Deployment"],
    "total_questions": 10
  },
  "questions_by_topic": [
    {
      "topic_name": "Python Development",
      "priority": "Critical",
      "questions": [
        {
          "id": "1.1",
          "buildup": "You've worked with Python for 6 years...",
          "question": "Tell me about your Python production experience",
          "difficulty": "Beginner"
        }
      ]
    }
  ]
}

🔮 Roadmap

  • Add support for multi-language resumes (OCR + Translation)
  • Integrate Evaluator Module for automated scoring
  • Deploy as a REST API (FastAPI)
  • Add Docker support for seamless deployment
  • Support for custom embedding models

🤝 Contributing

Contributions are welcome!

  1. Fork the repository
  2. Create a new branch
    git checkout -b feature-xyz
  3. Commit your changes
    git commit -m "Add xyz feature"
  4. Push to your branch
    git push origin feature-xyz
  5. Open a Pull Request 🚀

📜 License

This project is licensed under the MIT License — feel free to use and modify.


🔥 This module brings AI-powered interview preparation one step closer to real-world hiring automation.


About

An intelligent Interview Question Generation System that automatically creates personalized, unbiased, and structured interview questions based on a candidate’s resume (PDF), a job profile (JSON), and from knowledge base (PDF/TXT).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages