Our test folder held 2,000 notes written over six years, in plain text and markdown. The first questions we asked, such as “what did I decide about the garden fence?”, returned the right note in under four seconds. Setting it up took about 45 minutes, most of it spent on the script.
Searching by keyword fails when you do not remember the words you used. A local retrieval setup finds notes by meaning, then asks a model to answer using only what it found. Loom Runner provides both the embedding model and the answering model.
Install the pieces
Create a project folder and a virtual environment, then install the small helper library.
mkdir notes-search && cd notes-search
python3 -m venv .venv && source .venv/bin/activate
pip install loom-client numpy
loom pull wren-embed
loom pull wren-7b
Split the notes into chunks
Cut at paragraph breaks where you can, not at a fixed number of characters. A chunk that begins in the middle of a sentence is hard for the model to use. Keep a heading with the paragraphs under it, so that each chunk knows what it is about.
Retrieval works on pieces, not whole files. Cut each note into chunks of about 300 words with a small overlap so sentences are not sliced in half. Keep the file name and the chunk number with each piece.
Create the index
Save a script called index.py that reads every file, turns each chunk into numbers and saves them next to the text.
python3 index.py ~/Notes
On our machine, 2,000 notes took six minutes. Run it again whenever you add notes: it only processes files that changed.
Keep the index outside the notes folder
A hidden folder in your home directory means a note backup never swallows a gigabyte of numbers.
Write the search step
Turn the question into the same kind of numbers, compare it with every chunk and take the five closest. A plain dot product over a few thousand chunks is fast enough that you do not need a database.
Ask the model, with the context
Give Wren 7B the five chunks and a strict instruction:
loom run wren-7b "Answer using only the notes below. If the answer is not there, say so. Quote the file name for each fact.nn<notes>"
The line “If the answer is not there, say so” matters more than any other word in the prompt.
Test it with questions you know
Ask three questions whose answers you can find yourself, and one that is not in your notes. The last one should get “I cannot find that.”
Do not point it at everything
Keep banking, health and ID files out of the folder you index, even though it is local. A stray backup or sync can expose them.
Run it on a schedule
A simple way to schedule the job is a nightly entry in your system’s task scheduler that runs the index script and writes its output to a log file. Check the log once a week at first. If a run fails quietly, the index goes stale and answers become subtly wrong.
Add a nightly job that updates the index. A search tool people trust is one that is current. For a deeper dive into model speed, see GPU memory tuning in Loom Runner.

Comments
Write a comment