build log 07 · retrieval · 2026-10 → 2026-11
A brain learning to search itself
It started as the most honest question in homelabbing: "I'm not sure how I would use qdrant and what it will do for my setup." It ended as the retrieval layer this whole operation runs on.
Grep finds the word you typed. It does not find the thing you meant. When the document archive is a personal vault — journals, notes, recipes, financial records — searches arrive phrased nothing like the originals: "the anger stuff about the house," "how I felt after the split." That gap is what a vector database is for.
The build, in the order it actually happened:
- The question (Oct 12): should the retired laptop run qdrant, and what would it even add? The plan-before-the-build: install first, understand later. Refused. The understanding came first, in a genuine back-and-forth about what embeddings do and which layer of the stack would actually talk to the database.
- The pipeline: a small script walks the vault, splits every document into chunks under 1,000 characters, strips markup and URL noise (a URL is ten-plus tokens of nothing), embeds each chunk into a 1,024-dimensional vector with a local model on CPU, and stores the vectors plus the original text in qdrant on the retired laptop. A nightly job re-indexes the diff — only changed chunks get embedded.
- Query day: ask a fuzzy question in plain language; the same embedding turns it into a vector; the database returns nearest chunks. A hit is a pointer to a note, not a quotation of it.
What the tutorials don't tell you
The interesting engineering was hygiene, not magic. Cosine similarity answers "is this text about the same topic," which means one long note's adjacent chunks can eat every result slot — measured: 14 of 15 test queries returned only two or three distinct documents. The fix that beat every reranking idea: cap results at two chunks per file. An audiobook export of 69 files was hijacking every book query; it got excluded, collection shrinking from 1,294 points to 916 while the vault itself stayed byte-identical. Exclusion is curation, not deletion.
Then the best part: a planned "stage two" reranker model — the fancier search upgrade every RAG article recommends. Before building it, fifteen realistic queries were run through the existing pipeline and measured. The score bands the reranker was supposed to rescue barely existed; the right documents were already in the top six. Verdict, recorded: decided not to build it, on purpose. The free upgrade arrived instead from the database's new keyword-scoring feature — hybrid search fusing vector similarity with BM25 text scoring, no new model, no new hardware. Live A/B: the exact-phrase query that dense vectors wandered on suddenly ranked the right note first.
The business version of this paragraph is the private-AI pitch: a client's documents, embedded the same way, on a machine in the client's own office. The vault is the proof-of-concept that runs every day.
Semantic search is 10% embedding model and 90% deciding what your corpus is allowed to contain.
Sources: the original planning sessions (2026-10-12), the corpus-hygiene measurements (2026-10-27: per-file cap, exclusions, 15-query rerank probe saved to disk), the hybrid-search A/B runs (2026-11-02) with live query evidence, and the current collection stats.