Skip to content

Batch Picker

A local FastAPI web UI for curating AKMS NotebookLM batches by hand instead of relying on the lossy free-text source lists in generation_plan.md.

Why it exists

flowchart LR
    A[generation_plan.md<br/>'Sources: Belytschko Ch. 2-3, ...'] -.lossy mapping.-> B(Manual NLM upload)
    B -.NLM gets wrong PDFs.-> C[Generated nodes drift from sources]
    style A fill:#ffe1e1,stroke:#c00
    style C fill:#ffe1e1,stroke:#c00

    D[generation_plan.md<br/>same as above] --> E(Batch Picker)
    F[Zotero + ZotSums] --> E
    E --> G[batch_assignments.json<br/>citekeys, recorded] --> H[NLM has the right PDFs] --> I[Generated nodes match sources]
    style E fill:#e1ffe1,stroke:#0a0
    style I fill:#e1ffe1,stroke:#0a0

A previous eval discovered NotebookLM notebooks ending up with sources unrelated to the questions asked of them — symptom of mapping lines like Belytschko Ch. 2-3, ... onto Zotero papers by hand. The picker makes paper assignment explicit and persisted.

What you get

  • Two-pane UI — batch tree on the left, filterable paper picker on the right.
  • Filters — full-text search across title/citekey/keywords/abstract, multi-select collections, year range, item type, "only with PDF".
  • Suggest-for-batch ranking — deterministic keyword overlap with the batch's nodes; see Architecture › Suggest scoring.
  • Saved queries — named filter specs, persisted across sessions.
  • Bulk add / replace — push every match of the current filter into the active batch in one click.
  • Side-by-side compare — three-column diff (only-A / both / only-B) of any two batches' assignments, with bulk Move/Copy/Remove buttons.
  • Copy-to-batch popover — click = copy, Shift+click = move; works on assigned-paper pills and on each search-result row.
  • End-to-end pipeline buttons — Write plan JSON, Stage PDFs (symlinks into <workspace>/pdfs/<slug>/), Create NLM notebook (drives the nlm CLI).
  • Durable record — every notebook ID and uploaded paper lives in <workspace>/batch_assignments.json so reruns only upload the delta.