DEV Community

Garv Jain
Garv Jain

Posted on

Sloth Notes: a local AI digest for the notes you don't want to reread

Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady Submission 🦥

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady.

What I Built

Sloth Notes turns a messy block of English notes into a short, source-linked digest and a list of suggested actions.

The idea is small: rereading a meeting recap to find the next thing to do is busywork. Paste the recap, choose up to three, five, or seven highlights, and let a small open model do a first pass. Every highlight quotes an original sentence. Each source button takes you back to that sentence so you can check what was left out.

The application was built from scratch on October 24, 2026, during the Week 3 window. Codex generated the application code and this write-up in response to my request. The runtime AI is MiniLM, not the coding assistant.

Demo

Open Sloth Notes

Choose Try sample notes, then Make it shorter. The first run downloads the quantized model and runtime files. The application then computes sentence embeddings on your device.

In the browser check, the synthetic study-group recap went from 127 words to 59 words, a 54% reduction, in about 0.5 seconds with model assets already cached. It also surfaced four keyword-based action suggestions. That is one demonstration, not a benchmark across devices or evidence of real-world time saved.

The summary can still omit an important detail or select a weak sentence. Source references are there to make review quick.

Code

Download the complete MIT-licensed source · Read the README and credits

The source includes HTML, CSS, three JavaScript modules, a README, ten regression tests, and the MIT license. There is no build step or API key.

To run it locally, extract the archive, enter the sloth-notes directory, and run:

python3 -m http.server 8765 --bind 127.0.0.1
Enter fullscreen mode Exit fullscreen mode

Then open http://127.0.0.1:8765.

How I Built It

The open AI component is Xenova/all-MiniLM-L6-v2, an Apache-2.0 embedding model, run with Transformers.js 3.8.1 and ONNX Runtime Web.

The pipeline is:

  1. Split the text into sentences with Intl.Segmenter.
  2. Generate normalized, mean-pooled MiniLM embeddings in a module Web Worker.
  3. Compute the document centroid.
  4. Select sentences that balance similarity to the centroid with a penalty for repetition.
  5. Restore source order and show a source reference for every selection.

The core selection score is:

const score =
  0.55 * relevanceToDocument -
  0.45 * similarityToAlreadySelectedSentences;
// The full implementation adds bonuses for explicit decisions and limits,
// and penalties for repeated numbers, vague fragments, and questions.
Enter fullscreen mode Exit fullscreen mode

The model supplies the meaning-based vectors that drive selection. The follow-up list is a separate, explicitly labelled keyword heuristic. It distinguishes concrete negative requirements from action cues, and skips common waived obligations and discussion questions. It does not infer every intention or handle every complex negation.

A worker keeps the interface responsive. Cancel and timeout terminate that worker instead of leaving a request running in the background. That also prevents a late completion from overwriting a later request.

Why Does Open Innovation Matter?

An open embedding model makes this a tool a person can run without signing up for a hosted inference service. Notes are not sent to an inference server, and the app does not save their contents.

The model and runtime are still network downloads on first use; their hosts receive ordinary asset requests. Browser caching can help repeat visits, but the app does not promise offline startup.

The model can be replaced with a compatible embedding model. The scoring code is visible and adjustable. Neither requires permission from an API vendor or a per-request budget.

Keeping this extractive also makes the output easier to inspect: it selects text that exists in the notes rather than generating new facts. That does not guarantee a complete summary, so the original sentences remain one click away.

What I Learned

The first-run download deserves a visible status message. A model worker needs a real cancellation path. A tiny local tool also benefits from a narrow job: selecting source-linked sentences has a smaller failure surface than asking a small model to emit a perfect structured plan.

The app accepts up to 50,000 characters and 400 sentences, rejects oversized input without silently cutting it, and exports a Markdown digest. It is English-oriented, and the keyword cue list can miss implied tasks. Transcript chatter and speaker labels are filtered for ranking, while source quotations remain intact. Short notes return fewer highlights instead of simply copying every sentence.

Ten regression tests pass. Browser checks covered short notes, repeated speaker turns, negative instructions, literal HTML-like input, blank and oversized input, cancellation and retry, source navigation, and Markdown export. Dense transcripts still yield rough extractive highlights; the tool does not rewrite disfluent speech or guarantee complete rule coverage.

Two DEV accounts informed the implementation choices:

Their performance figures describe their projects, not Sloth Notes. No application code was copied from either post.

Top comments (0)