AB-Law / AB-Law/Vett

feat: AI flashcard generation from interview knowledge documents

Abierto
#26 0 comentarios 0 reacciones 0 asignados Ver en GitHub
enhancement
Lenguaje dominante
Python
Estrellas
0
Forks
0
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.