Skip to the content.

interviewer-gpt

Guru.AI — a GPT-powered mock-interview assistant for ML Engineering, Leadership/Managerial, and Coding interviews. It generates a random interview question, lets you answer by typing (or by recording audio that is transcribed locally with Whisper), and then evaluates your answer with an LLM. For leadership/behavioural questions it also scores how closely your answer maps to the Amazon Leadership Principles using embedding similarity.

The app is built with Gradio and LangChain on top of the OpenAI API.

Repository structure

Note: the question text files seed interview_questions.db automatically the first time a question table is empty. The database ships pre-seeded and deduplicated, so to pick up questions you add to the .txt files, delete resources/interview_questions.db and run the app again (see Adding your own questions).

Getting started

This project targets Python 3.10–3.12 (verified on 3.12). Some pinned dependencies do not yet ship wheels for Python 3.14.

  1. Clone the repository.

  2. Create and activate a virtual environment:

    python3.12 -m venv .venv
    source .venv/bin/activate        # Windows: .venv\Scripts\activate
    
  3. Install the dependencies:

    pip install -r requirements.txt
    
  4. Create your local config from the template and add your OpenAI API key:

    cp .env.example .env
    # then edit .env and set OPENAI_API_KEY=sk-...
    
  5. Run the app:

    python interviewer_app.py
    
  6. Open http://127.0.0.1:7860 in your browser.

    To expose a temporary public share link, set GRADIO_SHARE=1 before launching.

Configuration

All settings are read from a local, git-ignored .env file (see .env.example):

Variable Purpose Default
OPENAI_API_KEY Your OpenAI API key (required for any LLM call)
MODEL OpenAI chat model used for evaluation/summarization gpt-3.5-turbo
TEMPERATURE Sampling temperature 0.0
MAX_TOKENS Max tokens for generations 3000
CHUNK_SIZE Char threshold/size for splitting long responses 600
CHUNK_OVERLAP Overlap between text chunks when summarizing 30

Adding your own questions

Each question type is backed by a plain-text file in resources/ (one question per line):

Add your questions on new lines, then rebuild the database so the new entries are picked up:

rm resources/interview_questions.db
python interviewer_app.py   # the tables are re-seeded from the .txt files on first use

Questions are inserted with parameterized queries, so apostrophes and quotes are handled safely.

How it works

  1. Choose the question type (Leadership & Behavioural, ML System Design, or Coding).
  2. Click Generate me a random interview question.
  3. Type your answer — or, for behavioural questions, record audio and it will be transcribed locally with the openai/whisper-base.en model. (The model downloads on first use.)
  4. Click Guru evaluation of the response to get:
    • a high-level ranking (Weak / Average / Good / Excellent) with an explanation,
    • for behavioural questions, a per-principle breakdown against the Amazon Leadership Principles plus a similarity bar chart, and
    • a sample “Guru” answer for reference.

Running the test

tests/test_youtube.py is an end-to-end script (not a unit test). It downloads a YouTube transcript, summarizes it, and runs the behavioural evaluation, writing results into the tests/ directory. It requires a valid OPENAI_API_KEY and network access:

python tests/test_youtube.py

Security note

Never commit secrets. The .env file is git-ignored. An earlier version of this repository committed an OpenAI key in resources/conf.env; that file is no longer tracked and any key it contained should be considered compromised and revoked at https://platform.openai.com/api-keys.

Maintenance notes

The codebase was modernized to current libraries and verified end-to-end (UI build, server boot, live OpenAI call, and the full evaluation path):