All insights

Build a Vector Search Platform, Not a Feature

December 1, 2026 · 7 min read

Vector SearchEmbeddingsAI EngineeringArchitecture
Build a Vector Search Platform, Not a Feature

Semantic search often starts as a contained feature: embed a few thousand documents, load them into a vector database, and retrieve the nearest matches. The prototype works quickly. The difficult engineering begins when multiple products, teams, data sources, and access models depend on it.

At that point, the problem is no longer choosing an approximate nearest-neighbor algorithm. It is building a shared retrieval platform that keeps source data, embeddings, metadata, permissions, and indexes consistent while serving predictable results under load.

The right architecture separates those responsibilities. A vector database is an important component, but it is not the whole system.

Start with the retrieval contract

Before selecting infrastructure, define what callers can expect from retrieval. Without a contract, every team invents its own chunking, filters, ranking logic, and failure behavior. Relevance becomes impossible to compare, and migrations become unnecessarily risky.

A useful retrieval contract should specify:

  • The searchable unit: document, passage, product, ticket, image, or another entity.
  • Required metadata and filter semantics.
  • Tenant and authorization boundaries.
  • Supported query modes, such as text, vector, hybrid, and filtered search.
  • Result fields, scores, ranking stages, and maximum result counts.
  • Latency objectives and behavior during partial failure.
  • Freshness expectations for inserts, updates, and deletions.

Do not expose the vector database API directly to every application. Put a retrieval service between callers and storage. That service owns query validation, embedding generation, filters, authorization, ranking, observability, and compatibility.

This boundary also prevents infrastructure details—collection names, index parameters, model dimensions—from leaking into product code.

Treat embeddings as typed data

An embedding is not just an array of floating-point numbers. Its meaning depends on the model, model version, input preparation, task, dimensionality, and distance function.

Store that context explicitly. A practical embedding record includes:

  • Stable source and chunk identifiers.
  • Model and preprocessing versions.
  • Vector dimension and similarity metric.
  • Source content checksum.
  • Creation timestamp and pipeline run identifier.
  • Tenant, locale, and access-control metadata.

This is effectively a type system for vectors. It prevents a common class of failures: mixing incompatible vectors because they happen to have the same dimension or live in the same collection.

Use immutable embedding versions. If a preprocessing rule or model changes, create a new version rather than silently overwriting existing vectors. Applications can then select an explicit version, and platform teams can compare versions before changing production traffic.

The source system should remain authoritative. The vector store is a derived projection optimized for retrieval, not the master copy of documents or permissions.

Build ingestion for reconciliation, not only throughput

Embedding pipelines are usually designed as a sequence: read content, chunk it, generate vectors, and upsert records. That happy path is insufficient at scale. Events are duplicated, updates arrive out of order, workers fail after partial writes, and deletes are missed.

Design every stage to be idempotent. Derive deterministic identifiers from the source entity, chunk identity, and embedding version. Reprocessing the same input should converge on the same state instead of creating duplicates.

The pipeline also needs a reconciliation loop. Periodically compare the authoritative source inventory with the searchable projection. Detect missing records, stale checksums, orphaned chunks, incorrect permissions, and incomplete deletions.

This matters because queue health does not prove index correctness. A pipeline can consume every event successfully while persisting the wrong state.

Track freshness separately from availability. Search may be healthy while newly published content is several hours behind. Measure ingestion lag by source, tenant, and priority class so one noisy source does not hide another source's failure.

Separate candidate generation from ranking

Vector similarity is useful for finding plausible candidates, but raw nearest-neighbor order is rarely the best final ranking. Production retrieval usually benefits from a staged pipeline:

  1. Parse the query and establish tenant, permissions, and filters.
  2. Generate candidates from vector and lexical indexes.
  3. Merge and deduplicate candidate sets.
  4. Rerank a limited pool using stronger signals or a model.
  5. Apply diversity, freshness, or business constraints.
  6. Return results with traceable ranking metadata.

Hybrid retrieval is a sensible default for many enterprise workloads. Semantic matching handles paraphrases and conceptual similarity. Lexical matching preserves exact identifiers, product codes, names, error messages, and specialist terminology.

Keep the stages independently measurable. If one aggregate relevance score is all you capture, you cannot tell whether poor results came from chunking, candidate generation, filtering, or reranking.

At scale, control the candidate budget. Retrieving thousands of vectors only to rerank them with an expensive model produces unpredictable latency and cost. Set explicit limits by workload and degrade deliberately—for example, skip reranking—rather than timing out the entire request.

Make authorization part of retrieval

Filtering results after retrieval is both unsafe and inefficient. Unauthorized records may enter caches, traces, reranking prompts, or generated answers before the final filter executes.

Enforce authorization while generating candidates. Store filterable access attributes alongside each searchable unit, and translate the caller's identity into a constrained retrieval scope. For complex permission graphs, resolve access through a dedicated policy or entitlement service, then pass compact filters to the search layer.

Permissions also change independently of content. Your ingestion design must propagate entitlement updates without requiring unnecessary re-embedding. Separate vector-producing changes from metadata-only updates.

Test revocation latency explicitly. The critical question is not only whether access eventually disappears, but how long stale authorization can remain searchable across indexes, replicas, and caches.

Scale around workload shape

Vector count alone does not determine architecture. Ten million vectors with low request volume may be easier than one million vectors serving strict, highly filtered, multi-tenant queries.

Capacity planning should include:

  • Query rate and concurrency by workload.
  • Vector dimension, precision, and replication factor.
  • Filter selectivity and metadata cardinality.
  • Insert, update, and deletion frequency.
  • Candidate pool and reranking size.
  • Tenant skew and hot partitions.
  • Latency percentiles, not only averages.

Partition using stable operational boundaries such as region, tenant class, or corpus type. Avoid creating a physical collection for every small tenant unless isolation requirements justify the operational overhead. Conversely, do not place all tenants in one unrestricted namespace and rely on application code to remember filters.

Cache carefully. Query-result caches can help repeated workloads, but invalidation becomes complicated when content or permissions change. Embedding caches keyed by normalized input and model version are often safer because their validity is easier to define.

Operate quality and cost as first-class signals

Infrastructure metrics cannot tell you whether search is useful. Maintain representative evaluation sets for major workloads, including exact-term queries, ambiguous language, multilingual content, permission boundaries, and recently updated documents.

Monitor both online and offline signals. Offline measures such as recall at a fixed candidate count help isolate retrieval behavior. Online measures—result opens, reformulations, successful task completion, and downstream answer quality—show whether the system serves users.

Cost must be attributed by tenant, source, model version, and operation. Distinguish embedding generation, vector storage, query execution, and reranking. Otherwise, a single high-churn corpus or oversized candidate budget can quietly dominate platform spend.

Every search response should be traceable to the retrieval configuration that produced it: embedding version, index version, filters, candidate sources, reranker, and relevant timing. That trace makes relevance incidents debuggable rather than anecdotal.

Short takeaway

A scalable semantic-search system is a governed data and retrieval platform, not a thin wrapper around a vector database. Define a stable contract, type and version embeddings, reconcile derived state, enforce permissions during retrieval, and measure each ranking stage. Those choices matter more than benchmark differences between vector engines.