Skip to main content

FiftyFive Tech

Email Us sales@fiftyfivetech.io
Get in Touch
Case Study | Embeddable Vector Search for AI Applications

Building a High-Performance Embeddable Vector Search Engine

AI/ML Vector Database C++ / Python Engineering Database Engineering

FiftyFive built an embeddable vector database combining a high-performance C++ HNSW index with persistent LSM storage, BM25 keyword search, and metadata filtering. The engagement covered AI/ML engineering, C++ and Python development, transactional recovery, and performance optimisation across the complete retrieval stack.

Build Your Platform With Us
The Client

Overview

The client needed a high-performance vector database combining semantic search, persistent storage, keyword retrieval, metadata filtering, and reliable recovery inside an application-owned environment rather than an externally hosted service.

The Need

Challenges

The engine had to keep an in-memory HNSW graph, persisted document store, and transaction log consistent through inserts, deletes, rollbacks, crashes, and restarts while maintaining retrieval speed and relevance.

  • HNSW traversal and durable LSM storage had opposing design assumptions but required one consistent state.
  • Deleted and rolled-back documents could not corrupt graph connectivity or appear in results.
  • Semantic and lexical retrieval scores required calibration into one defensible ranking.
  • Metadata filters needed pushdown before expensive vector scoring.
  • Advanced retrieval features had to remain configurable rather than mandatory.
  • AVX2/FMA optimisation required portable runtime fallback.
  • Corrupted or partial index files needed deterministic recovery.
Our Approach

Solution

FiftyFive built a single embeddable engine layering a C++ HNSW index over persistent LSM storage. A hybrid query layer combines semantic and BM25 retrieval, while WAL recovery and deterministic ID mapping keep vector and document state aligned.

Persistent LSM storage engine

FiftyFive built durable LSM-based storage beneath the vector index for predictable writes and transactional persistence.

  • Write-ahead logging supports ordering and crash recovery.
  • Memtables buffer writes before SSTable flushes.
  • Background compaction reclaims space and controls read amplification.

C++ HNSW vector index

FiftyFive implemented graph-based approximate nearest-neighbour search in C++ for high-dimensional vectors.

  • Configurable construction and search parameters tune quality and latency.
  • Deterministic IDs map graph nodes to persisted documents.
  • Ghost nodes and rebuilds protect graph integrity during churn.

Hybrid retrieval and filter pushdown

FiftyFive combined HNSW semantic similarity with BM25 lexical search and pre-scoring metadata filters.

  • A positional inverted index supports exact-term retrieval.
  • Hybrid ranking merges semantic and lexical candidates.
  • Exact, range, OR, NOT, and multi-key filters narrow candidates early.

Advanced retrieval and compression

FiftyFive added configurable optimisation for relevance quality, recall, and memory use.

  • MMR diversifies results and query expansion improves recall.
  • Score calibration and reranking refine final ordering.
  • Product Quantization and optional IVF support different performance profiles.

Recovery and production controls

FiftyFive built operational safeguards for embedding the database directly into production applications.

  • WAL recovery restores committed state after interruption.
  • Corruption detection and three-tier restoration recover damaged indexes.
  • Runtime dispatch selects AVX2/FMA or portable vector computation.
Technology

Tech Stack

Languages

C++Python

Vector Indexing

HNSWIVF

Storage Engine

LSMWALMemtablesSSTables

Lexical Retrieval

Okapi BM25Inverted Index

Retrieval Optimisation

Hybrid SearchMMRReranking

Compression

Product Quantization

Performance

AVX2FMARuntime Dispatch

Reliability

Transactional PersistenceCorruption Detection

Operations

TelemetryThread Safety
Experts

Team

-

The Impact

Results

Project Duration-

FiftyFive delivered one embeddable architecture for persistent vector search and hybrid information retrieval, providing semantic search, keyword retrieval, durable storage, and recovery without an external hosted dependency.

Embeddable Architecture

Vector search runs inside the application environment without a separately hosted database service.

Hybrid Retrieval

Combined HNSW similarity and BM25 matching improve conceptual and exact-term relevance.

Durable Persistence

Transactional LSM storage and WAL recovery keep vector and document states consistent.

Configurable Performance

Tunable indexes, compression, and optional IVF balance recall, latency, and memory.

Support

FAQs

A vector database stores numerical embeddings and retrieves results by similarity, using approximate nearest-neighbour indexes such as HNSW for semantic search, recommendations, and RAG.

HNSW is a layered graph index that finds nearby high-dimensional vectors efficiently, with configurable construction and search parameters balancing recall, build time, and latency.

Embeddable databases remove network hops and external dependencies while keeping data inside the application environment. Hosted databases reduce operational setup but add service dependency and latency.

Hybrid search combines semantic vector similarity with keyword retrieval such as BM25, improving relevance for both concepts and exact identifiers, codes, or rare terms.

Filter pushdown narrows candidates before expensive vector scoring, avoiding computation on results that would later be removed by exact, range, OR, NOT, or multi-key conditions.

Production RAG requires persistent document storage, vector indexing, keyword search, metadata filters, ranking, consistency guarantees, and crash recovery in addition to embeddings and an LLM.

HNSW deletions can use ghost-node marking to preserve graph connectivity, exclude deleted records from results, and later rebuild the index to reclaim structure safely.

Product Quantization compresses embeddings into smaller representations, allowing larger indexes within the same memory budget with a controlled trade-off in retrieval precision.

Write-ahead logging records changes before application, while corruption detection and tiered restoration recover committed state and keep the index aligned with document storage.

Custom vector databases support AI, analytics, LegalTech, healthcare, financial services, and enterprise knowledge applications with proprietary data, residency, or latency requirements.

Cost and timeline depend on index types, persistence guarantees, hybrid retrieval, filtering, compression, recovery behaviour, operational controls, and performance requirements.

Vector database work needs systems engineers experienced in C++, index structures, persistence, and performance, alongside AI engineers who understand embeddings, ranking, retrieval, and evaluation.

Get in touch

Contact Us

Book a call or fill out the form below and we’ll get back to you once we’ve processed your request.

    By submitting this form, you agree that FiftyFive Technologies may process your information to review your request and contact you. Read our Privacy Policy for more details.