Aeion Search + OpenAI Embeddings

OpenAI's `text-embedding-3-small` ($0.02/1M tokens) is the default cost-effective embedding for most workloads — 1536 dimensions, MTEB score 62.3, sub-100ms latency. For accuracy-critical workloads, `text-embedding-3-large` (3072 dim, MTEB 64.6, $0.13/1M tokens) is the premium tier. Aeion Search routes embedding calls through the platform AI gateway with per-tenant BYOK, async refresh on record save, A/B model testing, and Matryoshka dimension reduction for storage cost optimization.

What OpenAI Embeddings Integration Provides

`

Matryoshka Dimension Reduction

OpenAI 3-series embeddings are Matryoshka-trained — you can truncate to lower dimensions with minimal accuracy loss.

A/B Testing Embedding Models

Run multiple embedding models side-by-side to compare retrieval quality.

Production Setup Walkthrough

```bash

FAQ

OpenAI Assistants API has a vector store, but it's tied to their threads abstraction, lacks RBAC, can't federate across collections, and bills separately. Aeion Search uses OpenAI for embeddings only — retrieval stays in your Postgres.

OpenAI's tier-1 limit is 5000 RPM for embedding-3-small. Aeion Search's embedding worker respects per-tenant TPM/RPM with backoff + queue.

100K product descriptions (200 tokens avg) = $0.40 one-time. Daily refresh on 1K updated records = $0.004/day. Yearly: ~$1.50 for a 100K-product catalog.

Rule of thumb: 1 token ≈ 4 characters of English. `tiktoken` library exposed via the AI module for exact counts.

OpenAI's standard API doesn't retain content for training (per their data-usage policy). For sensitive workloads, use Azure OpenAI (zero-retention guarantee) — Aeion Search supports both transparently.

Add the new column, backfill async, shadow-test, cut over, drop the old column. Aeion Search ships the multi-column pattern out of the box.

Chunk before embedding. Aeion Search's chunking pipeline supports sentence / paragraph / sliding-window strategies with configurable overlap.

Query embedding takes 30-80ms. Cache popular queries at the gateway for sub-10ms hits. Pre-embed canonical queries offline for ultra-low-latency.

OpenAI versions API explicitly. `text-embedding-3-small` is stable. If they release `text-embedding-4-small` in the future, you re-embed side-by-side and A/B test.

OpenAI embeddings at 0% markup.