Home Knowledge Base OpenAI Embeddings

OpenAI Embeddings

Overview OpenAI provides API-based embedding models that convert text into vector representations. They are the industry standard for "getting started" with RAG (Retrieval Augmented Generation) due to their ease of use, decent performance, and high context window.

Models

1. text-embedding-3-small (New Standard)

2. text-embedding-3-large

3. text-embedding-ada-002 (Legacy)

Dimensions & Matryoshka Learning The new v3 models support shortening embeddings (e.g., from 1536 to 256) without losing much accuracy. This saves massive amounts of storage in your vector database.

Usage

from openai import OpenAI
client = OpenAI()

response = client.embeddings.create(
    input="The food was delicious",
    model="text-embedding-3-small"
)

vector = response.data[0].embedding
**[0.0023, -0.012, ...]**

Comparison

openai embeddingadatext

Explore 500+ Semiconductor & AI Topics

From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.