Skip to content

Repository files navigation

Interview Prep App

A modern, full-stack interview preparation app powered by multiple LLM providers (OpenAI, Anthropic, Gemini, Ollama) and an in-memory vector database for semantic job description search (RAG).


πŸš€ Features

  • Multi-provider LLM support: OpenAI, Anthropic (Claude), Gemini, Ollama (local models)
  • Configurable LLM settings: Temperature, max tokens, jailbreak protection, etc.
  • Job description RAG: Semantic search and enrichment for job descriptions
  • Interview setup wizard: Step-by-step configuration for your interview session
  • Prompting techniques: Zero-shot, few-shot, chain-of-thought, role-based, and more
  • Modern UI: Built with React, MUI, and Next.js
  • In-memory vector DB: No external DB required for job corpus

πŸ—ΊοΈ Application Flow (Mermaid Diagram)

flowchart TD
    A[User opens app] --> B[Setup Wizard]
    B --> C[Select LLM Provider & Model]
    C --> D[Configure LLM Settings]
    D --> E[Select Interview Topic]
    E --> F[Choose Knowledge/Background]
    F --> G[Set Difficulty, Persona, Response Length]
    G --> H[Enter or Generate Job Description]
    H --> I[Select Prompting Technique]
    I --> J[Start Interview]
    J --> K[User submits prompt/question]
    K --> L{RAG: Search Job Corpus?}
    L -- Match Found --> M[Retrieve Job Description]
    L -- No Good Match --> N[Generate with LLM]
    M & N --> O[Prepare System Prompt]
    O --> P[Send to Selected LLM Provider]
    P --> Q[LLM Generates Response]
    Q --> R[Show Response in Chat UI]
    R --> S{Continue?}
    S -- Yes --> K
    S -- No --> T[End Session]

    subgraph Provider Selection
      C
      D
    end
    subgraph Interview Setup
      E
      F
      G
      H
      I
    end
    subgraph RAG
      L
      M
      N
    end
    subgraph LLM Interaction
      O
      P
      Q
    end
Loading

πŸ› οΈ Getting Started

1. Clone the repository

git clone <your-repo-url>
cd interview-prep-app

2. Install dependencies

yarn install

3. Set up environment variables

Copy .env.example to .env and fill in your API keys:

cp .env.example .env

