FG
💻 Software🤖 AI & LLMs

OpenAI's text-embedding-3-large model not compatible with pgvector 5.1

Freshabout 2 years ago
Mar 14, 20260 views
Confidence Score86%
86%

Problem

OpenAI says its new "text-embedding-3-large" embedding model with 3072 dimensions is the "new best performing model" with significantly higher score than "ada v2". See: https://openai.com/blog/new-embedding-models-and-api-updates I use only HNSW indexing with cosine distance. I gave it a try by modifying the src/hnsw.h as follows: -#define HNSW_MAX_DIM 2000 +#define HNSW_MAX_DIM 8192 But when insert records, it gives following error: Database error: failed to add index item to "xyz_cosine_idx" The "failed to add index item to" are only referenced in following files: ./src/ivfbuild.c ./src/ivfinsert.c ./src/hnswinsert.c ./src/hnswvacuum.c ./src/hnswbuild.c They point to BlockNumber and OffsetNumber based functions which I'm not familiar with. If someone could develop a patch against pgvector 5.1, I can give it a try and update here. Best regards Sagara

Error Output

error:
Database error: failed to add index item to "xyz_cosine_idx"

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Moderate Confidence Fix
84% confidence100% success rate2 verificationsLast verified Mar 14, 2026

Solution: OpenAI's text-embedding-3-large model not compatible with pgvector 5.1

Low Risk

Yes, dimensions above 2,000 is still not supported yet. The decision to ignore the elephant in the room (OpenAI's text-embedding-3-large) is puzzling.

84

Trust Score

2 verifications

100% success
  1. 1

    Yes, dimensions above 2,000 is still not supported yet.

    Yes, dimensions above 2,000 is still not supported yet.

  2. 2

    The decision to ignore the elephant in the room (OpenAI's text-embedding-3-large

    The decision to ignore the elephant in the room (OpenAI's text-embedding-3-large) is puzzling.

Validation

Resolved in pgvector/pgvector GitHub issue #442. Community reactions: 1 upvotes.

Verification Summary

Worked: 2
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

pgvectorembeddingsvector-search