Skip to content

[MESP-246] [MESP-143] [STORY] 복합 퀴즈 시스템 구현 #471

Description

@DDINGJOO

배경

뉴스 학습 효과를 측정하기 위한 복합 퀴즈 시스템이 필요합니다. 독해 질문, 단어-뜻 매칭, 빈칸 채우기 3가지 형식을 조합하여 종합적인 이해도를 측정합니다.

수용 기준(AC)

  • QuizQuestion, QuizData 모델 클래스 생성
  • NewsQuizResult 모델 클래스 생성
  • 퀴즈 조회 API (GET /news/{articleId}/quiz)
  • 퀴즈 제출 API (POST /news/{articleId}/quiz)
  • Bedrock 퀴즈 생성 프롬프트 구현
  • 퀴즈 유형별 채점 로직 구현
  • NewsQuizResultRepository CRUD 구현

디자인/계약 링크

퀴즈 유형 및 배점:

유형 설명 문제 수 배점
COMPREHENSION 독해 질문 (4지선다) 2문제 40점
WORD_MATCH 단어-뜻 매칭 2문제 30점
FILL_BLANK 빈칸 채우기 1문제 30점

DynamoDB 스키마 - NewsQuizResult:

PK: USER#{userId}#NEWS
SK: QUIZ#{articleId}

Attributes:
- articleId, submittedAt, score (0-100)
- answers: List<{questionId, userAnswer, correct, type}>
- timeTaken (초)

Bedrock 프롬프트 예시:

Based on this news article, generate a quiz with:
1. 2 comprehension questions (multiple choice, 4 options)
2. 2 vocabulary matching questions (word to definition)
3. 1 fill-in-the-blank question (contextual word completion)

Format as JSON with: questions[], correctAnswers[]

API Request - POST /news/{articleId}/quiz:

{
  "answers": [
    {"questionId": "q1", "answer": "A"},
    {"questionId": "q2", "answer": "B"},
    {"questionId": "q3", "answer": "revenue"},
    {"questionId": "q4", "answer": "C"},
    {"questionId": "q5", "answer": "growth"}
  ]
}

API Response:

{
  "score": 80,
  "results": [
    {"questionId": "q1", "correct": true, "type": "COMPREHENSION"},
    {"questionId": "q2", "correct": false, "correctAnswer": "A", "type": "COMPREHENSION"}
  ],
  "feedback": "Great job! Review vocabulary for better results."
}

구현 메모/리스크

  • 퀴즈는 뉴스 수집 시 Bedrock으로 사전 생성하여 NewsArticle에 저장
  • Bedrock 호출 비용 고려 (~$0.03/기사)
  • 퀴즈 품질 검증을 위한 프롬프트 튜닝 필요

연결된 Epic

#384

Metadata

Metadata

Assignees

No one assigned

    Labels

    storyUser story

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions