Skip to content

Commit de1f937

Browse files
justin-cechmanekabrookins
authored andcommitted
Reruns notebooks with new default semantic cache embedding model (#333)
1 parent f801d7d commit de1f937

File tree

6 files changed

+1413
-355
lines changed

6 files changed

+1413
-355
lines changed

docs/overview/cli.ipynb

+77-71
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
},
1818
{
1919
"cell_type": "code",
20-
"execution_count": 1,
20+
"execution_count": 42,
2121
"metadata": {},
2222
"outputs": [
2323
{
2424
"name": "stdout",
2525
"output_type": "stream",
2626
"text": [
27-
"\u001b[32m09:58:03\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m RedisVL version 0.5.2\n"
27+
"19:16:18 [RedisVL] INFO RedisVL version 0.5.2\n"
2828
]
2929
}
3030
],
@@ -65,7 +65,7 @@
6565
},
6666
{
6767
"cell_type": "code",
68-
"execution_count": 31,
68+
"execution_count": 43,
6969
"metadata": {},
7070
"outputs": [
7171
{
@@ -99,15 +99,14 @@
9999
},
100100
{
101101
"cell_type": "code",
102-
"execution_count": 32,
102+
"execution_count": 44,
103103
"metadata": {},
104104
"outputs": [
105105
{
106106
"name": "stdout",
107107
"output_type": "stream",
108108
"text": [
109-
"\u001b[32m18:12:32\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m Using Redis address from environment variable, REDIS_URL\n",
110-
"\u001b[32m18:12:32\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m Index created successfully\n"
109+
"19:16:21 [RedisVL] INFO Index created successfully\n"
111110
]
112111
}
113112
],
@@ -118,16 +117,15 @@
118117
},
119118
{
120119
"cell_type": "code",
121-
"execution_count": 33,
120+
"execution_count": 45,
122121
"metadata": {},
123122
"outputs": [
124123
{
125124
"name": "stdout",
126125
"output_type": "stream",
127126
"text": [
128-
"\u001b[32m18:12:35\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m Using Redis address from environment variable, REDIS_URL\n",
129-
"\u001b[32m18:12:35\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m Indices:\n",
130-
"\u001b[32m18:12:35\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m 1. vectorizers\n"
127+
"19:16:24 [RedisVL] INFO Indices:\n",
128+
"19:16:24 [RedisVL] INFO 1. vectorizers\n"
131129
]
132130
}
133131
],
@@ -138,29 +136,28 @@
138136
},
139137
{
140138
"cell_type": "code",
141-
"execution_count": 34,
139+
"execution_count": 46,
142140
"metadata": {},
143141
"outputs": [
144142
{
145143
"name": "stdout",
146144
"output_type": "stream",
147145
"text": [
148-
"\u001b[32m18:12:37\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m Using Redis address from environment variable, REDIS_URL\n",
149146
"\n",
150147
"\n",
151148
"Index Information:\n",
152-
"╭──────────────┬───────────────┬─────────────────────────────────────────╮\n",
153-
"│ Index Name │ Storage Type │ Prefixes │ Index Options Indexing\n",
154-
"├──────────────┼───────────────┼─────────────────────────────────────────┤\n",
155-
" vectorizers HASH ['doc'] [] 0 │\n",
156-
"╰──────────────┴───────────────┴─────────────────────────────────────────╯\n",
149+
"╭──────────────┬───────────────┬──────────────────────────────┬───────────────╮\n",
150+
"│ Index Name │ Storage Type │ Prefixes │ Index Options │ Indexing \n",
151+
"├──────────────┼───────────────┼──────────────────────────────┼───────────────┤\n",
152+
"| vectorizers | HASH | ['doc'] | [] | 0 |\n",
153+
"╰──────────────┴───────────────┴──────────────────────────────┴───────────────╯\n",
157154
"Index Fields:\n",
158-
"╭───────────┬─────────────┬────────┬────────────────┬────────────────┬────────────────┬────────────────┬────────────────┬────────────────┬─────────────────┬────────────────╮\n",
159-
"│ Name │ Attribute │ Type │ Field Option │ Option Value │ Field Option │ Option Value │ Field Option Option Value │ Field Option │ Option Value │\n",
160-
"├───────────┼─────────────┼────────┼────────────────┼────────────────┼────────────────┼────────────────┼────────────────┼────────────────┼─────────────────┼────────────────┤\n",
161-
"│ sentence │ sentence │ TEXT │ WEIGHT │ 1 │ │ │ │ │ │ │\n",
162-
"│ embedding │ embedding │ VECTOR │ algorithm │ FLAT │ data_type │ FLOAT32 │ dim 768 │ distance_metric │ COSINE │\n",
163-
"╰───────────┴─────────────┴────────┴────────────────┴────────────────┴────────────────┴────────────────┴────────────────┴────────────────┴─────────────────┴────────────────╯\n"
155+
"╭─────────────────┬─────────────────┬─────────────────┬────────────────┬────────────────┬────────────────┬────────────────┬────────────────┬────────────────┬─────────────────┬────────────────╮\n",
156+
"│ Name │ Attribute │ Type │ Field Option │ Option Value │ Field Option │ Option Value │ Field Option Option Value │ Field Option │ Option Value \n",
157+
"├─────────────────┼─────────────────┼─────────────────┼────────────────┼────────────────┼────────────────┼────────────────┼────────────────┼────────────────┼─────────────────┼────────────────┤\n",
158+
"│ sentence │ sentence │ TEXT │ WEIGHT │ 1 │ │ \n",
159+
"│ embedding │ embedding │ VECTOR │ algorithm │ FLAT │ data_type │ FLOAT32 │ dim │ 768 │ distance_metric │ COSINE \n",
160+
"╰─────────────────┴─────────────────┴─────────────────┴────────────────┴────────────────┴────────────────┴────────────────┴────────────────┴────────────────┴─────────────────┴────────────────╯\n"
164161
]
165162
}
166163
],
@@ -171,15 +168,14 @@
171168
},
172169
{
173170
"cell_type": "code",
174-
"execution_count": 35,
171+
"execution_count": 47,
175172
"metadata": {},
176173
"outputs": [
177174
{
178175
"name": "stdout",
179176
"output_type": "stream",
180177
"text": [
181-
"\u001b[32m18:12:40\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m Using Redis address from environment variable, REDIS_URL\n",
182-
"\u001b[32m18:12:40\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m Index deleted successfully\n"
178+
"19:16:29 [RedisVL] INFO Index deleted successfully\n"
183179
]
184180
}
185181
],
@@ -190,15 +186,14 @@
190186
},
191187
{
192188
"cell_type": "code",
193-
"execution_count": 36,
189+
"execution_count": 48,
194190
"metadata": {},
195191
"outputs": [
196192
{
197193
"name": "stdout",
198194
"output_type": "stream",
199195
"text": [
200-
"\u001b[32m18:12:43\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m Using Redis address from environment variable, REDIS_URL\n",
201-
"\u001b[32m18:12:43\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m Indices:\n"
196+
"19:16:32 [RedisVL] INFO Indices:\n"
202197
]
203198
}
204199
],
@@ -218,16 +213,14 @@
218213
},
219214
{
220215
"cell_type": "code",
221-
"execution_count": 38,
216+
"execution_count": 49,
222217
"metadata": {},
223218
"outputs": [
224219
{
225220
"name": "stdout",
226221
"output_type": "stream",
227222
"text": [
228-
"\u001b[32m18:13:21\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m Using Redis address from environment variable, REDIS_URL\n",
229-
"\u001b[32m18:13:21\u001b[0m \u001b[34mredisvl.index.index\u001b[0m \u001b[1;30mINFO\u001b[0m Index already exists, not overwriting.\n",
230-
"\u001b[32m18:13:21\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m Index created successfully\n"
223+
"19:16:35 [RedisVL] INFO Index created successfully\n"
231224
]
232225
}
233226
],
@@ -239,16 +232,15 @@
239232
},
240233
{
241234
"cell_type": "code",
242-
"execution_count": 39,
235+
"execution_count": 50,
243236
"metadata": {},
244237
"outputs": [
245238
{
246239
"name": "stdout",
247240
"output_type": "stream",
248241
"text": [
249-
"\u001b[32m18:13:25\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m Using Redis address from environment variable, REDIS_URL\n",
250-
"\u001b[32m18:13:25\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m Indices:\n",
251-
"\u001b[32m18:13:25\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m 1. vectorizers\n"
242+
"19:16:38 [RedisVL] INFO Indices:\n",
243+
"19:16:38 [RedisVL] INFO 1. vectorizers\n"
252244
]
253245
}
254246
],
@@ -259,39 +251,38 @@
259251
},
260252
{
261253
"cell_type": "code",
262-
"execution_count": 40,
254+
"execution_count": 51,
263255
"metadata": {},
264256
"outputs": [
265257
{
266258
"name": "stdout",
267259
"output_type": "stream",
268260
"text": [
269-
"\u001b[32m18:13:31\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m Using Redis address from environment variable, REDIS_URL\n",
270261
"\n",
271262
"Statistics:\n",
272-
"╭─────────────────────────────┬─────────╮\n",
273-
"│ Stat Key │ Value │\n",
274-
"├─────────────────────────────┼─────────┤\n",
275-
"│ num_docs │ 0 │\n",
276-
"│ num_terms │ 0 │\n",
277-
"│ max_doc_id │ 0 │\n",
278-
"│ num_records │ 0 │\n",
279-
"│ percent_indexed │ 1 │\n",
280-
"│ hash_indexing_failures │ 3\n",
281-
"│ number_of_uses │ 2\n",
282-
"│ bytes_per_record_avg │ nan │\n",
283-
"│ doc_table_size_mb │ 0 │\n",
284-
"│ inverted_sz_mb │ 0 │\n",
285-
"│ key_table_size_mb │ 0 │\n",
286-
"│ offset_bits_per_record_avg │ nan │\n",
287-
"│ offset_vectors_sz_mb │ 0 │\n",
288-
"│ offsets_per_term_avg │ nan │\n",
289-
"│ records_per_doc_avg │ nan │\n",
290-
"│ sortable_values_size_mb │ 0 │\n",
291-
"│ total_indexing_time │ 0.02\n",
292-
"│ total_inverted_index_blocks │ 0 │\n",
293-
"│ vector_index_sz_mb │ 0 \n",
294-
"╰─────────────────────────────┴─────────╯\n"
263+
"╭─────────────────────────────┬────────────\n",
264+
"│ Stat Key │ Value \n",
265+
"├─────────────────────────────┼────────────\n",
266+
"│ num_docs │ 0 \n",
267+
"│ num_terms │ 0 \n",
268+
"│ max_doc_id │ 0 \n",
269+
"│ num_records │ 0 \n",
270+
"│ percent_indexed │ 1 \n",
271+
"│ hash_indexing_failures │ 0 \n",
272+
"│ number_of_uses │ 1 \n",
273+
"│ bytes_per_record_avg │ nan \n",
274+
"│ doc_table_size_mb │ 0 \n",
275+
"│ inverted_sz_mb │ 0 \n",
276+
"│ key_table_size_mb │ 0 \n",
277+
"│ offset_bits_per_record_avg │ nan \n",
278+
"│ offset_vectors_sz_mb │ 0 \n",
279+
"│ offsets_per_term_avg │ nan \n",
280+
"│ records_per_doc_avg │ nan \n",
281+
"│ sortable_values_size_mb │ 0 \n",
282+
"│ total_indexing_time │ 0 \n",
283+
"│ total_inverted_index_blocks │ 0 \n",
284+
"│ vector_index_sz_mb │ 0.00818634\n",
285+
"╰─────────────────────────────┴────────────\n"
295286
]
296287
}
297288
],
@@ -327,16 +318,15 @@
327318
},
328319
{
329320
"cell_type": "code",
330-
"execution_count": 41,
321+
"execution_count": 52,
331322
"metadata": {},
332323
"outputs": [
333324
{
334325
"name": "stdout",
335326
"output_type": "stream",
336327
"text": [
337-
"\u001b[32m18:13:36\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m Using Redis address from environment variable, REDIS_URL\n",
338-
"\u001b[32m18:13:36\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m Indices:\n",
339-
"\u001b[32m18:13:36\u001b[0m \u001b[34m[RedisVL]\u001b[0m \u001b[1;30mINFO\u001b[0m 1. vectorizers\n"
328+
"19:16:43 [RedisVL] INFO Indices:\n",
329+
"19:16:43 [RedisVL] INFO 1. vectorizers\n"
340330
]
341331
}
342332
],
@@ -356,19 +346,35 @@
356346
},
357347
{
358348
"cell_type": "code",
359-
"execution_count": null,
349+
"execution_count": 53,
360350
"metadata": {},
361-
"outputs": [],
351+
"outputs": [
352+
{
353+
"name": "stdout",
354+
"output_type": "stream",
355+
"text": [
356+
"19:16:46 [RedisVL] ERROR Error 8 connecting to rediss:6379. nodename nor servname provided, or not known.\n"
357+
]
358+
}
359+
],
362360
"source": [
363361
"# connect to rediss://jane_doe:password123@localhost:6379\n",
364362
"!rvl index listall --user jane_doe -a password123 --ssl"
365363
]
366364
},
367365
{
368366
"cell_type": "code",
369-
"execution_count": null,
367+
"execution_count": 54,
370368
"metadata": {},
371-
"outputs": [],
369+
"outputs": [
370+
{
371+
"name": "stdout",
372+
"output_type": "stream",
373+
"text": [
374+
"19:16:49 [RedisVL] INFO Index deleted successfully\n"
375+
]
376+
}
377+
],
372378
"source": [
373379
"!rvl index destroy -i vectorizers"
374380
]
@@ -390,7 +396,7 @@
390396
"name": "python",
391397
"nbconvert_exporter": "python",
392398
"pygments_lexer": "ipython3",
393-
"version": "3.13.2"
399+
"version": "3.13.0"
394400
}
395401
},
396402
"nbformat": 4,

0 commit comments

Comments
 (0)