feat: auto-generate quiz questions from uploaded interview documents
- 主要语言
- Python
- 星标
- 0
- 派生
- 0
- PR 合并指标
- 30 天内没有已合并 PR
描述
## Epic
Part of #25 — Study Tools
## Problem
The existing `PracticeQuestion` pool comes from external scraped sources. Questions derived from a user's own uploaded documents — the most role-specific material available — are never surfaced as practice.
## Impact
A PM uploading a company strategy doc should be able to quiz themselves on it. Auto-generated questions from the exact documents an interviewer may reference is a step-change improvement over generic question banks.
## Proposed Code (High Level)
**Backend**
```python
# backend/app/routers/study.py
POST /study/quiz
body: { job_id: int, num_questions: int = 5, style: 'open' | 'mcq' }
# 1. pgvector retrieval over interview_knowledge_documents
# 2. Prompt Claude:
# - open: [{question, model_answer, key_points[]}]
# - mcq: [{question, options: [A,B,C,D], correct: 'B', explanation}]
# 3. Optionally persist to PracticeQuestion with
# source_table='interview_knowledge_documents' ← column already exists
# 4. Return questions
POST /study/quiz/{question_id}/grade
body: { user_answer: str } # open-ended only — Claude grades vs model_answer
```
**Frontend — Study Hub**
- MCQ: radio buttons → instant feedback + explanation (no LLM call)
- Open-ended: textarea → submit → streamed Claude grade + model answer reveal
## Functionality Impact
- MCQ grading is instant (no LLM call on review)
- `source_table='interview_knowledge_documents'` already exists on `PracticeQuestion` — persistence is a one-liner
- Open-ended grading reuses the existing LLM service
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。