# Semantic vs search embedding

**URL:** <https://community.openai.com/t/semantic-vs-search-embedding/399517>\
**Category:** API\
**Created:** [September 27, 2023, 7:14am UTC](https://community.openai.com/t/semantic-vs-search-embedding/399517 "2023-09-27T07:14:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mayank11](https://avatars.discourse-cdn.com/v4/letter/m/97f17d/32.png) [@Mayank11](https://community.openai.com/u/Mayank11)\
**Post date:** [September 27, 2023, 7:14am UTC](https://community.openai.com/t/semantic-vs-search-embedding/399517/1 "2023-09-27T07:14:36Z")

</div>

Openai makes distinction between similarity and search embeddings saying that similarity embeddings are more suited to assess if 2 texts are similar while search embeddings are more suited to identify if a short text is closely related to a much longer text.

Which models from openai embeddings specialize in which function? For example, for which use case should text-embedding-ada-002 model be used for?

---

<div class="post-metadata">

**Author:** ![Innovatix](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/innovatix/32/193579_2.png) [@Innovatix](https://community.openai.com/u/Innovatix)\
**Post date:** [September 27, 2023, 7:57am UTC](https://community.openai.com/t/semantic-vs-search-embedding/399517/2 "2023-09-27T07:57:27Z")

</div>

**Semantic embeddings** are better for measuring the similarity between two texts, while **search embeddings** are better for finding long texts that are relevant to a short query.

Example:

- Semantic embedding: What is the similarity between the sentences: ‘The cat sat on the mat’ and ‘The feline sat on the rug’?
- Search embedding: Find all documents in the database that are relevant to the query: ‘What is the capital of France?’

> **[OpenAI Embedding & Semantic Search using Vector data](https://medium.com/@sathishhariram/openai-embedding-semantic-search-using-vector-data-b785ae7079ff)**
>
> Exploring OpenAI Embedding API and Semantic search

> [@Semantic search with Embeddings](https://community.openai.com/t/semantic-search-with-embeddings/33786):
>
> I have a list of animals e.g. bird, dog, fish etc. uploaded as embeddings. I then query this list with the query, “which animal has scales?” Using ADA, the results often show “bird” as having a greater cosine similarity than “fish” for this query. I don’t understand why that would be or whether my understanding of embeddings is incorrect. Would appreciate any guidance.

---

<div class="post-metadata">

**Author:** ![Mayank11](https://avatars.discourse-cdn.com/v4/letter/m/97f17d/32.png) [@Mayank11](https://community.openai.com/u/Mayank11)\
**Post date:** [September 27, 2023, 10:06am UTC](https://community.openai.com/t/semantic-vs-search-embedding/399517/3 "2023-09-27T10:06:33Z")

</div>

What does text-embedding-ada-002 do well - Semantic or Search ?

---

<div class="post-metadata">

**Author:** ![Innovatix](https://sea2.discourse-cdn.com/openai1/user_avatar/community.openai.com/innovatix/32/193579_2.png) [@Innovatix](https://community.openai.com/u/Innovatix)\
**Post date:** [September 28, 2023, 8:39am UTC](https://community.openai.com/t/semantic-vs-search-embedding/399517/4 "2023-09-28T08:39:11Z")

</div>

It can handle both semantic and search tasks well

> **[New and improved embedding model](https://openai.com/blog/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.

> **[OpenAI Platform](https://platform.openai.com/docs/guides/embeddings)**
>
> Explore developer resources, tutorials, API docs, and dynamic examples to get the most out of OpenAI's platform.

> **[Getting Started With Embeddings](https://huggingface.co/blog/getting-started-with-embeddings)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.
