Skip to content

Add knowledge graph with entity extraction#67

Open
nymulinfoinlet wants to merge 2 commits intomainfrom
feat/knowledge-graph
Open

Add knowledge graph with entity extraction#67
nymulinfoinlet wants to merge 2 commits intomainfrom
feat/knowledge-graph

Conversation

@nymulinfoinlet
Copy link
Copy Markdown
Contributor

Summary

  • Adds knowledge-graph module with AI-powered entity extraction from study set content (flashcards, notes, descriptions)
  • Extracts named entities (concepts, people, dates, formulas, definitions, events) and maps relationships between them
  • Supports cross-study-set graph merging with automatic entity deduplication
  • Auto-creates knowledge_entities and knowledge_relationships tables on startup

Endpoints

  • POST /knowledge-graph/:studySetId/extract — trigger extraction
  • GET /knowledge-graph/:studySetId — get graph (nodes + edges)
  • GET /knowledge-graph/:studySetId/entities — list entities
  • GET /knowledge-graph/entity/:id — entity detail with relationships
  • POST /knowledge-graph/merge — merge graphs across study sets

Test plan

  • Verify tsc --noEmit passes with 0 errors
  • Create a study set with flashcards, trigger extraction, verify entities are returned
  • Verify relationships are extracted between entities
  • Verify GET /knowledge-graph/:id returns correct nodes and edges
  • Test merge endpoint with two study sets sharing common entities
  • Verify ownership checks prevent cross-user access

Closes #56

🤖 Generated with Claude Code

nymulinfoinlet and others added 2 commits April 12, 2026 19:45
Add StudyPlannerService with upcoming reviews, daily plan, exam dates,
study streak heatmap, and iCal export. Includes migration for the
study_set_exam_dates table.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Implements AI-powered entity extraction and relationship mapping from study
materials. Entities (concepts, people, dates, formulas, definitions, events)
are extracted via LLM prompts and stored in knowledge_entities/knowledge_relationships
tables. Supports cross-study-set graph merging with entity deduplication.

Closes #56

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(knowledge-graph): True entity extraction and interactive knowledge graph from documents

1 participant