Skip to content
Projects

RKOS

Research Knowledge Operating System: papers as a typed document graph

Open source Source

Each paper is parsed into a typed tree (sections, paragraphs, figures, tables, equations, captions) stored in a self-referencing PostgreSQL table and queried with recursive CTEs. The RSVP reader paces itself from that structure: equations slow to 100 WPM, figures get a dedicated card at section boundaries, and running headers, affiliations and citation markers are filtered out. PostgreSQL provides GIN full-text search with a pg_trgm typo-tolerant fallback and native recursive-CTE traversal. Reading feeds an SM-2 spaced-repetition scheduler with auto-generated flashcards, and a knowledge score blends reading progress, figure-view ratio and flashcard recall. Topic inference and flashcard generation sit behind protocol interfaces, with a heuristic implementation and an Ollama LLM implementation.

What it does

  • Typed document graph in a self-referencing Postgres table, queried with recursive CTEs
  • Four content-aware pacing tiers (100 WPM for equations up to 300 for prose) plus per-punctuation dwell multipliers
  • Optimal Recognition Point highlighting on a length-banded pivot
  • ~15-pass PDF cleanup: cross-page running-header detection, affiliation and citation stripping, dot leaders, letter-spaced run repair, garbled-text flagging
  • SM-2 spaced repetition implemented from scratch over auto-generated flashcards
  • Knowledge score blending reading progress, figure-view ratio and flashcard recall
  • GIN full-text search with pg_trgm fallback; pluggable heuristic or Ollama-based generators

Pipeline

  1. 1PDF → PyMuPDF Extraction (per-span font/position)
  2. 2Cleanup Pipeline (~15 passes)
  3. 3document_nodes Graph (recursive CTEs)
  4. 4RSVP Segmenter → QTimer Engine
  5. 5SM-2 Scheduler + Analytics