Describe the feature
Currently, generateInterviewQuestions in aiController.js generates questions based only on role, experience, topics, and number of questions. There's no way to control question difficulty (easy/medium/hard).
Why this is needed
Users preparing for interviews at different stages need different difficulty levels — a beginner wants foundational questions while someone preparing for a senior role wants advanced questions. Right now, difficulty is implicitly tied only to "experience" which isn't precise enough.
Proposed solution
Add a difficulty parameter ("easy", "medium", "hard") to the /api/ai/generate-questions endpoint and pass it into the prompt in questionAnswerPrompt() so Gemini tailors question complexity accordingly.
Files to modify
backend/controllers/aiController.js
backend/utils/prompts.js
Acceptance criteria
Describe the feature
Currently,
generateInterviewQuestionsinaiController.jsgenerates questions based only on role, experience, topics, and number of questions. There's no way to control question difficulty (easy/medium/hard).Why this is needed
Users preparing for interviews at different stages need different difficulty levels — a beginner wants foundational questions while someone preparing for a senior role wants advanced questions. Right now, difficulty is implicitly tied only to "experience" which isn't precise enough.
Proposed solution
Add a
difficultyparameter ("easy","medium","hard") to the/api/ai/generate-questionsendpoint and pass it into the prompt inquestionAnswerPrompt()so Gemini tailors question complexity accordingly.Files to modify
backend/controllers/aiController.jsbackend/utils/prompts.jsAcceptance criteria
difficultyfield"medium"if not provided