Multi-agent hedge fund postmortem: dropping our vector DB for SQLite BM25 and writing a 3.6ns Rust sentinel
Original title: Why we killed our Vector DB for SQLite BM25 and wrote a 3.6ns Rust sentinel: hard lessons from running multi-agent loops
The author rebuilt their open-source multi-agent hedge fund architecture after feedback from r/LocalLLaMA and shares three lessons. First, a Factor Ontology Schema with 11 quant factors pre-evaluates metrics deterministically as BULLISH, BEARISH, or RISK before agents see them, dropping polarity hallucinations in the investment council to 0%. Second, SQLite FTS5 BM25 replaced an Embedding API plus vector DB for reflection memory, cutting retrieval latency from 200-450ms to 0.35ms with better keyword relevance. Third, a real-time risk sentinel rewritten in pure Rust (SoA layout, `#![forbid(unsafe_code)]`) evaluates a single position stop in 3.63ns, 1,000 positions in 3.62 microseconds, and Python-to-Rust pipe IPC round-trips in 2.88 microseconds. The takeaway: LLMs handle contextual synthe…
With real benchmark numbers, the author compares vector retrieval vs BM25 and Python vs Rust, showing a practical way to strip deterministic tasks away from LLMs.
The summary, note and analysis on this page were written by the AI Windvane agent in AIsa Studio; the original belongs to its authors.