Required variables:

  • OPENAI_API_KEY (for OpenAI models)
  • ANTHROPIC_API_KEY (for Anthropic/Claude models)
  • GEMINI_API_KEY (for Gemini models)
  • OLLAMA_BASE_URL (optional, for custom Ollama server URL; defaults to http://localhost:11434)

Ollama does not require an API key but must be running locally or accessible at the specified URL.

4. Run the app in development

yarn dev

Visit http://localhost:3000 in your browser.


βš™οΈ LLM Provider Support

  • OpenAI: GPT-4o, GPT-4, GPT-3.5, etc. (requires API key)
  • Anthropic: Claude 3, Claude 3.5, etc. (requires API key)
  • Gemini: Gemini 1.5, Gemini Pro, etc. (requires API key)
  • Ollama: Local models (e.g., Mistral, Llama2, etc.)
    • Ollama must be running locally (ollama serve)
    • Models must be pulled (e.g., ollama pull mistral)

🧠 Vector Database (RAG)

  • Uses imvectordb for in-memory semantic search
  • Corpus is stored in job_corpus.json (auto-saved/loaded)
  • No external DB or cloud service required

πŸ§‘β€πŸ’» Development

Linting & Type Checking

yarn lint        # Run ESLint
yarn type-check  # Run TypeScript compiler

Formatting

yarn format      # Run Prettier

Build for Production

yarn build

Start in Production

yarn start

πŸ› Troubleshooting

  • Ollama returns empty messages:
    • Ensure Ollama is running and the model is pulled
    • Try a simple prompt via the Ollama CLI to verify
    • Check logs for errors in src/lib/llm-ollama.ts
  • API key errors:
    • Make sure your .env file is set up and keys are valid
  • Vector DB issues:
    • job_corpus.json must be writable by the app

🀝 Contributing

  1. Fork the repo and create your branch
  2. Make your changes (lint and type-check before PR!)
  3. Submit a pull request

πŸ“„ License

MIT


πŸ› οΈ Configuration (src/config/config.ts)

The app is highly configurable via src/config/config.ts. You can customize:

  • Models:
    • Add or remove LLM models/providers (OpenAI, Anthropic, Gemini, Ollama, etc.)
    • Example:
      models: [
        { id: 'gpt-4o', label: 'GPT-4o', provider: 'openai' },
        { id: 'mistral', label: 'Mistral (Ollama)', provider: 'ollama' },
        // ...
      ]
  • Prompt Options:
    • Define different prompting techniques for the interview session. Each option has an id, label, and description.

    • Available options:

      ID Label Description (Purpose)
      zero-shot Zero-Shot Prompting No examples, tests adaptability and core skills.
      few-shot Few-Shot Prompting Provides example Q&A pairs to guide expectations.
      chain-of-thought Chain-of-Thought Encourages step-by-step reasoning and problem-solving.
      role-based Role-Based Prompting Switches interviewer roles to assess breadth and adaptability.
      instruction-based Instruction-Based Prompt Highly structured, standardized interviews for consistent evaluation.
    • Example config for a prompt option:

      {
        id: 'zero-shot',
        label: 'Zero-Shot Prompting',
        description: `Context: You are an expert technical interviewer in an LLM interview arena.\nObjective: Conduct a technical interview without any examples or prior context.\nStyle: Professional and adaptable.\nTone: Analytical yet encouraging.\nAudience: Interview candidates of varying experience levels.\nResponse: Ask relevant technical questions, evaluate responses in real-time, and provide constructive feedback. Adapt your questions based on the candidate's responses and skill level demonstrated. Focus on core competencies and problem-solving abilities.`
      }
    • How to add your own:

      • Add a new object to the promptOptions array in src/config/config.ts with a unique id, a descriptive label, and a detailed description.
      • The description can include context, objectives, style, tone, audience, and response guidelines for the interviewer LLM.
    • Detailed breakdown:

      • Zero-Shot Prompting:
        • Purpose: Conduct interviews without providing examples or prior context. Focuses on adaptability and core skills.
        • Use case: Simulate a real interview where the candidate must respond without hints.
        • Example config: See above.
      • Few-Shot Prompting:
        • Purpose: Guide the interview with example Q&A pairs, helping the model understand the expected format and depth.
        • Use case: Provide a few sample questions/answers to set expectations for the candidate.
        • Example config:
          {
            id: 'few-shot',
            label: 'Few-Shot Prompting',
            description: `Context: You are an expert technical interviewer with access to example Q&A pairs.\nObjective: Use example patterns to guide the interview process.\nStyle: Structured and consistent.\nTone: Educational and supportive.\nAudience: Interview candidates seeking clear expectations.\nResponse: Here are three example Q&A pairs:\n1. Q: 'Explain dependency injection?' A: [Clear, concise answer]\n2. Q: 'What is SOLID?' A: [Well-structured response]\n3. Q: 'Describe microservices' A: [Comprehensive explanation]\nUse these patterns to formulate similar questions and evaluate responses accordingly.`
          }
      • Chain-of-Thought:
        • Purpose: Encourage step-by-step reasoning and problem-solving by prompting the candidate to explain their thought process.
        • Use case: Technical or architectural challenges where reasoning is as important as the answer.
        • Example config:
          {
            id: 'chain-of-thought',
            label: 'Chain-of-Thought',
            description: `Context: You are an expert interviewer focused on understanding candidate reasoning.\nObjective: Guide candidates through complex problem-solving scenarios.\nStyle: Systematic and analytical.\nTone: Collaborative and inquisitive.\nAudience: Candidates solving technical or architectural challenges.\nResponse: Present a problem, then guide with prompts like:\n1. 'What's your initial approach?'\n2. 'What assumptions are you making?'\n3. 'What trade-offs do you see?'\n4. 'How would you test this solution?'\nEncourage detailed explanations at each step.`
          }
      • Role-Based Prompting:
        • Purpose: Assess candidates from different professional perspectives (e.g., technical lead, product manager, HR).
        • Use case: Switch between roles to evaluate a candidate's breadth and adaptability.
        • Example config:
          {
            id: 'role-based',
            label: 'Role-Based Prompting',
            description: `Context: You can embody different interviewer personas.\nObjective: Assess candidates from various professional perspectives.\nStyle: Adaptive and role-specific.\nTone: Varies by role (e.g., technical lead: detailed, HR: interpersonal).\nAudience: Candidates being evaluated across different dimensions.\nResponse: Switch between roles such as:\n1. Technical Lead: Deep technical questions\n2. Product Manager: System design and trade-offs\n3. Team Lead: Leadership and collaboration\n4. Architect: High-level design principles\nAdjust questioning style and focus based on the current role.`
          }
      • Instruction-Based Prompting:
        • Purpose: Conduct highly structured interviews with specific instructions and evaluation criteria.
        • Use case: Screen candidates with standardized questions and formats for consistent evaluation.
        • Example config:
          {
            id: 'instruction-based',
            label: 'Instruction-Based Prompting',
            description: `Context: You are a structured interviewer following specific guidelines.\nObjective: Conduct highly focused, consistent interviews.\nStyle: Clear and methodical.\nTone: Direct and constructive.\nAudience: Candidates requiring specific evaluation criteria.\nResponse: Follow these instructions:\n1. Start with role-specific screening questions\n2. Present coding/design challenges with clear requirements\n3. Request specific formats for answers (e.g., 'Explain in pseudocode')\n4. Evaluate against predefined criteria\n5. Provide structured feedback\nMaintain consistency while allowing for candidate-specific adaptations.`
          }
  • Topics:
    • Add interview topics (e.g., "Web Applications", "Prompt Engineering", "Venture Capital")
    • Each topic can have:
      • knowledgeOptions: User backgrounds/levels for the topic
      • interviewerGuidelines: Technical and behavioral criteria for evaluation

To extend:

  • Add new models to the models array
  • Add new topics or knowledge levels to the topics array
  • Add or edit prompt options for new interview styles
  • Customize interviewer guidelines for your domain

Changes to config.ts are picked up automatically on restart.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages