Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: Update OpenAIEmbeddings' default model to text-embedding-3-small #313

Merged
merged 1 commit into from
Jan 26, 2024

Conversation

davidmigloz
Copy link
Owner

@davidmigloz davidmigloz commented Jan 26, 2024

The new default model of OpenAIEmbeddings wrapper is now text-embedding-3-small.

If you are not planning to migrate to text-embedding-3-small, you have to explicitly set the model to text-embedding-ada-002, otherwise text-embedding-3-small will be used.

final embeddings = OpenAIEmbeddings(
  apiKey: openaiApiKey,
  model: 'text-embedding-ada-002',
);

https://openai.com/blog/new-embedding-models-and-api-updates#new-embedding-models-with-lower-pricing

text-embedding-3-small is our new highly efficient embedding model and provides a significant upgrade over its predecessor, the text-embedding-ada-002 model released in December 2022.

Stronger performance. Comparing text-embedding-ada-002 to text-embedding-3-small, the average score on a commonly used benchmark for multi-language retrieval (MIRACL) has increased from 31.4% to 44.0%, while the average score on a commonly used benchmark for English tasks (MTEB) has increased from 61.0% to 62.3%.

Reduced price. text-embedding-3-small is also substantially more efficient than our previous generation text-embedding-ada-002 model. Pricing for text-embedding-3-small has therefore been reduced by 5X compared to text-embedding-ada-002, from a price per 1k tokens of $0.0001 to $0.00002.

We are not deprecating text-embedding-ada-002, so while we recommend the newer model, customers are welcome to continue using the previous generation model.

@davidmigloz davidmigloz merged commit 4346348 into main Jan 26, 2024
1 check passed
@davidmigloz davidmigloz deleted the text-embedding-3-small branch January 26, 2024 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c:embeddings Embeddings. p:langchain_openai langchain_openai package. t:enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

1 participant