Skip to content

fix: make skill assessment MCQ-only#188

Merged
Trojanhorse7 merged 1 commit into
hngprojects:devfrom
Zubbee18:fix/skill-access-mcq
May 30, 2026
Merged

fix: make skill assessment MCQ-only#188
Trojanhorse7 merged 1 commit into
hngprojects:devfrom
Zubbee18:fix/skill-access-mcq

Conversation

@Zubbee18
Copy link
Copy Markdown
Collaborator

@Zubbee18 Zubbee18 commented May 30, 2026

Summary

Converts the skill assessment from a mixed MCQ + text format to purely MCQ-based questions.

Changes

  • Question mix: 16 primary MCQs + 2 probe MCQs per direction (above/below) = 20 total
    • Previously: 13 MCQ + 3 text + 1 MCQ/1 text per probe direction
  • Scoring: Pure MCQ scoring (correct / total × 100) replaces the previous weighted system (40% MCQ / 60% text)
  • Removed AI rubric scoring: RubricScoringService is no longer injected or used for skill assessments (still used by advanced assessments)
  • AI question generation: Only generates MCQs when the bank is short; no longer generates text questions for skill assessments
  • Removed unused methods: toWeightedSectionScore, extractStrongCompetencies, extractWeakCompetencies, resolveScoredCompetencies
  • Updated tests: All 22 unit tests pass with the new MCQ-only structure
image image

Summary by CodeRabbit

  • Bug Fixes

    • Updated skill assessment scoring logic to function exclusively with multiple-choice questions.
  • Refactor

    • Revised assessment question generation and selection to support MCQ-only format.
    • Simplified competency reporting to reflect updated evaluation methodology.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 30, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This PR refactors skill assessment to eliminate text-question and rubric-scoring logic entirely. The service now uses MCQ-only evaluation for submission, scoring, and reporting. Tests are updated with MCQ-only fixtures and scoring scenarios, and text-related helpers and dependencies are removed.

Changes

MCQ-only assessment conversion

Layer / File(s) Summary
Dependencies and imports cleanup
src/modules/talent/assessment/skill-assessment.service.ts, src/modules/talent/assessment/skill-assessment.service.spec.ts
RubricScoringService dependency is removed from constructor wiring; text-length-validation imports and mock declarations are eliminated.
Assessment submission and MCQ-only scoring
src/modules/talent/assessment/skill-assessment.service.ts
submit() now evaluates each question via scoreGeneratedMcq without text-rubric batching; raw_score/max_score are set from correctness booleans; total/section scoring and above-probe gates depend only on MCQ counters.
AI question generation for MCQs only
src/modules/talent/assessment/skill-assessment.service.ts
ensureSkillQuestionsWithAI() generates only MCQ variants (no parallel text generation); AssessmentQuestion rows are persisted with only MCQ results.
Question-mix selection for MCQ-only
src/modules/talent/assessment/skill-assessment.service.ts
selectSkillQuestionMix() and selectSkillProbeMix() select only MCQs and base availability/error checks on MCQ counts; text-question filler is removed.
Guidance report and helper cleanup
src/modules/talent/assessment/skill-assessment.service.ts
Guidance report sends empty competency arrays; toWeightedSectionScore, extractStrongCompetencies, and extractWeakCompetencies helpers are removed.
Test fixtures for MCQ-only questions
src/modules/talent/assessment/skill-assessment.service.spec.ts
makeSkillBankQuestions() generates only MCQ questions; makeProbeQuestions() includes only MCQ items; question-type assertions in start() tests are adjusted.
Test cases for MCQ scoring logic
src/modules/talent/assessment/skill-assessment.service.spec.ts
New test asserts failure when all primary MCQ answers are wrong; below-50% scenario is rewritten with two MCQ questions and updated mocks; text-length-validation test is replaced with a scenario validating correct MCQ scoring when the majority of answers are correct.

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related PRs

  • hngprojects/skill-bridge-api#155: Both PRs modify guidance-report generation—this PR changes SkillAssessmentService to perform MCQ-only scoring and feed empty competency data into guidance generation, while the other PR adjusts AI/guidance services to compute competency ratings based on the assessment input data.

Suggested labels

bug, enhancement

Suggested reviewers

  • Trojanhorse7
  • kenneropia
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately summarizes the main objective: converting skill assessment from a mixed MCQ + text format to purely MCQ-based questions.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Trojanhorse7 Trojanhorse7 merged commit 2bb4384 into hngprojects:dev May 30, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants