<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/i-built-a-storage-engine-to-replace-vector-rag-it-lost-here-s-the-diagnosis--ejatpcy3h" -->

---
title: I Built a Storage Engine to Replace Vector RAG. It Lost....
description: The author built HiveMind, a graph-native retrieval system in Go designed to replace vector RAG by moving semantic segmentation to write time using an LLM. The...
canonical: https://daily.dev/posts/i-built-a-storage-engine-to-replace-vector-rag-it-lost-here-s-the-diagnosis--ejatpcy3h
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: I Built a Storage Engine to Replace Vector RAG. It Lost. Here’s the Diagnosis. | daily.dev
og:description: The author built HiveMind, a graph-native retrieval system in Go designed to replace vector RAG by moving semantic segmentation to write time using an LLM. The...
og:url: https://daily.dev/posts/i-built-a-storage-engine-to-replace-vector-rag-it-lost-here-s-the-diagnosis--ejatpcy3h
og:image: https://api.daily.dev/og/posts/EjATPcy3H.png
og:image:alt: I Built a Storage Engine to Replace Vector RAG. It Lost. Here’s the Diagnosis.
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# I Built a Storage Engine to Replace Vector RAG. It Lost. Here’s the Diagnosis.

**[Medium](https://daily.dev/sources/medium_js)** · 15 min read · 1 upvotes · 0 comments

## Summary

The author built HiveMind, a graph-native retrieval system in Go designed to replace vector RAG by moving semantic segmentation to write time using an LLM. The storage engine features a B+Tree, MVCC, write-ahead log, and auto-splitting files served over gRPC. In benchmarks, plain vector RAG consistently outperformed HiveMind on both recall and LLM-judge scores across all corpus sizes. Rather than dismissing the result, the author ran two ablations: first loosening the topic-selector's k from 3 to 5 (no change), then instrumenting the candidate pool — discovering a median pool size of 1 candidate, with 3 queries receiving zero candidates. This revealed the bottleneck was in candidate retrieval, not graph traversal, meaning the core write-time segmentation hypothesis was never actually tested fairly. The post also documents a silent instrumentation bug that returned empty results without errors, emphasizing that measurement code deserves the same scrutiny as production code.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/@aaryanmhjn/i-built-a-storage-engine-to-replace-vector-rag-it-lost-heres-the-diagnosis-b1b6ad0c6385>

## Questions this post answers

### Why did increasing the topic-selector's k from 3 to 5 not improve recall in a graph-based RAG retrieval system?

Recall and precision stayed identical to three decimal places, showing the selector was not capacity-constrained. The real bottleneck was upstream: the candidate pool feeding the selector had a median size of only one document per query, with three of thirty-two queries receiving zero candidates, so extra selection capacity had nothing to fill.

_Anyone diagnosing a stalled RAG pipeline can track deeper engineering breakdowns like this on daily.dev._

### Why did a custom graph-native retrieval system built in Go lose to plain vector RAG on recall and answer quality?

The write-time topic segmentation approach lost at every corpus size in a benchmark against plain vector RAG and a GraphRAG baseline because a starved candidate-retrieval component upstream of the graph traversal was feeding the selector a median of one candidate per query. The core hypothesis about graph traversal beating chunk similarity was never actually given a fair test.

_Developers weighing graph retrieval against vector search follow honest benchmark write-ups like this via daily.dev._

### How can I avoid building on top of a silently broken instrumentation or measurement layer when diagnosing a system's performance?

Apply the same adversarial testing to measurement code as to the system itself. An instrumentation bug caused a reprovisioning call to clobber a wrapped client, so the first diagnostic run silently returned an empty result that looked like a legitimate finding rather than crashing with an error, nearly leading to a false conclusion before the result was scrutinized as suspiciously clean.

_Engineers building diagnostic pipelines can find similar debugging lessons through daily.dev._

## Similar posts on daily.dev

- [I Stopped Using Vector Databases. My RAG Got Better.](https://daily.dev/posts/i-stopped-using-vector-databases-my-rag-got-better--msjc5zpqk) · Medium · 0 upvotes · 0 comments
- [Vector RAG Isn’t Enough — I Built a Context Graph Layer for Multi-Agent Memory](https://daily.dev/posts/vector-rag-isn-t-enough-i-built-a-context-graph-layer-for-multi-agent-memory-wauf53bch) · Towards Data Science · 1 upvotes · 0 comments
- [Cheap RAG in Go with Gemini File Search: no vector DB, two calls, one hosted store](https://daily.dev/posts/cheap-rag-in-go-with-gemini-file-search-no-vector-db-two-calls-one-hosted-store-w6ioepzbn) · Awesome Go · 1 upvotes · 0 comments
- [GraphRAG Is an Inference Problem, Not a Database Problem](https://daily.dev/posts/graphrag-is-an-inference-problem-not-a-database-problem-hjizpgx4d) · DigitalOcean Community · 3 upvotes · 1 comments

---

Tags: [#golang](https://daily.dev/tags/golang), [#rag](https://daily.dev/tags/rag)

[View this post on daily.dev](https://daily.dev/posts/i-built-a-storage-engine-to-replace-vector-rag-it-lost-here-s-the-diagnosis--ejatpcy3h)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"I Built a Storage Engine to Replace Vector RAG. It Lost. Here’s the Diagnosis.","url":"https://daily.dev/posts/i-built-a-storage-engine-to-replace-vector-rag-it-lost-here-s-the-diagnosis--ejatpcy3h","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/i-built-a-storage-engine-to-replace-vector-rag-it-lost-here-s-the-diagnosis--ejatpcy3h"},"datePublished":"2026-07-26T19:36:22.535Z","dateModified":"2026-09-14T07:51:46.127Z","description":"The author built HiveMind, a graph-native retrieval system in Go designed to replace vector RAG by moving semantic segmentation to write time using an LLM. The...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d6ab0a9a223ee01bc82d647f54feb2d2?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d6ab0a9a223ee01bc82d647f54feb2d2?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Medium","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Medium","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/medium","url":"https://daily.dev/sources/medium_js"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/i-built-a-storage-engine-to-replace-vector-rag-it-lost-here-s-the-diagnosis--ejatpcy3h","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"golang,rag","timeRequired":"PT15M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Medium","item":"https://daily.dev/sources/medium_js"},{"@type":"ListItem","position":3,"name":"I Built a Storage Engine to Replace Vector RAG. It Lost. Here’s the Diagnosis."}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/i-built-a-storage-engine-to-replace-vector-rag-it-lost-here-s-the-diagnosis--ejatpcy3h#faq","mainEntity":[{"@type":"Question","name":"Why did increasing the topic-selector's k from 3 to 5 not improve recall in a graph-based RAG retrieval system?","acceptedAnswer":{"@type":"Answer","text":"Recall and precision stayed identical to three decimal places, showing the selector was not capacity-constrained. The real bottleneck was upstream: the candidate pool feeding the selector had a median size of only one document per query, with three of thirty-two queries receiving zero candidates, so extra selection capacity had nothing to fill. Anyone diagnosing a stalled RAG pipeline can track deeper engineering breakdowns like this on daily.dev."}},{"@type":"Question","name":"Why did a custom graph-native retrieval system built in Go lose to plain vector RAG on recall and answer quality?","acceptedAnswer":{"@type":"Answer","text":"The write-time topic segmentation approach lost at every corpus size in a benchmark against plain vector RAG and a GraphRAG baseline because a starved candidate-retrieval component upstream of the graph traversal was feeding the selector a median of one candidate per query. The core hypothesis about graph traversal beating chunk similarity was never actually given a fair test. Developers weighing graph retrieval against vector search follow honest benchmark write-ups like this via daily.dev."}},{"@type":"Question","name":"How can I avoid building on top of a silently broken instrumentation or measurement layer when diagnosing a system's performance?","acceptedAnswer":{"@type":"Answer","text":"Apply the same adversarial testing to measurement code as to the system itself. An instrumentation bug caused a reprovisioning call to clobber a wrapped client, so the first diagnostic run silently returned an empty result that looked like a legitimate finding rather than crashing with an error, nearly leading to a false conclusion before the result was scrutinized as suspiciously clean. Engineers building diagnostic pipelines can find similar debugging lessons through daily.dev."}}]}
```

