DEV Community

Vikram Rautela
Vikram Rautela

Posted on

Interview Buddy: An Offline AI Mock-Interview Partner I Built for My Friend

Hacktoberfest Weekend Challenge: Build for a Friend Submission 🤝

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend

What I Built

My friend Jagdish is preparing for Python developer interviews. They know the material, but they freeze when they have to say answers out loud, and there's nobody around to practise with at 11 PM.

So I built Interview Buddy: a small terminal app that acts like a patient interviewer.

  1. You tell it the role and your level (fresher / junior / senior).
  2. It asks one question at a time, a mix of technical, problem-solving and behavioural questions.
  3. After each answer, it gives a score out of 10, what was good, what to improve, and a short better answer.
  4. At the end it writes a final report with strengths and what to practise next, and saves the whole session to a Markdown file so you can review it later.

It runs completely on a laptop with a local open-weight model. No account, no API key, no internet.

Demo

image uploded with post

Code

Main file: interview_buddy.py

How I Built It

  • Model: Meta's open-weight Llama 3.2 (3B), running locally through Ollama. It's small enough (about 2 GB) to run on an ordinary laptop CPU.
  • Two roles, two prompts: the interviewer keeps the full conversation history so it doesn't repeat questions, while the coach only sees one question and answer at a time and gives feedback in a fixed format (Score / Good / Improve / Better answer). Splitting them kept the feedback focused.
  • Zero dependencies: just Python's urllib and json, so my friend doesn't have to install packages.
  • Swappable model: --model qwen2.5 or any other Ollama model works with one flag.

What I learned: a small 3B model is fine at asking questions, but it sometimes gives confident wrong "better answers" (in one test it suggested pop(0) for a stack, which is wrong because a stack should pop from the end). Because the model is open and local, I can switch to a bigger model like Qwen 2.5 7B for better feedback without changing any code. I also added a rule so skipped answers score 0 instead of getting free points.

Why Does Open Innovation Matter?

  • It works offline. My friend can practise anywhere, even with bad internet.
  • It costs nothing to run. No subscription and no per-message API bill, so they can practise 100 questions a day if they want.
  • Their answers stay private. Practice answers include nervous, half-wrong attempts. With a local model, none of that leaves their laptop.
  • I control the model. If one model's feedback isn't good enough, I swap it. With a closed API I'd be stuck with whatever the provider decides.

My Agent Session

I built this with help from an AI coding agent (Claude Code), which wrote the first version of the script and tested it against my local Ollama models. I then tried it myself and tuned the prompts.

Top comments (0)