Categories: FAANG

New and Improved Embedding Model

We are excited to announce a new embedding model which is significantly more capable, cost effective, and simpler to use. The new model, text-embedding-ada-002, replaces five separate models for text search, text similarity, and code search, and outperforms our previous most capable model, Davinci, at most tasks, while being priced 99.8% lower.

Read documentation

Embeddings are numerical representations of concepts converted to number sequences, which make it easy for computers to understand the relationships between those concepts. Since the initial launch of the OpenAI /embeddings endpoint, many applications have incorporated embeddings to personalize, recommend, and search content.







You can query the /embeddings endpoint for the new model with two lines of code using our OpenAI Python Library, just like you could with previous models:

import openai
response = openai.Embedding.create(
  input="porcine pals say",
  model="text-embedding-ada-002"
)

print(response)
{
  "data": [
    {
      "embedding": [
        -0.0108,
        -0.0107,
        0.0323,
        ...
        -0.0114
      ],
      "index": 0,
      "object": "embedding"
    }
  ],
  "model": "text-embedding-ada-002",
  "object": "list"
}

Model Improvements

Stronger performance. text-embedding-ada-002 outperforms all the old embedding models on text search, code search, and sentence similarity tasks and gets comparable performance on text classification. For each task category, we evaluate the models on the datasets used in old embeddings.





Unification of capabilities. We have significantly simplified the interface of the /embeddings endpoint by merging the five separate models shown above (text-similarity, text-search-query, text-search-doc, code-search-text and code-search-code) into a single new model. This single representation performs better than our previous embedding models across a diverse set of text search, sentence similarity, and code search benchmarks.

Longer context. The context length of the new model is increased by a factor of four, from 2048 to 8192, making it more convenient to work with long documents.

Smaller embedding size. The new embeddings have only 1536 dimensions, one-eighth the size of davinci-001 embeddings, making the new embeddings more cost effective in working with vector databases.

Reduced price. We have reduced the price of new embedding models by 90% compared to old models of the same size. The new model achieves better or similar performance as the old Davinci models at a 99.8% lower price.

Overall, the new embedding model is a much more powerful tool for natural language processing and code tasks. We are excited to see how our customers will use it to create even more capable applications in their respective fields.

Limitations

The new text-embedding-ada-002 model is not outperforming text-similarity-davinci-001 on the SentEval linear probing classification benchmark. For tasks that require training a light-weighted linear layer on top of embedding vectors for classification prediction, we suggest comparing the new model to text-similarity-davinci-001 and choosing whichever model gives optimal performance.

Check the Limitations & Risks section in the embeddings documentation for general limitations of our embedding models.

Examples of Embeddings API in Action

Kalendar AI is a sales outreach product that uses embeddings to match the right sales pitch to the right customers out of a dataset containing 340M profiles. This automation relies on similarity between embeddings of customer profiles and sale pitches to rank up most suitable matches, eliminating 40–56% of unwanted targeting compared to their old approach.

Notion, the online workspace company, will use OpenAI’s new embeddings to improve Notion search beyond today’s keyword matching systems.


Read documentation

var initRotate = function () { var rotates = document.querySelectorAll('.js-rotate'); if (!rotates.length) return; // for each set of rotates rotates.forEach(function (r) { // move first child to end every n seconds window.setInterval(function(){ moveToEnd(r, r.firstElementChild); }, 1500); }); }; var moveToEnd = function (parent, child) { parent.removeChild(child); parent.appendChild(child); // append to parent };

var initShowMore = function () { var showmores = document.querySelectorAll('.js-showmore'); showmores.forEach(function (e) { e.addEventListener('click', function () { var showmoreparent = this.parentElement; if (!showmoreparent) return; var more = showmoreparent.querySelector('.js-more'); if (!more) return; more.style.display = 'block'; this.style.display = 'none'; }); }); };

// toggle function var toggle = function (whichIds, otherIds) { for (var i = 0; i < whichIds.length; i++) { var whichId = whichIds[i]; var whichEl = document.getElementById(whichId); if (!whichEl) return; whichEl.style.display = 'block'; } for (var i = 0; i < otherIds.length; i++) { var otherId = otherIds[i]; var otherEl = document.getElementById(otherId); if (!otherEl) return; otherEl.style.display = 'none'; } }; // togglers var initToggler = function () { var togglers = document.querySelectorAll('.js-toggler'); if (!togglers.length) return; for (var i = 0; i < togglers.length; i++) { var toggler = togglers[i]; toggler.addEventListener('click', function (e) { removeActiveTogglers(this.parentElement.querySelectorAll('.js-toggler')); addActiveToggler(this); }); } }; var addActiveToggler = function (el) { el.classList.add('active'); }; var removeActiveTogglers = function (els) { els.forEach(function (el) { el.classList.remove('active'); }); }; // init document.addEventListener('DOMContentLoaded', function () { initRotate(); initShowMore(); initToggler(); });

const customWidth = function (selector) { return (new Library).Generators.observe(function(change) { var width = change(document.querySelector(selector).clientWidth); function resized() { var w = document.querySelector(selector).clientWidth; if (w !== width) change(width = w); } window.addEventListener("resize", resized); return function() { window.removeEventListener("resize", resized); }; }); };

const tables_renders = { "tsTable": "#ts-table", "csTable": "#cs-table", "ssTable": "#ss-table", "tcTable": "#tc-table", }; new Runtime(Object.assign(new Library, {width: customWidth("#ts-table")})).module(notebook_tables, name => { const selector = tables_renders[name]; if (selector) { // key exists return new Inspector(document.querySelector(selector)); } else { return true; } });


Acknowledgments

Thanks to the following for their contributions to this release:
Chris Hallacy, Sherwin Wu, Jessica Shieh, Juston Forte, Aliisa Rosenthal, Katie Mayer

Thanks to the following for their feedback on this post:
Peter Welinder, Logan Kilpatrick, Joannne Jang, Fraser Kelton, Justin Jay Wang, Ruby Chen

AI Generated Robotic Content

Recent Posts

AMA: MiniMax H3 Team — Ask us anything about our open video generation model, training, and future plans

https://preview.redd.it/kihat320ashh1.png?width=1672&format=png&auto=webp&s=a7ccc40ba3fb229ac7ebf57e8e6a314e0ee45646 Hi r/StableDiffusion! u/New-Requirement1419 -> dacongya (Head of H3 Researcher) u/Affectionate-War8374 -> Luigi (H3 Researcher)…

16 hours ago

Designing AI Agents That Can Self-Correct

With the vocabulary and the failure modes in place, here's the build.

16 hours ago

Locking Pretrained Weights via Deep Low-Rank Residual Distillation

The quality of open-weight language models has dramatically improved in recent years. Sharing weights greatly…

16 hours ago

Securing AI agents with temporal policies in Amazon Bedrock AgentCore

Before AI agents, it was generally sufficient for access controls to treat each action as…

16 hours ago

Your agentic summer: No-cost lessons from Google experts to build and scale agents

I’ve talked to developers, IT leaders, and builders who all ask the same question: How…

16 hours ago

One of China’s Most Powerful AI Models Has Also Escaped Containment

Security researchers say that Kimi K3, an open-weight model from China, wandered off to the…

17 hours ago