You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/ai-foundry/model-inference/includes/use-embeddings/rest.md
+7-2Lines changed: 7 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,7 @@ Create an embedding request to see the output of the model.
50
50
51
51
```json
52
52
{
53
+
"model": "text-embedding-3-small",
53
54
"input": [
54
55
"The ultimate answer to the question of life"
55
56
]
@@ -93,6 +94,7 @@ It can be useful to compute embeddings in input batches. The parameter `inputs`
93
94
94
95
```json
95
96
{
97
+
"model": "text-embedding-3-small",
96
98
"input": [
97
99
"The ultimate answer to the question of life",
98
100
"The largest planet in our solar system is Jupiter"
@@ -150,6 +152,7 @@ You can specify the number of dimensions for the embeddings. The following examp
150
152
151
153
```json
152
154
{
155
+
"model": "text-embedding-3-small",
153
156
"input": [
154
157
"The ultimate answer to the question of life"
155
158
],
@@ -161,23 +164,25 @@ You can specify the number of dimensions for the embeddings. The following examp
161
164
162
165
Some models can generate multiple embeddings for the same input depending on how you plan to use them. This capability allows you to retrieve more accurate embeddings for RAG patterns.
163
166
164
-
The following example shows how to create embeddings that are used to create an embedding for a document that will be stored in a vector database:
167
+
The following example shows how to create embeddings that are used to create an embedding for a document that will be stored in a vector database. Since `text-embedding-3-small` doesn't support this capability, we are using an embedding model from Cohere in the following example:
165
168
166
169
167
170
```json
168
171
{
172
+
"model": "cohere-embed-v3-english",
169
173
"input": [
170
174
"The answer to the ultimate question of life, the universe, and everything is 42"
171
175
],
172
176
"input_type": "document"
173
177
}
174
178
```
175
179
176
-
When you work on a query to retrieve such a document, you can use the following code snippet to create the embeddings for the query and maximize the retrieval performance.
180
+
When you work on a query to retrieve such a document, you can use the following code snippet to create the embeddings for the query and maximize the retrieval performance. Since `text-embedding-3-small` doesn't support this capability, we are using an embedding model from Cohere in the following example:
0 commit comments