Spaces:
Sleeping
Perfect. Below is the full, clean, editor-ready version of docs/project_log.md.
You can copyβpaste as-is. No filler, no inconsistencies, aligned with your actual backend state.
π docs/project_log.md
# PROJECT LOG β Multimodal AI Interview Simulator
## Project Title
Multimodal AI Interview Simulator
(Backend-first system with scoring, analytics, decision engine, and future frontend)
---
## Project Summary
The Multimodal AI Interview Simulator is a full-stack interview evaluation system designed to:
- Parse ATS-friendly resumes
- Accept job role, job description, experience, and education
- Dynamically generate interview questions
- Conduct a **stateful, multi-stage interview**
- Score answers using **Sentence Transformers + TF-IDF explainability**
- Insert **follow-up questions automatically** when answers lack depth
- Aggregate scores into a final report
- Generate analytics and a readiness index
- Produce a final hiring decision (PASS / BORDERLINE / HOLD)
- Persist **all artifacts** for audit and review
The backend is deterministic, explainable, and LLM-free by design (LLMs planned later).
---
## Architecture Overview
### Backend Stack
- **Framework**: FastAPI
- **ML**: sentence-transformers, scikit-learn
- **ASR**: Whisper (via transformers)
- **Storage**: filesystem (`storage/<session_id>/`)
- **State management**: JSON-based interview state machine
- **Scoring**: cosine similarity + heuristics
- **Analytics**: post-interview signal analysis
- **Decision engine**: rule-based, conservative by default
---
## Key Directories & Files
backend/ βββ app/ βββ main.py βββ api/ β βββ routes/ β βββ health.py β βββ session.py β βββ upload.py β βββ parse_resume.py β βββ interview_plan.py β βββ generate_question.py β βββ score_text.py β βββ answer_audio.py β βββ aggregate_scores.py # Phase 6.1 β βββ analytics_report.py # Phase 6.2 β βββ decision.py # Phase 6.3 βββ core/ β βββ interview_flow.py β βββ interview_state.py β βββ interview_reasoning.py β βββ scoring_config.py β βββ ml_models.py docs/ βββ api_contracts.md βββ project_log.md storage/ βββ /
---
## Interview Flow (Authoritative)
intro β project β technical (resume + JD driven) β follow-ups (conditional, dynamic) β HR / behavioral β critical thinking β warmup β wrapup β candidate questions (loop until none) β end
Rules:
- Intro and project are fixed stages
- Follow-ups can occur **anywhere except between intro β project**
- Interview never ends abruptly after wrap-up
- Candidate questions are handled before final termination
---
## Chronological Development Log
### Phase 0 β Foundation
- Repository initialized
- FastAPI skeleton created
- Health check endpoint added
- Session creation with isolated storage implemented
---
### Phase 1 β Resume Handling
- Resume upload (`/api/upload/resume`)
- PDF/DOCX text extraction
- Resume parsing (`/api/parse/resume/{session_id}`)
- Extracted: name, email, skills
- Parsing hardened against encoding errors
---
### Phase 2 β Interview Planning
- Interview plan generation using:
- Resume
- Job role
- Job description
- Candidate profile
- Deterministic question generation (no LLM)
- Output stored as `interview_plan.json`
---
### Phase 3 β Interview State Machine
- Implemented persistent interview state
- Added:
- `start_interview`
- `next_question`
- State transitions tracked in `interview_state.json`
- Prevents repeated questions
- Supports dynamic follow-ups
---
### Phase 4 β Answer Scoring
- Text answer scoring (`/api/score/text`)
- SentenceTransformer embeddings
- Cosine similarity normalized to score [0β10]
- TF-IDF token extraction for explainability
- Human-review flags when:
- Score below threshold
- Answer too short
- Depth insufficient
---
### Phase 5 β Audio Answers (ASR)
- Audio upload endpoint
- Whisper ASR integration
- Transcript auto-scored using same pipeline
- Audio persisted for audit
---
### Phase 6.1 β Score Aggregation
- Aggregates all question scores
- Weighted scoring by question type
- Coverage validation against interview plan
- Generates `final_report.json`
- Updates interview state with final metadata
---
### Phase 6.2 β Analytics
- Skill-wise performance analysis
- Follow-up pressure metrics
- Answer consistency signals
- Risk classification (LOW / MEDIUM / HIGH)
- Readiness index generation
- Output: `analytics_report.json`
Cleanup iteration performed:
- Removed stop-word noise
- Reduced token pollution
- Limited skills to meaningful technical signals
---
### Phase 6.3 β Decision Engine
- Final hiring decision endpoint
- Inputs:
- Final score
- Analytics signals
- Human-review flags
- Conservative rules:
- Human review β BORDERLINE or HOLD
- Output: `decision.json`
---
## Known Issues & Resolutions
### Docs UI freezing
- Cause: heavy ML loads during startup
- Fix: lazy model loading
### Resume parsing crashes
- Cause: malformed PDFs
- Fix: error-tolerant text extraction
### Model reload issues (uvicorn)
- Cause: reload + model load race
- Fix: centralized model loader with fallback
---
## Current Status (Confirmed)
β
Backend complete
β
Interview lifecycle stable
β
Scoring, aggregation, analytics, decision working
β
API contract finalized
β³ LLM enhancement deferred
β³ Security hardening pending
β³ Frontend not started
---
## Deferred / Future Enhancements
- LLM-based question generation
- LLM-assisted answer evaluation
- Skill taxonomy + ontology
- JWT authentication & RBAC
- Performance optimizations
- Vector DB for answer history
- Admin dashboard
---
## How to Run (Local)
```bash
python -m venv intrv-sim
source intrv-sim/bin/activate
pip install -r requirements.txt
uvicorn backend.app.main:app --reload --reload-exclude storage/*
Recommended Next Steps
- Freeze backend (tag release)
- Finalize API contract (done)
- Build frontend (React/Vite)
- Add admin dashboard
- Harden security
Changelog
2026-02-02
- Phase 6.1, 6.2, 6.3 completed
- Backend feature-complete (non-LLM)