Skip to main content

FiftyFive Tech

Email Us sales@fiftyfivetech.io
Get in Touch
A large dimly lit data hall filled with rows of server racks

Data engineering & pipelines

An embeddable vector database with hybrid search and crash recovery

FiftyFive is building an embeddable vector database: C++ HNSW over LSM storage, BM25 hybrid search, filter pushdown and WAL recovery for AI applications.

Talk about retrieval infrastructure
Industry
Data infrastructure software
Region
Solution
Embeddable vector database with hybrid search
Story

About the client

The client needed vector search for AI applications, but not as an external dependency called across a network. Semantic search, keyword retrieval, metadata filtering, durable storage and reliable recovery all had to run inside an application-owned environment, as one embeddable engine.

Challenge

Keeping a vector index and a durable store in agreement

  • Stay consistent. Keep the vector index, the document store and the transaction log aligned through every insert, delete, transaction and recovery.
  • Delete without breaking the graph. HNSW does not support clean node removal, and naive deletion leaves orphaned edges and broken neighbour lists.
  • Combine meaning and exact terms. Vector search misses identifiers and rare tokens; lexical search misses paraphrase. Both had to run over the same corpus.
  • Filter before scoring. Vector scoring is the most expensive step, so exact, range, OR, NOT and multi-key filters had to narrow candidates first.
  • Stay configurable. Reranking, query expansion, diversification, compression and IVF indexing had to be optional, not imposed on every deployment.
  • Run fast on any CPU. Use AVX2 and FMA where available and fall back cleanly where not, from one build.
  • Recover safely. Detect partially written or corrupted index files and restart deterministically, never serving a damaged index.
Solution

What FiftyFive built

A two-person FiftyFive team (one AI engineer, one backend engineer) has built the engine as a single embeddable library. A C++ HNSW vector index sits over an LSM-based storage engine, with a hybrid query layer running semantic and lexical retrieval side by side. Transactional persistence, WAL-based recovery and deterministic ID mapping keep the index and document store aligned. Reranking, query expansion, diversification, compression and optional IVF indexing sit above the core as configurable features.

How the solution works

  1. Persistent LSM storage

    • Writes go first to a write-ahead log for durability and ordering, then into in-memory memtables, which flush to immutable on-disk SSTables.
    • Background compaction reclaims space and controls read amplification.
    • Document writes commit or roll back as a unit.
  2. C++ HNSW index

    • The graph index exposes configurable build parameters for graph quality and search parameters to trade recall against latency per workload.
    • Deterministic node-to-document ID mapping makes every graph hit resolve to its persisted document.
    • Deleted or rolled-back documents become ghost nodes rather than being torn out of the graph, and index rebuilds restore graph health after accumulated churn.
  3. Hybrid retrieval with filter pushdown

    • A positional inverted index supports Okapi BM25 keyword search.
    • Metadata filters (exact, range, OR, NOT and multi-key) are pushed down to narrow the candidate set before vector scoring.
    • HNSW similarity and BM25 scores are merged, calibrated to a common scale and ordered through multi-stage ranking.
  4. Optional retrieval and compression features

    • Maximal Marginal Relevance diversifies results, query expansion broadens recall on sparse queries, and a configurable reranker gives final ordering.
    • Product Quantization compresses stored vectors, and optional IVF indexing offers an alternative retrieval profile.
  5. Recovery, portability and controls

    • WAL replay restores committed state after interruption.
    • Corruption detection identifies damaged index files, and three-tier index restoration gives graduated recovery rather than all-or-nothing failure.
    • Vector distance computation is selected at runtime between portable and AVX2/FMA-optimised paths.
    • Telemetry and thread-safety controls support concurrent use inside a host application.

Technology stack

C++HNSW index, storage engine and distance computation
PythonEngine integration and development
HNSW, optional IVFApproximate nearest-neighbour vector indexing
LSM storage (WAL, memtables, SSTables, compaction)Durable, transactional document and vector storage
Okapi BM25, positional inverted indexKeyword retrieval
MMR, query expansion, score calibration, rerankingHybrid ranking and result quality controls
Product QuantizationCompressed vector storage
AVX2/FMA with runtime dispatchAccelerated distance computation with a portable fallback

What the solution enabled

Outcomes

Business transformation

Embeddable

Vector search, keyword search and storage run inside the application

Hybrid

HNSW semantic similarity with BM25 keyword matching and metadata filtering

Durable

Transactional LSM storage with WAL-based recovery

An embeddable engine

Vector search, keyword search and storage run inside the application, with no separately hosted vector database.

Hybrid retrieval

Queries combine HNSW semantic similarity with BM25 keyword matching and metadata filtering.

Durable persistence

Transactional LSM storage with WAL-based recovery keeps vector and document data consistent through deletes, rollbacks and restarts.

Tunable performance

Index parameters, compression and optional IVF indexing let each deployment balance recall, latency and memory.

FiftyFive Technologies is building an embeddable vector database for a software client that needed semantic search, keyword retrieval, metadata filtering and durable storage inside its own application rather than through a hosted service. The FiftyFive team built a C++ HNSW index over an LSM storage engine with write-ahead logging, Okapi BM25 keyword search, hybrid ranking, metadata filter pushdown and Product Quantization. The engine keeps the vector index, document store and transaction log consistent through inserts, deletes, rollbacks and restarts. Development has been ongoing since April 2026.

FAQ

Technical questions

How do you delete documents from an HNSW index without corrupting the graph?

In the engine FiftyFive Technologies built, deleted or rolled-back documents become ghost nodes instead of being removed from the graph, so neighbour lists and traversal paths stay intact. Deterministic node-to-document ID mapping stops ghost nodes being returned as results, and index rebuilds restore graph health after heavy churn.

How do you merge vector and BM25 scores into one ranking?

The engine runs HNSW similarity and Okapi BM25 over the same corpus, calibrates the two scores to a common scale and orders the combined candidates through multi-stage ranking, with optional MMR diversification and reranking. Metadata filters are applied before vector scoring to avoid wasted computation.

Talk to FiftyFive's engineers about retrieval infrastructure for your AI application.

Book a call

Project snapshot

Industry
Data infrastructure software
Services
AI/ML engineering, vector database development, information retrieval, C++ and Python engineering, performance optimisation
Team
2 engineers (1 AI, 1 backend)
Duration
April 2026 – ongoing
Status
In active development
Core technologies
C++, Python, HNSW, LSM storage with WAL, Okapi BM25, Product Quantization