OwenElliott
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -24,8 +24,15 @@ model.eval()
|
|
24 |
query_prefix = 'Represent this sentence for searching relevant passages: '
|
25 |
|
26 |
# Your queries and docs.
|
27 |
-
queries
|
28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
|
31 |
# Add query prefix and tokenize queries and docs.
|
@@ -54,12 +61,12 @@ for query, query_scores in zip(queries, scores):
|
|
54 |
print(f'Score: {score:.4f} | Document: "{document}"')
|
55 |
print()
|
56 |
|
57 |
-
#### OUTPUT ####
|
58 |
-
# Query: "what is snowflake?"
|
59 |
-
# Score: 0.3025 | Document: "The Data Cloud!"
|
60 |
-
# Score: 0.2297 | Document: "Mexico City of Course!"
|
61 |
|
62 |
-
# Query: "
|
63 |
-
# Score: 0.
|
64 |
-
# Score: 0.
|
|
|
|
|
|
|
|
|
65 |
```
|
|
|
24 |
query_prefix = 'Represent this sentence for searching relevant passages: '
|
25 |
|
26 |
# Your queries and docs.
|
27 |
+
queries = [
|
28 |
+
"What is vector search?",
|
29 |
+
"Where can I get the best pizza?"
|
30 |
+
]
|
31 |
+
|
32 |
+
documents = [
|
33 |
+
"Marqo is an end-to-end platform for embedding training and retrieval.",
|
34 |
+
"Definitely Naples! The birthplace of pizza, and it’s as authentic as it gets."
|
35 |
+
]
|
36 |
|
37 |
|
38 |
# Add query prefix and tokenize queries and docs.
|
|
|
61 |
print(f'Score: {score:.4f} | Document: "{document}"')
|
62 |
print()
|
63 |
|
|
|
|
|
|
|
|
|
64 |
|
65 |
+
# Query: "What is vector search?"
|
66 |
+
# Score: 0.4194 | Document: "Marqo is an end-to-end platform for embedding training and retrieval."
|
67 |
+
# Score: 0.1853 | Document: "Definitely Naples! The birthplace of pizza, and it’s as authentic as it gets."
|
68 |
+
|
69 |
+
# Query: "Where can I get the best pizza?"
|
70 |
+
# Score: 0.6144 | Document: "Definitely Naples! The birthplace of pizza, and it’s as authentic as it gets."
|
71 |
+
# Score: 0.2787 | Document: "Marqo is an end-to-end platform for embedding training and retrieval."
|
72 |
```
|