AB-Law / AB-Law/Vett

feat: auto-generate quiz questions from uploaded interview documents

Đang mở
#27 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement
Ngôn ngữ chính
Python
Star
0
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

## 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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

Start by examining the backend/app/routers/study.py file to understand the existing API structure. Look at the interview_knowledge_documents table and the pgvector retrieval logic. Review the PracticeQuestion model to see the source_table column. The LLM service for generating and grading questions needs integration. Testing involves creating a quiz endpoint that retrieves documents, calls Claude, and returns structured questions.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
postgresql
Lĩnh vực
ai, backend, full-stack
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.