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: README.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,7 @@ results = Document.vector_search("text_embedding", "some query to search against
44
44
45
45
### Example 2: Using mixedbread-ai/mxbai-embed-large-v1
46
46
47
-
This example shows how to use the `mixedbread-ai/mxbai-embed-large-v1` transformer, which has an embedding size of 512 and requires specific parameters for recall.
47
+
This example shows how to use the `mixedbread-ai/mxbai-embed-large-v1` transformer, which has an embedding size of 1024 and requires specific parameters for recall.
48
48
49
49
```python
50
50
from django.db import models
@@ -54,19 +54,19 @@ class Article(Embed):
54
54
content = models.TextField()
55
55
content_embedding = VectorField(
56
56
field_to_embed="content",
57
-
dimensions=512,
57
+
dimensions=1024,
58
58
transformer="mixedbread-ai/mxbai-embed-large-v1",
59
59
transformer_recall_parameters={
60
-
"query": "Represent this sentence for searching relevant passages: "
60
+
"prompt": "Represent this sentence for searching relevant passages: "
results = Article.vector_search("content_embedding", "some query to search against")
66
66
```
67
67
68
68
Note the differences between the two examples:
69
-
1. The `dimensions` parameter is set to 384 for `intfloat/e5-small-v2` and 512 for `mixedbread-ai/mxbai-embed-large-v1`.
69
+
1. The `dimensions` parameter is set to 384 for `intfloat/e5-small-v2` and 1024 for `mixedbread-ai/mxbai-embed-large-v1`.
70
70
2. The `mixedbread-ai/mxbai-embed-large-v1` transformer requires additional parameters for recall, which are specified in the `transformer_recall_parameters` argument.
71
71
72
72
Both examples will automatically generate embeddings when instances are saved and allow for vector similarity searches using the `vector_search` method.
0 commit comments