Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"id": "8d8810f9",
"metadata": {},
"outputs": [],
Expand All @@ -53,7 +53,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 23,
"id": "5be94df6",
"metadata": {
"ExecuteTime": {
Expand Down Expand Up @@ -90,7 +90,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 24,
"id": "5dff8b55",
"metadata": {
"ExecuteTime": {
Expand All @@ -112,7 +112,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 25,
"id": "21097972",
"metadata": {
"ExecuteTime": {
Expand All @@ -129,7 +129,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 26,
"id": "70bbd8ba",
"metadata": {
"ExecuteTime": {
Expand All @@ -144,7 +144,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 27,
"id": "1721e45d",
"metadata": {
"ExecuteTime": {
Expand Down Expand Up @@ -268,7 +268,7 @@
"4 [0.021524671465158463, 0.018522677943110466, -... 4 "
]
},
"execution_count": 92,
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -279,7 +279,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 28,
"id": "960b82af",
"metadata": {
"ExecuteTime": {
Expand All @@ -299,7 +299,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 29,
"id": "a334ab8b",
"metadata": {
"ExecuteTime": {
Expand Down Expand Up @@ -364,7 +364,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 30,
"id": "76d697e9",
"metadata": {
"ExecuteTime": {
Expand All @@ -379,7 +379,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 31,
"id": "1deeb539",
"metadata": {
"ExecuteTime": {
Expand All @@ -391,10 +391,10 @@
{
"data": {
"text/plain": [
"CollectionsResponse(collections=[])"
"CollectionsResponse(collections=[CollectionDescription(name='Articles')])"
]
},
"execution_count": 96,
"execution_count": 31,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -417,7 +417,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 32,
"id": "1a84ee1d",
"metadata": {
"ExecuteTime": {
Expand All @@ -432,7 +432,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 33,
"id": "00876f92",
"metadata": {
"ExecuteTime": {
Expand All @@ -447,7 +447,7 @@
"True"
]
},
"execution_count": 98,
"execution_count": 33,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -474,7 +474,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 34,
"id": "9f39a8c395554ca3",
"metadata": {
"ExecuteTime": {
Expand All @@ -489,7 +489,7 @@
"True"
]
},
"execution_count": 99,
"execution_count": 34,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -522,7 +522,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 35,
"id": "f24e76ab",
"metadata": {
"ExecuteTime": {
Expand All @@ -535,7 +535,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"Upserting articles: 100%|██████████| 25000/25000 [01:34<00:00, 264.52it/s]\n"
"Upserting articles: 100%|██████████| 25000/25000 [01:18<00:00, 318.84it/s]\n"
]
}
],
Expand Down Expand Up @@ -568,7 +568,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 36,
"id": "d1188a12",
"metadata": {
"ExecuteTime": {
Expand All @@ -583,7 +583,7 @@
"CountResult(count=25000)"
]
},
"execution_count": 101,
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -605,7 +605,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 37,
"id": "f1bac4ef",
"metadata": {
"ExecuteTime": {
Expand Down Expand Up @@ -637,7 +637,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 39,
"id": "aa92f3d3",
"metadata": {
"ExecuteTime": {
Expand All @@ -658,7 +658,7 @@
"6. Hellenistic art, URL: https://simple.wikipedia.org/wiki/Hellenistic%20art (Score: 0.853)\n",
"7. Modernist literature, URL: https://simple.wikipedia.org/wiki/Modernist%20literature (Score: 0.847)\n",
"8. Art film, URL: https://simple.wikipedia.org/wiki/Art%20film (Score: 0.843)\n",
"9. Central Europe, URL: https://simple.wikipedia.org/wiki/Central%20Europe (Score: 0.842)\n",
"9. Central Europe, URL: https://simple.wikipedia.org/wiki/Central%20Europe (Score: 0.843)\n",
"10. European, URL: https://simple.wikipedia.org/wiki/European (Score: 0.841)\n",
"11. Art, URL: https://simple.wikipedia.org/wiki/Art (Score: 0.841)\n",
"12. Byzantine art, URL: https://simple.wikipedia.org/wiki/Byzantine%20art (Score: 0.841)\n",
Expand All @@ -676,12 +676,12 @@
"source": [
"query_results = query_qdrant('modern art in Europe', 'Articles', 'title')\n",
"for i, article in enumerate(query_results):\n",
" print(f'{i + 1}. {article.payload[\"title\"]}, URL: {article.payload['url']} (Score: {round(article.score, 3)})')"
" print(f'{i + 1}. {article.payload[\"title\"]}, URL: {article.payload[\"url\"]} (Score: {round(article.score, 3)})')"
]
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 40,
"id": "7ed116b8",
"metadata": {
"ExecuteTime": {
Expand All @@ -696,7 +696,7 @@
"text": [
"1. Battle of Bannockburn, URL: https://simple.wikipedia.org/wiki/Battle%20of%20Bannockburn (Score: 0.869)\n",
"2. Wars of Scottish Independence, URL: https://simple.wikipedia.org/wiki/Wars%20of%20Scottish%20Independence (Score: 0.861)\n",
"3. 1651, URL: https://simple.wikipedia.org/wiki/1651 (Score: 0.852)\n",
"3. 1651, URL: https://simple.wikipedia.org/wiki/1651 (Score: 0.853)\n",
"4. First War of Scottish Independence, URL: https://simple.wikipedia.org/wiki/First%20War%20of%20Scottish%20Independence (Score: 0.85)\n",
"5. Robert I of Scotland, URL: https://simple.wikipedia.org/wiki/Robert%20I%20of%20Scotland (Score: 0.846)\n",
"6. 841, URL: https://simple.wikipedia.org/wiki/841 (Score: 0.844)\n",
Expand All @@ -721,7 +721,7 @@
"# This time we'll query using content vector\n",
"query_results = query_qdrant('Famous battles in Scottish history', 'Articles', 'content')\n",
"for i, article in enumerate(query_results):\n",
" print(f'{i + 1}. {article.payload[\"title\"]}, URL: {article.payload['url']} (Score: {round(article.score, 3)})')"
" print(f'{i + 1}. {article.payload[\"title\"]}, URL: {article.payload[\"url\"]} (Score: {round(article.score, 3)})')"
]
},
{
Expand Down