I Forgot the Words, Not the Memory: Building Ghostlight
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine . What I Built I typed “music during a power cut.” The note I wanted used neither “music” nor “power cut.” It described a monsoon blackout, a little red radio with dead batteries, and Grandma humming songs on the kitchen floor. Ghostlight found it. That small connection is the project: a memory…
This submission for the Hacktoberfest Open-Source AI Challenge Week 4 focuses on a project called Ghostlight. The idea behind Ghostlight is to create a memory archive that users can search through when they remember a moment, but have forgotten the words associated with it. The project utilizes an open-source embedding model that runs in the user's browser to retrieve the saved passages.
The project takes inspiration from the concept of a ghost as a trace left in an archive, such as a recipe, a familiar song, or someone waiting on a railway platform. The machine's job is to make that trace accessible again. Each result displayed by the system shows the original text.
Ghostlight includes six example memories, all fictional, to allow anyone to try the concept without sharing any private family stories. Users can add their own short memories or import an existing archive. To demonstrate the functionality, you can visit the Ghostlight demo on a Chromium browser.
During the testing phase on November 1st, 2026, the actual WebAssembly model returned the following results for the search "music during a power cut": "Radio in the rain" with a similarity score of 0.395, "The blue bicycle" with a similarity score of 0.405, and "No close connection found" with a score of 0.057. These results show the nearest original passages to the search query, clearly labeled as weak matches.
The threshold for displaying these weak matches is set at 0.25, which is a simple interface heuristic and not a calibrated confidence boundary. Users can add a fictional memory and export the archive as JSON, which can then be imported to retrieve the words again. Saving in the browser is optional, with the default setting being session-only.
The first visit to the website downloads approximately 23 MB of model weights and runtime files, and an internet connection is required for this download. Subsequent inference processes the notes and query on the device, with browser caching potentially affecting the ability to operate entirely offline.
The code for Ghostlight is available under the MIT license, with the README crediting the model and dependencies under their respective licenses. The implementation uses plain HTML, CSS, and JavaScript, served as static files. The central component is the all-MiniLM-L6-v2 model, accessed through Xenova's ONNX conversion. The Transformers.js library, version 3.8.1, runs the quantized model with WebAssembly inside a Web Worker.
The retrieval process involves converting each saved passage into an embedding, using mean pooling and normalization, and converting the search phrase into an embedding with the same model. The vectors are then compared using cosine similarity and ranked. The retrieved text is shown exactly as it was stored.
To ensure the application runs smoothly and efficiently, all model loading and inference are performed in a separate worker thread, away from the interface thread. Embeddings for unchanged notes are cached, and entries are evicted when their source text changes. The model and library versions are pinned to make the implementation easier to reproduce. A bug was discovered during testing, which was fixed by using a getRandomValues fallback for the crypto.randomUUID function, which was unavailable in the HTTP preview origin.
The testing process verified that adding a fictional note, saving it across a reload, exporting it, and importing it again all worked as intended. The repository also includes browser observations and a separate reproducible CPU-inference test, with scores potentially varying between the CPU and browser backends. The current version of Ghostlight has been designed to handle a small archive, with a maximum of 100 notes, each containing up to 1,000 characters.
The project has been tested for English paraphrases, and bigger claims about handling long family histories and multilingual retrieval would require further evaluation.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.