Skip to content

tuanx18/genAI_interview_practice_program

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Interview Trainer AI Chatbot

A powerful desktop tool to practice technical interview questions with real-time AI grading and feedback.

Built for Spark, Data Engineering, Data Modeling, System Design, and other technical roles.
You answer → GPT-4o-mini scores you (0–10) + gives detailed feedback + improvement tips + bonus suggestions.


✨ Features

  • Random question engine (no repeats in one session)
  • Category filter – practice only the topics you want
  • Smart "Pick a Question" window with live search bar (type any keyword → real-time filtering, case-insensitive)
  • Clean question display format: 57 — Data Modeling: What is Data Vault modeling? (no more "Q57")
  • Questions sorted numerically by ID
  • Live timer per question + Reset Timer button
  • "Read more" button – opens external link or lets you add one instantly
  • Smart AI feedback with:
    • Colored score (green/orange/red)
    • Bold sections: What You Did Well, How to Improve, Bonus Points Suggestions
    • Scrollable content + separate Reference/Model Answer section
  • Retry This Question (creates a new attempt record)
  • History viewer:
    • All history
    • Only current question history
    • Sort by score, time, or ID
  • Debug mode (prints full prompt + GPT response to console)
  • Professional Question Builder (builder.py) – easy GUI to add/edit questions
  • Loading spinner while waiting for AI
  • History saved permanently in history.jsonl

Screenshots

1. Sample question display

image

2. Display AI-generated result after a submission

image

3. Show record history

image

4. Builder tool (for expanding the bank)

image

Folder Structure

interview_trainer/

├── assets/

│ ├── questions.json ← Your question bank

│ ├── history.jsonl ← All past attempts + scores

│ ├── grading_prompt.txt ← Editable AI prompt template

├── main.py ← Main interview trainer

├── builder.py ← Question editor tool

├── .env ← OpenAI API key

├── run.bat ← Double-click to start

├── requirements.txt

└── README.md


Installation

Enter this to the console to download all required lib: pip install -r requirements.txt


Setup

1. .env file (in root folder) -> put your API key on this file

  • OPENAI_API_KEY=sk-proj-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

2. grading_prompt.txt (must contain these placeholders)

Question from category: <<QUESTION_CATEGORY>> Question: <<QUESTION_TEXT>> User answer: <<ANSWER_TEXT>>

3. questions.json example JSON Question Block

[ { "qid": "1", "category": "Spark Architecture", "question": "What is the High-level Architecture of Spark?", "quick_answer": "Driver + Cluster Manager + Executors...", "short_answer": "Full detailed answer here...", "link": "https://spark.apache.org/docs/latest/" } ]


How to Use

  1. Start the Trainer: Double-click run.bat (or run python main.py)
  2. Add/Edit Questions: run builder.py and enter the question content.
  • Browse to your questions.json
  • Fill fields (Question ID auto-assigns if blank)
  • Click Save / Append
  1. Practice
  • Click New Question
  • Type your answer
  • Click SUBMIT → Get AI Feedback
  • Use Retry This Question or Next Question
  1. View History
  • Display History (All): To display the historical list of all submission, data retrived from history.JSONL file.
  • Display This Question: Similiar to Display History, but this filters only that exact question.

Keyboard Shortcuts

  • Ctrl + Z → Undo in answer box
  • Ctrl + V → Paste

Troubleshooting

  1. No questions appear

→ Check questions.json is a valid array and path is correct.

  1. Feedback window looks broken

→ Resize the window slightly — it auto-adjusts.

  1. API rate limit / cost

→ Using gpt-4o-mini (fast + very cheap).


Author

Built by Hoang Anh Tuan

Hanoi, Vietnam

Feel free to customize the prompt, add more categories, or extend the history viewer.

Happy practicing!

May your next interview be a 10/10 🔥

About

A powerful desktop tool to practice technical interview questions with real-time AI grading and feedback.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors