OriginChain
03 · vector

Four metrics. Seven index variants. One write.

Every vector lives inside the same atomic write as the row it describes. HNSW, IVF, IVF-PQ, binary and PQ quantization, sparse, plus predicate-aware over-fetch with `min_score` thresholds that admit empty as a real result.

distance metrics
01
Euclidean (L2)

Default. Geometric distance.

02
Inner Product

For pre-normalized embeddings.

03
Cosine

Direction only. Magnitude ignored.

04
Manhattan (L1)

Robust to outliers. Categorical embeddings.

index variants
01 · GA
Dense HNSW

Layer-0 walker. Graph-based ANN, tunable speed / recall.

02 · GA
IVF

Inverted-file partitioning. The path to 10M+ vectors per tenant.

03 · GA
IVF-PQ

Residualised PQ LUT per cell. 64× memory at D=128, 768× at D=1536. recall@10 = 0.948 at nprobe=4 on the floor.

04 · GA
Binary quant

1-bit-per-dim. 32× memory savings. Pair with HNSW or IVF.

05 · GA
PQ quant

8-bit codebook with LUT scoring. 64× memory at the headline config.

06 · GA
Sparse

First-class put / get / top-k for BM25-style features.

07 · GA
Adaptive over-fetch

Predicate-aware widening. Recall stays at target when WHERE narrows.

hybrid retrieval

Dense + sparse + a SQL filter, in one query.

Most production retrieval is hybrid - semantic similarity for recall, lexical sparse for precision, structural filters for relevance. OriginChain composes them in a single request, against one consistent snapshot.

Add a min_score threshold and an empty result is a real result - not a confidently-wrong nearest neighbour.

request
POST /v1/tenants/:t/vector/search
{
  "schema": "products",
  "k": 10,
  "dense":   { "vector": [...], "metric": "cosine" },
  "sparse":  { "tokens": { "leather": 0.84, ... } },
  "where":   "in_stock = true AND region = 'EU'",
  "min_score": 0.65
}
measured
4 × 7
metrics × index variants
< 30 ms
p99 kNN @ k=10, n=1M dense
64×
memory savings on IVF-PQ at D=128
0
embedding-vs-row consistency lag
roadmap

Read the vector docs, then try it.