Lectern LogoLECTERN

Free & open source · your own Gemini key

Lecture PDFs into Anki flashcards you can trust

Lectern reads the whole lecture, maps its concepts, and generates cards that cite the exact pages they came from. You see what's covered, check any card against its slide, and send the deck straight to Anki.

macOS · Windows · Linux · no account, no subscription

Overfitting · slide 46

How does an overfit model differ from an underfit model?

tap to flip · drag to review
Answer

Overfit: low training error but high test error — too much capacity or too little data. Underfit: high error on both.

p. 46, 49Overfitting
Gradient descent · slide 23

What does the learning rate control in gradient descent?

tap to flip · drag to review
Answer

The size of each update step: too large and the loss diverges, too small and training crawls to a halt.

p. 23Gradient descent
Bias–variance · slide 51

What tension does the bias–variance trade-off describe?

tap to flip · drag to review
Answer

A model too simple underfits (high bias); one too flexible fits noise (high variance). Total error is lowest in between.

p. 51Bias–variance
Cross-validation · slide 58

Why does k-fold cross-validation beat a single train/test split?

tap to flip · drag to review
Answer

Every sample serves in training and validation across folds, so the estimate averages k splits instead of trusting one.

p. 58Cross-validation

your slides light up as cards cover them

Lectern generating a deck from a 72-page machine-learning lecture: the filmstrip lights up page by page as grounded cards stream in

Every card can back itself up

Grounded, or it doesn't get in

A chatbot will happily invent plausible flashcards. Lectern gates every card on provenance: which pages it came from, which concept it teaches, and a source excerpt to verify it against. Cards without support are rejected.

  • Page references on every card. Click a citation and the original slide slides into focus instantly.
  • Coverage ledger. The model tracks which topics lack cards and generates batches targeting the remaining gaps.
  • Quality pass. A final review pass rewrites weak cards, validating each edit against original source material.

How does an overfit model differ from an underfit model in terms of training and test error?

Overfit: very low training error but high test error, from too much capacity or too little data. Underfit: high error on both, because the model is too simple.
Lecture 4: Machine Learning Page 46 of 72

Model Generalization & Fit

  • Overfitting: Occurs when model parameters learn training noise.
    • Result: training error is low, but test error is high.
    • Causes: model capacity too high, or size of dataset too small.
  • Underfitting: Occurs when the model structure is too simple.
    • Result: training and test error are both high.

Concept Ingestion Pipeline

  • Initial Pass: Ingest PDF and build conceptual map tree.
    • Identifies core learning goals and term relationships page-by-page.
    • Maintains a strict matrix ledger of coverage.
  • Automated Planning: Tracks and resolves information gaps.
    • Steers generation loops explicitly to track coverage and detect gaps.

AnkiConnect Sync Protocol

  • Export API: Interfaces directly with local Anki database.
    • Requires AnkiConnect addon configured on port 8765.
  • Idempotent Sync: Keeps notes clean.
    • Each card has a persistent source hash.
    • Re-running an ingestion updates existing notes in-place rather than creating duplicate cards.

One lecture in, one deck out

How it works

The pipeline runs entirely on your machine, with no backend and no account. Lectern talks only to the Gemini API, using your key from the OS keychain, and to your local Anki.

1 · map

Read the whole lecture

Gemini builds a concept map of the whole document: objectives, concepts, and relations, page by page.

2 · generate

Cards, agentically

The model submits batches and steers by the coverage ledger until the gaps are closed.

3 · review

You stay in charge

Edit, search, filter by page, and peek at the slide behind any card with a single keystroke.

4 · send

Straight into Anki

One click via AnkiConnect. Re-running a lecture updates notes instead of duplicating them.

Reviewing a finished deck in Lectern: the original lecture slide open next to the card generated from it
the slide behind the card, one keystroke away

A ~10 MB desktop app

Put a lecture on the desk

You need Anki with the AnkiConnect add-on and a free Gemini API key. A typical 70-page lecture costs between a few cents and about a dollar in Gemini usage. Lectern itself is free.

zsh
~ brew install --cask stegra05/tap/lectern
Download Desktop App

macOS (Apple Silicon & Intel) · Windows · Linux · MIT-licensed