AB-Law / AB-Law/Vett

feat: AI flashcard generation from interview knowledge documents

オープン
#26 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
Python
スター
0
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

説明

## Epic

Part of #25 — Study Tools

## Problem

Once interview documents are embedded, users have no way to do active recall on the material. There is no study loop — just passive re-reading or relying on the chat to surface facts on demand.

## Impact

Spaced-repetition flashcards are one of the most effective evidence-based study techniques. Generating them automatically from the user's own uploaded documents makes preparation faster and more targeted than any generic resource.

## Proposed Code (High Level)

**Backend**
```python
# backend/app/routers/study.py
POST /study/flashcards
body: { job_id: int, topic: str | None, num_cards: int = 10 }

# 1. pgvector similarity search over interview_knowledge_documents chunks
# (reuse practice_vector retrieval pattern)
# 2. Prompt Claude (claude-sonnet-4-6):
# "Generate {num_cards} flashcards as JSON [{front, back}].
# Focus on: {topic}."
# 3. Persist to StudyCardSet / StudyCard
# 4. Return card_set_id + cards

PATCH /study/cards/{card_id}/review
body: { rating: 'easy' | 'hard' } # updates ease_factor + interval_days
```

**New DB models**
```python
# backend/app/models/study.py
class StudyCardSet(Base):
id, job_id (FK), topic, created_at

class StudyCard(Base):
id, card_set_id (FK), front, back,
last_reviewed_at, ease_factor, interval_days # spaced repetition fields
```

**Frontend — Study Hub (`/study/:jobId`)**
- Card flip animation (CSS transform)
- Easy / Hard buttons after each card → PATCH review endpoint
- Progress bar: cards remaining in set

## Functionality Impact

- No new embedding pipeline — reuses existing pgvector chunks
- Spaced repetition fields stored for future due-date scheduling
- First deliverable to implement; unblocks the Study Hub layout

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。