OriginChain
Industries · inventory, recommendations, reviews

AI database for retail & e-commerce. Inventory, recommendations, and reviews on one store.

The problem

Retailers run inventory in one system, recommendations in another, review search in a third, and weekly analytics in a Snowflake warehouse — and the stock count never matches across them.

The OriginChain answer

OriginChain holds the SKU master, image embeddings, inventory, orders, and reviews on one substrate. HNSW returns visually similar SKUs at recall@10 = 0.96 with p99 109 ms (high_recall, default) — or p99 37 ms in fast mode when a re-ranker handles the final ordering. SQL HAVING surfaces underperforming categories in 60 ms, BM25 ranks negative reviews mentioning 'leak' in 22 ms, and the same bearer token serves the recommendation rail and the ops board.

vector recall@10 · 100k
0.96
SQL group-by p99
< 70 ms
BM25 search p99
< 25 ms
freshness
single-digit ms write-to-read
what they use OriginChain for

One bearer token. One endpoint. Every query shape.

Each example below is a real call against the public HTTP API. Copy the curl, set $OC_TOKEN, and you'll see the same shape of response your app gets in production. Latency numbers are measured against a Storm-tier instance in ap-south-1.

Schemas you'd register

Register these once via oc schema put or the /v1/schema endpoint, and every example below resolves against them.

schema purpose key fields
catalog_skus SKU master sku_id · name · category · unit_price
catalog_embed Product image / text embeddings sku_id · embedding[512]
inventory Stock per warehouse sku_id · warehouse_id · qty_on_hand · qty_reserved
orders Order stream order_id · ts · sku_id · qty · city · status
reviews Customer review text review_id · sku_id · ts · stars · text

SQL for analytics and reconciliation

Standard SQL with JOIN, GROUP BY, HAVING, and window functions against the same store.

sql POST /v1/sql

Categories under 50k revenue this week

request: SELECT category, SUM(qty * unit_price) AS revenue FROM orders o JOIN catalog_skus s ON o.sku_id = s.sku_id WHERE o.ts > now() - interval '7 days' GROUP BY category HAVING SUM(qty * unit_price) < 50000
GROUP BY + HAVING + JOIN · ~62 ms · schemas: orders · catalog_skus
curl
curl -X POST https://oc-acme.ap-south-1.originchain.ai/v1/sql \
  -H "Authorization: Bearer $OC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"sql":"SELECT category, SUM(qty * unit_price) AS revenue FROM orders o JOIN catalog_skus s ON o.sku_id = s.sku_id WHERE o.ts > now() - interval ''7 days'' GROUP BY category HAVING SUM(qty * unit_price) < 50000"}'
response · application/json
{
  "rows": [
    { "category": "Stationery",   "revenue": 41020 },
    { "category": "Garden Tools", "revenue": 28415 }
  ],
  "meta": { "latency_ms": 62 }
}

Vector search for similarity

HNSW with tunable speed/recall. Default high_recall: recall@10 = 0.96 at 100k, p99 109 ms. Fast: p99 37 ms (recall 0.69). Metadata filters during graph traversal.

vector · hnsw POST /v1/vector/topk

Eight SKUs visually similar to SKU-1044

request: topk against catalog_embed, filtered to the Spices category
recall@10 = 0.96 · p99 109 ms at 100k SKUs (high_recall) · schemas: catalog_embed · catalog_skus
curl
curl -X POST https://oc-acme.ap-south-1.originchain.ai/v1/vector/topk \
  -H "Authorization: Bearer $OC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "schema": "catalog_embed",
    "field":  "embedding",
    "query":  "@SKU-1044",
    "k":      8,
    "metric": "cosine",
    "filter": { "category": "Spices" }
  }'
response · application/json
{
  "rows": [
    { "sku_id": "SKU-1051", "name": "Garam Masala 250g", "score": 0.967 },
    { "sku_id": "SKU-1062", "name": "Spice Blend 500g",  "score": 0.945 }
  ],
  "meta": { "latency_ms": 109, "index_size": 100000, "mode": "high_recall" }
}

Full-text search with BM25

Unicode tokenizer, stop-words, language stemming. Phrase, OR, and field-scoped queries.

Natural-language questions

Plain English in. JSON out. Compiled plan cached after first touch.

natural language POST /v1/ask

Inventory of a SKU across India

request: total inventory of SKU-4832 across every warehouse in India
indexed point lookup + sum · ~41 ms · schemas: inventory · warehouses
curl
curl -X POST https://oc-acme.ap-south-1.originchain.ai/v1/ask \
  -H "Authorization: Bearer $OC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"q":"total inventory of SKU-4832 across every warehouse in India, broken down by warehouse"}'
response · application/json
{
  "value": 12487,
  "by_warehouse": { "BLR-01": 3120, "HYD-02": 2876, "DEL-04": 4201, "MUM-03": 2290 },
  "meta": { "latency_ms": 41, "cache_hit": true }
}
why one substrate

Cross-shape consistency, by construction.

When SQL, vector, full-text, and graph all read from the same hash-keyed k/v store, a row written at 09:14:02.118 is visible to every shape on the next read. No ETL window, no replication lag, no consistency tax across vendors.

single-tenant

Region-isolated dedicated instance

Your data sits in your region, on a dedicated instance with its own keys and its own resource budget. No noisy-neighbour. No shared control plane.

durable

PITR + cross-AZ replication

Every write goes to a durable WAL, replicated to a hot standby in a second AZ. Restore to any second in your retention window.

observable

OTLP metrics + audit log

Per-key latency histograms, hit rate on the plan cache, and an append-only audit log of every privileged action — exported via OTLP to your observability stack.

ready when you are

Ninety seconds to an endpoint. No stack to wire up.

Pick a region, pick a tier, and we provision a single-tenant instance on AWS. The first query you send is the first query we'll show you how to write — in English.

talk to a human