Skip to content

Phase 4 — AI-Assisted Rounds (Technical + Conversational)

Goal: Add technical_ai_assisted and ai_conversational stage types. An AI interviewer conducts the session, asking dynamic follow-ups based on candidate responses.


4.1 Backend — ScenarioQuestion Service + Controller

GET  /v1/scenario-questions        — list (filterable by applicableStageTypes, scenarioType, difficulty)
POST /v1/scenario-questions        — create custom scenario

Seed script: src/scripts/seedScenarioQuestions.ts — system scenarios across system design, API design, behavioral, sales/marketing.


4.2 Backend — AI Interviewer Service

src/services/aiInterviewerService.ts

For technical_ai_assisted:

  • Conduct multi-turn Q&A via WebSocket or HTTP streaming
  • Initial question: ScenarioQuestion.context
  • Follow-up generation: based on followUpGuide + candidate's previous answer
  • Store each turn in Interview.stageData.aiTechnicalResponses
  • On completion: generate aiReport with criteriaScores from evaluationRubric

For ai_conversational:

  • Real-time voice agent (TTS + STT integration — Deepgram or similar)
  • Store turns in Interview.stageData.conversationalTurns
  • Audio URL stored per turn (recruiter-only)
  • On completion: generate aiReport

Model: claude-sonnet-4-6 for Q&A generation; TTS/STT via Deepgram or similar for voice.


4.3 Frontend — AI Session Page

New public route: /ai-session/:token

src/pages/AiInterviewSession.tsx:

  • Text or voice interface — determined by StageTypeConfig.toolsConfig.voiceInterface
  • AI message rendering + candidate response input
  • Optional whiteboard/IDE enabled from StageTypeConfig.toolsConfig (not hardcoded)

No hardcoded tool toggles — all tools shown/hidden based on StageTypeConfig.toolsConfig.*.


4.4 Frontend — Recruiter: AI Session Results

In CandidateDetail.tsx, for technical_ai_assisted and ai_conversational stages:

  • Show Q&A transcript (with aiScore per question — recruiter only)
  • Show aiReport: overall score, criteria breakdown, recommendation
  • For conversational: audio playback per turn (audio URL is recruiter-only)

Phase 4 — Acceptance Criteria

  • [ ] technical_ai_assisted and ai_conversational available on all plans (usage limits apply)
  • [ ] AI interviewer generates dynamic follow-up questions based on candidate responses
  • [ ] aiReport generated on session completion and visible to recruiter
  • [ ] Candidate can view their own Q&A transcript (no AI scores exposed)
  • [ ] Tool panel (whiteboard/IDE/voice) rendered from StageTypeConfig.toolsConfig — no hardcoding
  • [ ] Audio recordings stored per turn and accessible to recruiter only