Portion Cut: paste your exam portion, read only the pages that matter (EmbeddingGemma, in the browser)
Description and use
Portion Cut automatically matches exam syllabus lines to textbook pages, highlights only the relevant pages, and produces a concise PDF, saving students time.
Problem
Students waste time searching textbook pages that match exam syllabus lines, especially when wording differs and topics span multiple chapters.
Outcome
On a 397‑page textbook, Portion Cut identified 99 pages to read for the tuning portion and 75 for the held‑out portion, found 18 of 21 and 12 of 16 needed sections respectively, and correctly flagged all missing lines without false positives.
Workflow
- Paste exam portion text into the web app.
- Drop the textbook PDF into the app.
- The app extracts text from each page using pdf.js.
- Each page is embedded with EmbeddingGemma 300M (4-bit ONNX) and cached in IndexedDB.
- Each syllabus line is embedded and matched to page vectors; missing lines are flagged based on score thresholds.
- Relevant pages are grouped by section and assembled into a smaller PDF with pdf-lib.
- The resulting PDF is presented for download or viewing in the browser.
- The app runs entirely client‑side with no backend or API key.
- The demo mode uses pre‑computed vectors for a sample book.
- The tool works offline after the first visit.
- The model and embeddings are cached for instant reuse on subsequent runs.
Evidence
Portion Cut does that matching for you. Paste the portion, drop in the textbook PDF, and it tells you which pages to read, grouped by syllabus line, with the section names next to each range.
Everything runs in the browser tab. The PDF is never uploaded, there is no backend, and there is no API key.
The matching is done by EmbeddingGemma 300M, Google's open‑weight embedding model, using the 4‑bit ONNX build from onnx‑community/embeddinggemma‑300m‑ONNX and Transformers.js on WebAssembly.
On that run, Portion Cut said to read 99 of 397 pages, found 7 of the 9 syllabus lines, and flagged the other two (sets and regular expressions) as probably not in the book.
I wanted a number I could defend, so I measured it on one free textbook, OpenStax's Introduction to Python Programming (397 pages), against two portions copied word for word from a public university Python syllabus.
- Record date: 2026-10-20T05:56:08.872Z