├── .gitignore ├── LICENSE ├── README.md ├── data ├── jeopardy_tiny+vectors.json ├── jeopardy_tiny.json ├── jeopardy_tiny_with_vectors_all-MiniLM-L6-v2.json └── jeopardy_tiny_with_vectors_all-OpenAI-ada-002.json ├── package.json └── quickstart_end_to_end.ipynb /.gitignore: -------------------------------------------------------------------------------- 1 | package-lock.json 2 | .DS_Store 3 | node_modules/ 4 | .ipynb_checkpoints/ 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Weaviate Tutorials 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | > Note: We are archiving this repository. The code for the Quickstart tutorial is available in-line on the [site](https://weaviate.io/developers/weaviate/quickstart). 2 | 3 | ## Weaviate Quickstart Tutorial 4 | 5 | This repository contains files related to the [Weaviate Quickstart Tutorial](https://weaviate.io/developers/weaviate/quickstart). 6 | 7 | The `data` directory contains the relevant data file. 8 | 9 | You will need to install the appropriate [Weaviate client library](https://weaviate.io/developers/weaviate/client-libraries) in order to run these. 10 | 11 | ### Python users 12 | 13 | The `quickstart_end_to_end.ipynb` will take you through the tutorial end-to-end. You can run view and run it with a local Jupyter instance, or on a cloud environment such as Google Colab. 14 | 15 | ### JavaScript users 16 | 17 | There are three files: 18 | 19 | - quickstart_0_delete_class.js 20 | - Deletes the `Question` class if one exists 21 | - quickstart_1_import.js 22 | - Imports the data 23 | - quickstart_2_query.js 24 | - Performs a `nearText` query 25 | 26 | You can run them with NodeJS, for example by typing: `node quickstart_0_delete_class.js`. -------------------------------------------------------------------------------- /data/jeopardy_tiny.json: -------------------------------------------------------------------------------- 1 | [{"Category":"SCIENCE","Question":"This organ removes excess glucose from the blood & stores it as glycogen","Answer":"Liver"},{"Category":"ANIMALS","Question":"It's the only living mammal in the order Proboseidea","Answer":"Elephant"},{"Category":"ANIMALS","Question":"The gavial looks very much like a crocodile except for this bodily feature","Answer":"the nose or snout"},{"Category":"ANIMALS","Question":"Weighing around a ton, the eland is the largest species of this animal in Africa","Answer":"Antelope"},{"Category":"ANIMALS","Question":"Heaviest of all poisonous snakes is this North American rattlesnake","Answer":"the diamondback rattler"},{"Category":"SCIENCE","Question":"2000 news: the Gunnison sage grouse isn't just another northern sage grouse, but a new one of this classification","Answer":"species"},{"Category":"SCIENCE","Question":"A metal that is ductile can be pulled into this while cold & under pressure","Answer":"wire"},{"Category":"SCIENCE","Question":"In 1953 Watson & Crick built a model of the molecular structure of this, the gene-carrying substance","Answer":"DNA"},{"Category":"SCIENCE","Question":"Changes in the tropospheric layer of this are what gives us weather","Answer":"the atmosphere"},{"Category":"SCIENCE","Question":"In 70-degree air, a plane traveling at about 1,130 feet per second breaks it","Answer":"Sound barrier"}] -------------------------------------------------------------------------------- /data/jeopardy_tiny_with_vectors_all-MiniLM-L6-v2.json: -------------------------------------------------------------------------------- 1 | [{"Category": "SCIENCE", "Question": "This organ removes excess glucose from the blood & stores it as glycogen", "Answer": "Liver", "vector": [0.03327517, -0.033079617, -0.02878669, 0.025903773, -0.007283562, 0.013350981, -0.021447308, -0.03305209, -0.092626035, 0.062030435, 0.0040854746, -0.022091584, -0.08340149, -0.02942572, 0.0029419125, 0.04089731, 0.118814796, -0.04977036, -0.07296036, -0.016522773, 0.030743642, 0.07548376, 0.032421198, 0.064542785, 0.0069846287, -0.00018156845, 0.043084614, 0.005723758, 0.008637323, -0.046189055, 0.037118845, -0.01163944, 0.02056448, 0.06898946, -0.056367584, -0.057798076, -0.008399595, -0.0038984448, 0.037306655, -0.031948857, -0.053885844, 0.019310938, 0.05400679, -0.024039863, -0.043975644, 0.010251267, -0.025918767, -0.048085514, 0.06836867, 0.011758463, -0.07899146, -0.039681256, 0.01930638, 0.022538621, 0.03625047, -0.005873552, 0.03782156, -0.021119976, -0.026672993, -0.005903529, 0.0004248093, 0.00976308, 0.004172112, -0.024450323, 0.025928402, -0.06004041, -0.058288883, 0.019501166, 0.028017065, -0.0027040304, -0.04221861, 0.08624436, -0.012754155, 0.055656493, 0.13725916, -0.040032957, 0.02305355, 0.001403542, 0.031230323, 0.011475468, 0.09574899, -0.11300969, -0.13880397, -0.031329412, -0.027825065, 0.016786689, 0.060189456, 0.030893024, -0.045436777, 0.012293454, -0.04179664, -0.08059813, 0.09200624, 0.040616862, 0.052005123, -0.011402848, -0.07946643, -0.062007956, 0.030359589, -0.055823155, -0.0025138592, 0.003197624, -0.0113254655, 0.06771769, -0.020140791, -0.00365968, 0.026187632, 0.0009055989, -0.0014367038, 0.007697198, -0.04700245, 0.046364646, 0.041312043, -0.024357785, 0.0063639926, -0.032800667, -0.057085693, 0.028604805, 0.015197218, -0.015355523, 0.015149894, 0.043803435, 0.057350047, 0.047444753, 0.02165258, -0.034553036, 0.021969732, -2.0329743e-33, -0.044808693, 0.06593206, -0.035705928, -0.02300803, 0.015244479, -0.108164825, -0.11753952, 0.07386147, 0.058108304, 0.054663133, -0.11198359, -0.029535042, 0.00028991318, -0.091924876, 0.033121306, -0.0272333, 0.0043377643, -0.0019156848, -0.106413975, 0.023363404, -0.058249503, -0.06483776, -0.027363176, 0.031184426, 0.052743297, -0.017957134, -0.037447985, -0.04427562, 0.0073168026, 0.0050507085, -0.08037206, 0.03169172, -0.03302361, 0.012981129, -0.05982895, 0.023937501, 0.032824606, 0.027121253, 0.03276204, 0.0014012582, -0.12098421, -0.02748316, 0.018378785, 0.08308623, 0.008806903, -0.029073976, -0.04359985, 0.06791203, 0.0035249596, 0.062450368, 0.0086907605, 0.024543146, -0.043354403, 0.017131737, 0.051843144, -0.014521386, 0.11598601, -0.027015666, 0.0734431, 0.028284123, 0.05098512, -0.0023937728, 0.044241667, 0.009052531, -0.02332953, 0.04784876, -0.10186397, -0.004024573, 0.012622024, 0.03687248, -0.02634828, -0.039913546, 0.041549634, -0.07238313, 0.039003883, -0.045437943, -0.07543266, -0.015613526, 0.060292058, -0.059210025, -0.056188073, 0.022782736, -0.018395314, -0.06259751, -0.029741358, 0.04488936, -0.039306443, -0.03156646, -0.02817127, -0.04858703, -0.10030368, -0.022182394, 0.013440033, -0.026590686, 0.022266408, -4.0857066e-34, 0.033591244, 0.03875562, -0.069757596, 0.026747845, 0.04188009, 0.07220676, 0.028207155, 0.11784068, -0.04296034, 0.006942535, 0.02088392, -0.073617026, 0.020255825, 0.017723316, 0.00067281496, -0.0669225, 0.03749064, -0.022571452, 0.016871748, 0.058603417, 0.00904081, 0.015544708, 0.036335863, 0.0088790655, -0.020311268, 0.003963896, 0.0068502384, -0.017188601, 0.041285295, -0.039069083, -0.11634889, 0.035677638, 0.026083667, 0.007511588, -0.01695872, 0.058146022, 0.030141905, 0.011574513, -0.041626826, -0.12270941, 0.01596764, 0.07914604, 0.00783677, -0.066544116, 0.018071612, 0.0065986323, -0.002505947, 0.004510379, -0.044140447, -0.040930834, 0.051389683, -0.05439847, 0.11073878, -0.009576154, 0.084230095, 0.059755165, -0.019941675, -0.020933136, 0.071349755, -0.04891038, 0.042631015, 0.010116697, -0.037104145, 0.018146202, 0.01394294, -0.02366813, -0.02763123, 0.11285343, 0.07690143, -0.026874045, -0.012337561, 0.07573533, 0.04105979, 0.011300903, -0.08394117, -0.03781303, -0.045794565, -0.07758614, 0.01425033, 0.09085174, -0.052794814, -0.053526305, 2.2882837e-06, -0.022141743, 0.021124622, -0.010549948, -0.027636718, -0.109270245, -0.020842474, -0.0015077951, 0.025123702, 0.05445711, 0.020162703, -0.05813842, 0.012572318, -2.2279407e-08, -0.01174454, 0.05028739, -0.016836822, -0.029362908, 0.010246496, 6.436307e-05, 0.03474386, -0.09031302, -0.018691791, -0.05574164, 0.021397434, -0.011149662, 0.11604583, 0.1752708, -0.1149084, -0.06123622, -0.062827714, 0.047647536, 0.01740324, -0.083806805, 0.03802301, 0.07792054, 0.0069792247, 0.041948177, 0.018800877, 0.091969416, -0.016608197, -0.059534844, 0.006662695, -0.023221388, -0.1539616, -0.019180499, -0.11231463, 0.035832867, 0.007368152, 0.030169873, -0.0037057707, 0.031492647, 0.027267564, 0.059215717, -0.05348166, 0.060454257, -0.036077615, 0.053769547, 0.06480985, 0.016492054, 0.039590985, -0.036966983, -0.052083977, 0.019189334, 0.073253185, 0.13353619, 0.010549103, 0.013846872, 0.051623214, 0.12473903, -0.07385505, 0.045422453, -0.123542234, -0.042937126, -0.042132333, -0.007920231, -0.033476185, 0.08601048]}, {"Category": "ANIMALS", "Question": "It's the only living mammal in the order Proboseidea", "Answer": "Elephant", "vector": [-0.03281112, 0.041537076, 0.10724979, 0.024320612, 0.074405454, -0.01922797, 0.018699579, -0.00833244, 0.025890542, 0.039971877, -0.01363315, -0.023469688, -0.026734143, -0.059119675, 0.0373339, 0.01262205, 0.00811697, -0.054390043, -0.02820173, -0.058380302, -0.022859534, 0.038206443, -0.10435878, 0.011328409, -0.011821984, -0.06708709, -0.0960907, 0.059611756, -0.0067118728, 0.04432109, -0.018451666, 0.1123941, 0.08167601, 0.03872977, -0.031675287, 0.057995003, 0.035491332, 0.017793048, -0.023280706, 0.038686164, -0.040990792, -0.070328996, -0.0371588, 0.07064367, -0.080305494, -0.0142350625, 0.022539137, 0.0850961, 0.008149827, 0.08509116, -0.04791115, 0.047273625, -0.08466393, -0.03045359, -0.012694484, 0.028807286, 0.020523552, 0.0643974, -0.024875646, -0.04865405, -0.07291513, 0.007968973, -0.12169546, 0.034070928, 0.15176049, -0.045514103, -0.002452199, 0.04209108, 0.07025346, -0.047287464, -0.0053851684, 0.088911355, -0.017512344, -0.05608109, 0.0056594727, 0.07400206, -0.028960766, -0.0002816788, 0.13399655, -0.018632809, 0.11453446, 0.023179304, -0.010137856, -0.03244333, -0.095267996, 0.01706533, -0.034406103, 0.019782381, -0.12882884, -0.0067095556, 0.047701646, -0.098895684, -0.015287379, 0.0040035, -0.08549093, 0.13703424, 0.0041504027, -0.025013229, 0.06843499, -0.021170756, -0.03679186, -0.03901487, -0.038077984, 0.089592114, -0.003192739, -0.012097922, 0.0791417, -0.011734712, -0.016994614, 0.062666304, -0.06874262, 0.022317344, -0.032850478, -0.059358, 0.0054031718, -0.013919646, 0.054306522, 0.085925125, -0.11760193, -0.0751934, -0.07062417, 0.08454712, -0.02008676, 0.032258473, 0.035415474, -0.021553354, 0.0005836048, -4.691661e-33, 0.13237631, 0.01159059, 0.026482426, 0.029353637, -0.0358128, 0.0010243652, -0.02709279, -0.068754196, -0.029407863, 0.010766349, -0.062211532, 0.038032528, 0.029512528, 0.046275683, 0.049324315, 0.034231357, -0.027886296, 0.06217535, 0.02231812, 0.043868378, -0.14010355, -0.019693134, 0.014886841, -0.0045107896, -0.012730583, -0.0070997863, 0.018920569, 0.016194882, -0.029820237, -0.023518147, 0.069907956, 0.040643174, -0.04337408, 0.019170491, 0.01261037, -0.0048560025, -0.004967209, 0.04487188, 0.031477038, -0.025134576, -0.028789023, 0.00092053675, -0.012545359, -0.028940557, 0.0807581, -0.03425874, 0.022051904, -0.064521685, -0.033741467, 0.0030708387, -0.032384895, 0.01835521, 0.009046437, -0.037606318, 0.050563723, 0.05925733, 0.09443542, -0.029270098, -0.023511093, -0.027034665, 0.07119219, 0.01869569, 0.05578655, -0.042855617, 0.028455742, 0.025443695, -0.0053504286, -0.017315548, -0.04796695, 0.036632363, -0.024442142, 0.0012325089, 0.031146046, 0.09007401, -0.012141883, 0.0047659096, -0.03874659, -0.050207008, 0.04137032, 0.013097295, -0.045929063, 0.01503369, 0.041607518, -0.10207619, -0.07323369, -0.011563248, -0.011163192, 0.102845445, 0.07250265, 0.050983053, -0.028091647, -0.039132304, 0.020259084, -0.03265852, 0.020607444, 7.3386806e-34, -0.039743286, -0.0040309564, -0.1032631, -0.022573493, -0.06721532, 0.038532443, -0.014284724, 0.07113334, -0.0427972, 0.049198657, 0.023807094, 0.047289167, -0.025287855, -0.10113495, 0.017456595, -0.0733714, -0.07684554, 0.018421285, -0.06516474, -0.045569677, -0.066612124, -0.028207842, -0.016855001, 0.021622032, -0.02452064, -0.10784284, 0.0361313, 0.020282136, 0.044797152, 0.037707306, -0.08046693, 0.014720137, -0.06705047, 0.13365577, 0.007752747, 0.08294293, 0.04725193, -0.04973414, -0.08709672, -0.04925837, -0.074567914, 0.0029263753, 0.13166921, -0.09910862, 0.010694551, 0.0012918477, 0.0038699335, 0.031410716, -0.012013976, -0.0564658, 0.085265376, -0.00048842287, -0.020266302, -0.014938612, 0.09143631, 0.11121132, -0.043684475, -0.034712657, -0.013393025, -0.03932123, 0.019061448, -0.07928013, 0.011414873, -0.014590985, 0.036928304, -0.038009457, 0.0013260114, 0.07858239, -0.06194444, 0.06516191, 0.05348414, -0.01338595, -0.023420727, -0.041441698, 0.06932992, -0.0076646847, 0.0025431942, -0.011103583, 0.00011654235, 0.060096186, -0.01026299, -0.0075778975, -0.011340986, 0.020896757, 0.0440687, 0.022860324, 0.03456279, 0.0068150978, -0.021195605, 0.07996819, -0.02739607, 0.016874336, -0.040175494, -0.029735018, -0.009673585, -2.2687622e-08, 0.013516459, -0.008508536, 0.06688275, -0.010257994, -0.069072485, 0.014089533, 0.023686757, 0.008726462, 0.032737043, -0.02651167, 0.008807736, 0.04046728, 0.07980012, 0.01819236, 0.04969181, -0.08004036, -0.009311655, -0.027920235, -0.0057817367, -0.058795355, -0.029341668, 0.026588654, -0.053273726, 0.036859337, 0.16330253, 0.014736077, 0.03290603, 0.06947207, -0.023436047, 0.04459564, -0.004823014, -0.09452266, -0.012338966, -0.07658351, -0.04803097, -0.04103655, -0.047814973, 0.061908383, -0.039650608, -0.0061753076, 0.0020548778, 0.011285332, -0.05899019, 0.046405893, -0.013460398, 0.0019465561, 0.0008087576, 0.04285193, -0.10053192, 0.025460236, 0.0038398209, -0.024818875, -0.022247119, -0.054561283, 0.019728454, -0.017149871, -0.03328443, -0.048731368, 0.050582618, -0.014786595, -0.063472435, -0.0025913613, -0.07106174, 0.012701146]}, {"Category": "ANIMALS", "Question": "The gavial looks very much like a crocodile except for this bodily feature", "Answer": "the nose or snout", "vector": [-0.09932486, 0.024525927, -0.016322764, 0.0978578, -0.013529274, -0.00962402, 0.06926058, 0.015740007, -0.04691308, 0.040202036, 0.005572614, 0.00011101287, 0.00041106084, -0.017804839, -0.004508812, -0.060020756, 0.017180141, 0.029857313, -0.036759287, -0.006459386, 0.09652261, 0.006409857, -0.07993262, -0.016999474, 0.011109308, 0.016223865, -0.05498145, -0.011883141, -0.00039629705, 0.037175857, -0.1166213, -0.05437153, -0.14998852, 0.06278387, -0.008867324, 0.003150714, -0.046824057, 0.030528523, -0.069921, 0.0019107434, 0.03468066, -0.0501035, 0.05485356, -0.07319071, 0.011796694, 0.012106892, 0.036380325, -0.002445065, -0.02289018, 0.047982782, -0.11521401, 0.08588216, 0.04200514, 0.102913804, -0.05041842, 0.0018386215, 0.018516969, -0.05445524, -0.0043443805, -0.01890145, -0.029659947, -0.036853515, 0.010949734, -0.012052464, 0.105127655, -0.030932004, 0.004637072, 0.052425392, 0.09482448, -0.03801149, 0.08622695, -0.04569105, -0.11500664, -0.075764954, 0.11867665, -0.017948817, -0.00041272552, -0.010121444, -0.030868206, 0.09016301, 0.0043535293, 0.012999092, 0.018802084, -0.085625656, -0.08345656, 0.040044453, 0.10294132, -0.05338521, -0.0772798, 0.039189864, 0.024866419, 0.05783324, -0.07755205, 0.042442992, -0.007489703, -0.029969446, 0.0039217956, -0.013169252, -0.08277457, -0.008276408, 0.05511378, 0.025488446, -0.09495642, 0.009373984, 0.006294556, -0.028733516, 0.038230743, -0.10792111, -0.08333059, 0.027345119, -0.034761664, -0.0137847215, 0.0018153111, -0.038222115, 0.06518097, -0.08106581, -0.122731954, 0.069323316, -0.027964782, 0.088048264, -0.007722296, 0.07170818, -0.04477907, 0.025737252, 0.060077425, -0.013664119, -0.0530041, -2.0820273e-33, 0.0006750915, -0.0011488594, 0.05393294, 0.04003567, -0.06415256, -0.05179405, 0.00485223, 0.084702946, 0.010574989, 0.053265013, 0.0055358815, 0.02835233, -0.051649466, -0.021094214, 0.0069267163, -0.102718875, 0.026178649, -0.05325807, 0.004672907, 0.07809879, -0.0037745906, 0.007975257, 0.06371756, 0.036861993, 0.030153295, -0.04132648, -0.020420259, 0.024113271, -0.034170352, 0.012319871, -0.04964664, -0.06532207, 0.032819845, 0.083213136, 0.0060821446, 0.02351833, 0.0757218, -0.013737277, 0.030825518, -0.019871574, -0.0113542825, -0.0751102, 0.036174245, 0.07696613, 0.038394503, -0.01954398, -0.05484883, -0.06482676, -0.09671717, -0.017679915, 0.07056385, 0.0335454, 0.0644154, -0.050097775, 0.055829704, 0.030875474, 0.018107945, 0.012328379, 0.0058551426, 0.006708078, -0.07802884, 0.073915415, 0.0023231048, -0.0046487725, -0.018411776, 0.034690212, -0.012108796, 0.048835233, 0.004360213, -0.09448141, -0.087091476, -0.04698366, 0.046710625, -0.032444723, -0.021501858, 0.07612849, -0.054417092, -0.042290393, 0.12772001, -0.055624668, -0.039763995, -0.042157777, 0.040464327, -0.048553105, 0.020286063, -0.016741531, 0.00031319115, -0.061924517, 0.031315874, 0.02718139, 0.026182098, -0.02322613, -0.023598025, -0.029592339, 0.11508226, 1.350542e-35, 0.058360793, -0.020767989, -0.0022368133, -0.03137223, -0.011873419, 0.027349291, -0.051406536, 0.016238254, 0.06112477, 0.060029432, 0.031375077, -0.05348016, 0.07059388, -0.034386426, 0.049186196, 0.005286972, -0.041492317, 0.013308097, -0.02430083, 0.0797771, -0.05604511, 0.072024405, -0.0513014, 0.01688377, -0.054266457, -0.019370738, -0.058101345, 0.0051328987, -0.0073548616, -0.0011722293, -0.015172311, -0.03577562, -0.027252255, 0.008247975, -0.043760013, -0.0016021036, 0.054193903, 0.044875246, -0.0079504745, -0.098844945, 0.022284295, 0.0033090422, 0.04969998, 0.02928072, -0.069763996, -0.005854537, 0.014059718, -0.10868318, -0.014036332, 0.058169253, 0.044337783, 0.007626054, 0.013680766, -0.004307941, 0.03663189, 0.020042371, -0.06270782, -0.035079245, -0.0030030098, 0.026573127, 0.105833866, -0.028184425, 0.01527328, -0.08793936, 0.055674173, -0.085024424, 0.013040275, -0.03988505, 0.070205525, -0.022053558, 0.16360572, 0.10354733, 0.06592218, -0.11245859, 0.04015622, 0.025112605, 0.042243566, -0.05068391, -0.004156127, 0.017726505, -0.029301565, 0.07471098, -0.0076119523, 0.020137792, 0.04414147, -0.07292148, 0.07857751, 0.044893693, -0.043240238, -0.005407171, 0.012392941, -0.032924917, 0.07676651, -0.010775244, 0.0052135764, -2.0287995e-08, -0.017668385, -0.013509495, -0.0059927744, -0.045759443, 0.028034482, 0.11777697, -0.04275871, -0.06865274, 0.0029070931, -0.037346262, -0.04637778, 0.0385541, 0.06453849, 0.014091228, -0.0035705166, -0.03735072, -0.04093215, 0.03875681, 0.04400049, -0.06739773, -0.0029285701, -0.050477773, 0.0491005, 0.05781493, 0.027572632, 0.040912434, -0.015909538, 0.014685409, 0.026376976, 0.08283008, -0.09560816, -0.087892786, -0.015302974, 0.08049079, 0.017198442, 0.023395712, 0.015168232, 0.060335815, -0.023905942, -0.05180492, 0.03625406, -0.020503005, -0.002972634, 0.043845743, -0.06747684, 0.02580225, -0.03729059, 0.025297942, -0.04999733, -0.0046520433, -0.016532421, 0.022426317, 0.04044368, 0.0071754553, -0.016329395, 0.07821104, -0.010799062, 0.028486282, -0.11988229, 0.050181158, -0.06638024, 0.018165685, -0.008024109, 0.06605684]}, {"Category": "ANIMALS", "Question": "Weighing around a ton, the eland is the largest species of this animal in Africa", "Answer": "Antelope", "vector": [0.0036288444, 0.047642015, -0.010752833, 0.0068731396, -0.05822951, -0.021289738, -0.029202903, 0.062339913, -0.029444905, 0.114929214, -0.039529078, -0.08448059, -0.032510858, -0.022721842, -0.018464645, 0.05648316, 0.052410997, 0.008731449, -0.052532475, 0.0049615866, 0.11006476, -0.00827433, 0.006567755, 0.030663572, -0.06183133, -0.06279777, -0.16098985, 0.053500395, 0.03162659, -0.04692468, 0.005125649, 0.039959177, 0.086694464, 0.0154122785, -0.044833265, 0.0017179052, -0.055617616, -0.06215718, 0.056595724, 0.011226692, 0.07434014, 0.04186116, 0.03228062, -0.08039501, 0.00015373541, -0.03302043, -0.024779651, 0.021482753, -0.014737182, 0.051432375, 0.03867624, -0.0152254375, -0.09641719, 0.05178937, -0.06766587, -0.1335523, 0.028791232, -0.079649836, 0.03273099, -0.010937105, 0.047591973, 0.07787877, 0.05705967, 0.07632407, -0.028651528, -0.03139247, 0.0026667372, -0.03881882, -0.018779626, -0.021250777, 0.081002526, -0.095078655, -0.007918288, 0.018486869, -0.047539823, 0.028196864, -0.008564623, -0.0110177295, -9.02687e-05, 0.018311061, -0.0351916, -0.018604701, 0.036159966, -0.06308522, 0.06653436, -0.035766758, -0.034402847, 0.019082885, -0.09370263, 0.004376331, 0.03704278, 0.038376022, 0.02105901, 0.0727531, 0.018196851, -0.014178931, -0.03857306, -0.042350978, -0.047693644, -0.005129499, -0.000976622, 0.045825217, 0.09396243, -0.022385435, 0.02301569, -0.033403594, -0.032129727, 0.019090842, 0.06704173, -0.020240592, -0.07169469, 0.023404276, -0.008691326, 0.07579717, 0.04453809, -0.02129442, 0.006283091, 0.025520004, -0.08704943, 0.008246139, -0.002532162, -0.05005565, -0.048734628, -0.08956213, 0.13904591, 0.06109407, -0.0101444805, -3.832292e-33, 0.04758263, -0.08189156, -0.0034301942, -0.1177664, -0.031803686, 0.055961702, -0.029068908, 0.14227451, -0.03919123, 0.03949549, -0.065900296, 0.05532704, 0.09887516, 0.072279036, 0.022735953, -0.060855187, 0.02892194, -0.0017624956, 0.044674672, -0.052154303, 0.011012032, -0.106261835, 0.0013805933, 0.012555783, 0.0035489995, -0.034868684, -0.005970239, -0.02358964, -0.06797267, 0.013616032, 0.0024578422, -0.12265871, -0.08874196, 0.016973965, -0.040490903, -0.0890956, -0.018436575, -0.028222805, -0.0074665872, -0.034403015, 0.061049554, -0.03241065, 0.07660687, 0.0019533494, -0.015937861, 0.072318085, -0.048121054, -0.026574131, 0.013225308, 0.006485397, 0.022480493, 0.005898828, 0.070084356, 0.054504797, 0.029819636, 0.049372926, -0.029359754, 0.027100343, -0.050167657, 0.035219844, 0.02939997, 0.020335782, 0.0763458, 0.03006446, 0.1114852, -0.0191037, -0.031902615, -0.017137405, 0.017841313, -0.07067195, 0.086119615, -0.023282608, 0.10800863, 0.010683659, 0.003908203, 0.0081606945, 0.08349396, -0.033287726, -0.00606283, 0.03592447, -0.013163247, 0.057263806, 0.053026967, -0.03520229, -0.00544509, -0.031605307, -0.028597783, 0.029532442, 0.06592481, -0.02101234, 0.072509035, -0.0003418003, -0.10297556, -0.061336394, 0.04204235, 2.5714896e-33, -0.005284471, 0.06724392, -0.030393979, -0.026102312, 0.011974187, -0.03674762, 0.026842378, 0.07758543, -0.09567498, -0.024260068, 0.075714946, 0.011109129, 0.08332868, -0.05279337, 0.08838212, -0.064968444, -0.027719358, -0.07327132, 0.08640579, -0.06739798, -0.043887615, -0.054656837, 0.006649165, 0.021502977, 0.026880302, -0.013862687, -0.09271887, -0.044474635, 0.022206241, -0.055575587, -0.004866566, 0.06448938, 0.02201475, -0.0011395476, 0.0067868037, -0.018555366, 0.06639957, -0.028397005, -0.034602527, 0.016163865, 0.03414319, 0.047500506, -0.04598114, -0.040730923, 0.092763536, -0.04814122, 0.061548468, -0.031372663, 0.037507188, 0.018177077, 0.070098676, 0.02299496, 0.051466703, -0.0561555, 0.13999721, -0.0026881555, -0.002647118, 0.0051355152, -0.044061124, -0.07902957, 0.015175928, 0.02427633, 0.020657139, -0.0013894922, -0.06737782, 0.030695483, 0.024598682, -0.033634525, -0.001725292, 0.022920718, 0.010000622, 0.014799257, 0.022418391, -0.023635186, -0.04317333, 0.027387055, 0.03565266, -0.038193315, 0.04178428, -0.08104794, 0.04807619, 0.006100988, 0.122170895, 0.056450833, -0.04569238, 0.0103416005, -0.107954755, -0.03703743, -0.017680155, 0.085736305, -0.02381786, -0.03274799, 0.017394548, -0.021098936, 0.009246563, -1.9135108e-08, 0.024916431, 0.051547308, 0.045886856, 0.024538748, 0.09011232, 0.06878909, -0.01191818, -0.01279625, -0.025881013, 0.04616782, 0.026643319, 0.01523334, 0.010589296, 0.047594927, -0.015447012, 0.031576373, 0.024117408, -0.11554997, 0.027780805, -0.02135827, -0.07727207, 0.034191005, -0.09867248, -0.00901046, 0.08741873, -0.072392374, -0.069651924, 0.0054436, 0.04223368, 0.047106873, -0.046482153, -0.0013184897, -0.061934665, -0.02093532, 0.07395262, -0.056796208, -0.036969084, -0.04039828, 0.039846513, -0.059734587, 0.0053941472, 0.01726769, 0.05719754, -0.0030210381, 0.11871903, -0.007307108, -0.03202367, 0.020117009, -0.035091344, -0.09804959, -0.06322376, -0.04708762, -0.024480999, 0.022566285, -0.03481966, -0.002501331, -0.052839283, -0.03720142, -0.01118133, 0.10319831, -0.022083933, -0.018822793, 0.00567105, 0.010722794]}, {"Category": "ANIMALS", "Question": "Heaviest of all poisonous snakes is this North American rattlesnake", "Answer": "the diamondback rattler", "vector": [0.02762514, -0.03185526, 0.035155643, 0.0027587733, -0.012916657, -0.06237905, 0.024344822, -0.010812389, -0.01335988, 0.037737884, 0.051364243, -0.142239, -0.060316265, 0.094138846, 0.042909216, -0.07390385, 0.018761216, 0.012485962, 0.042854406, 0.053411104, 0.07278588, 0.06554535, 0.029307613, -0.023124736, -0.0854836, -0.049341656, 0.0019590196, 0.0365705, -0.004874408, -0.06964627, -0.09814436, -0.005173392, -0.044980697, -0.07971555, 0.0121670775, 0.029801225, 0.030774375, 0.077819474, 0.026835807, -0.0029903355, -0.008172886, 0.013132737, 0.049960725, -0.054779198, 0.036188114, 0.0554546, -0.03697973, 0.006527046, -0.029487276, -0.06306837, -0.050831977, -0.079151936, -0.06562816, -0.04036962, -0.072192356, 0.0053637065, -0.049158312, -0.13602515, 0.019125734, -0.015194834, 0.025791397, 0.015132077, 0.06511071, 0.080309644, 0.0018422653, -0.03366938, -0.00235242, -0.08290421, 0.08953762, -0.020141672, -0.06704612, -0.032974128, -0.019819777, -0.09293975, -0.060455006, 0.012083908, 0.0095959045, 0.0255465, 0.0035060996, 0.025410019, 0.025801351, 0.07739088, 0.061501898, -0.024174694, 0.04517073, 0.013640609, 0.0197759, -0.03319101, -0.15754156, 0.001245868, 0.0008744937, 0.0015456864, -0.010245323, -0.108902335, 0.0015987591, -0.026575504, 0.039434582, -0.051656585, -0.014757167, -0.015070843, -0.025023451, -0.094326936, 0.0885916, 0.055052888, 0.11550645, -0.002997668, -0.00461519, 0.029939162, 0.046164732, -0.012190114, -0.04257279, -0.01364719, -0.048259206, 0.04702669, 0.050208986, -0.01052779, -0.10642239, -0.048056453, -0.036979534, 0.03535325, 0.017263673, -0.07208654, 0.014354614, -0.034836885, 0.091242455, 0.012818542, -0.036798395, -2.933749e-33, 0.01374399, 0.01178575, 0.027263556, -0.10460375, -0.015078334, 0.030503169, 0.013937884, 0.0027889423, -0.043771513, 0.11417347, -0.06471881, 0.011372405, -0.049554434, 0.16306286, -0.08598845, -0.0023842065, -0.09868271, 0.045741476, -0.0489077, -0.03847101, 0.0069502518, 0.04100705, 0.05949376, -0.06848889, 0.028011935, -0.033200186, -0.06527677, -0.058003716, -0.072777666, -0.003515275, 0.017958239, 0.01143082, -0.023181718, 0.060008474, -0.005457309, -0.07541393, 0.07379839, -0.14029634, 0.03702232, 0.033388775, 0.007656197, -0.0045418493, 0.01373951, 0.038446397, -0.04069133, 0.04796184, 0.03998886, -0.010873969, -0.059530046, 0.0009007971, 0.08283914, 0.044980325, 0.044136465, 0.0012095858, 0.05546058, 0.021688914, -0.0116755245, 0.0058688964, -0.06447873, 0.023396028, 0.043737922, 0.029453695, -0.02665468, -0.10140126, -0.011958375, 0.04418368, -0.029491693, 0.023280784, 0.031878363, 0.0127887735, -0.024706393, -0.011192543, -0.008167267, -0.05270334, -0.05663025, 0.0243527, 0.06929017, 0.03300938, 0.034705196, 0.0592519, 0.027222324, 0.055646237, 0.014502708, -0.02384379, -0.0007057934, 0.03845545, 0.082024984, -0.074610084, 0.08794111, -0.028023358, 0.02325566, 0.02853741, -0.06036533, -0.036868457, 0.051827908, 1.1928272e-33, 0.020276012, -0.001943165, -0.007174605, 0.005025621, -0.095206425, -0.000918442, 0.08647576, 0.07568968, 0.006691367, 0.040316224, 0.0041944794, 0.082519345, -0.017966699, -0.08200842, 0.061592106, -0.010138322, 0.0006172476, -0.03304709, 0.051303808, -0.059595544, -0.086517945, -0.020291949, 0.013071765, -0.13525254, -0.01131169, 0.07290014, -0.05005881, -0.09599128, -0.012522436, -0.05817812, 0.024078714, 0.038994554, -0.043079063, -0.052377537, 0.023171045, -0.07453553, -0.041815355, -0.029319284, -0.035977423, -0.0013006483, 0.04927838, -0.06229052, 0.08338224, 0.023094505, 0.0643306, 0.016108634, 0.046378944, -0.0235118, -0.037573375, 0.07044097, 0.028602641, 0.02156332, 0.005591014, -0.035260484, 0.023208393, 0.010952036, 0.099363275, -0.045575015, -0.0003674757, -0.021892956, 0.06692754, -0.008938497, -0.057753544, 0.012636322, 0.047529086, 0.059101503, -0.04134703, 0.0016116515, 0.038395435, 0.05817712, 0.03489918, -0.0874474, -0.015085407, -0.11650487, 0.07616324, 0.08356801, -0.03815363, -0.05356548, 0.037098482, 0.023795316, 0.03109982, 0.0026527883, 0.043376468, 0.030667653, 0.055939753, 0.013982891, -0.073126286, 0.037237193, 0.08346177, 0.009567328, 0.018853504, -0.018065989, -0.020793652, 0.005097413, 0.0219292, -1.9347224e-08, -0.02816491, 0.018083159, 0.084265366, -0.044168625, -0.014539504, 0.04232313, -0.013509027, 0.0036524332, 0.0083701005, -0.025316829, -0.032764424, 0.018673012, -0.030139405, 0.064352706, 0.07113343, 0.08201213, -0.05788268, -0.04325335, -0.002009223, -0.019943794, -0.08187942, -0.00011018237, -0.06527554, 0.06316995, -0.07359977, 0.013711225, -0.019079152, 0.10223564, -0.03341389, 0.0018713268, 0.022658817, -0.048609395, -0.017133705, -0.0024818957, 0.0927432, 0.027640387, -0.01160837, -0.0777459, -0.01230266, -0.04366051, 0.03231122, -0.017837944, 0.066812515, 0.05408084, 0.045199562, 0.038318872, 0.060238924, -0.057849694, -0.017912801, 0.039625462, -0.09045805, 0.018734597, -0.051368557, 0.080547854, -0.014828859, -0.052033793, 0.02926645, -0.025787797, -0.008269452, 0.12023433, 0.026660347, 0.039270673, 0.07726294, 0.008006759]}, {"Category": "SCIENCE", "Question": "2000 news: the Gunnison sage grouse isn't just another northern sage grouse, but a new one of this classification", "Answer": "species", "vector": [0.021073915, -0.096644886, 0.015310335, -0.02760026, 0.1220858, -0.01488136, -0.0070941867, -0.081877485, -0.023289558, 0.027328068, -0.05626245, -0.009533235, -0.10204998, 0.025689963, -0.038542695, -0.031522468, -0.028417356, -0.119006746, 0.05821783, 0.070511006, -0.018361943, 0.05531101, 0.0392433, 0.07394487, -0.08561956, -0.06337843, -0.0550784, 0.15463923, -0.021478748, 0.0012400432, 0.01978363, 0.048181105, 0.01702299, -0.01061846, -0.0665221, -0.005320583, 0.014183154, 0.081509165, 0.011841156, 0.066971995, 0.020046532, -0.09502724, -0.021517197, 0.015773514, 0.014319925, 0.03507611, -0.009558975, -0.03954437, 0.0027333125, -0.023578212, 0.009631603, -0.074104115, -0.09523403, 0.053540837, -0.012518127, 0.09461592, -0.038902566, -0.05196094, -0.0410297, -0.05411203, 0.025906015, 0.07432821, -0.022791224, -0.0056591965, 0.05534081, 0.10996441, -0.062095404, -0.09442553, 0.079165705, -0.07210194, 0.050011147, -0.004104032, -0.072254226, 0.011179217, -0.07956759, 0.04504442, -0.019223673, 0.098439075, 0.06443581, -0.06806999, -0.049561635, 0.074197344, -0.00062476087, -0.069370784, 0.016211685, -0.050396305, 0.04325567, -0.055996116, -0.0563983, -0.08057324, 0.024256973, 0.006989676, 0.019881992, -0.033955343, 0.01963947, 0.06872127, 0.029744878, -0.0093246205, -0.019708157, -0.010544083, -0.0246536, -0.040924717, -0.039377227, -0.0057733944, -0.024915192, 0.05196872, -0.068859614, -0.009941646, 0.021158349, -0.095597535, -0.016242256, 0.047288086, 0.0632477, 0.06290054, 0.023195071, -0.021442376, 0.009438088, 0.065473005, -0.04070499, 0.046822228, -0.019236756, 0.05742717, 0.042858616, -0.026937429, 0.07609771, 0.037589766, -0.06356772, -5.8218144e-34, 0.0613099, -0.04362442, -0.03621255, -0.025135633, 0.01885135, 0.03327133, -0.029071892, 0.002033418, 0.01852196, -0.031568047, 0.05665685, -0.038813073, 0.022782119, 0.0010679957, -0.0641915, 0.089041315, 0.0032843717, 0.055092137, 0.016387034, -0.040029556, -0.08234888, 0.09058069, 0.043742817, -0.036441304, -0.047957897, -0.0045488477, 0.003589196, -0.038306452, -0.0049204472, -0.00097366015, -0.009382913, 0.0071385135, 0.0064147967, 0.034334224, 0.0074185855, -0.046025, 0.08127929, -0.046460763, 0.022985758, 0.009428039, 0.034536734, 0.030089729, 0.043812312, -0.019314395, 0.005361612, -0.044961985, -0.0004417388, -0.008469556, -0.020088427, -0.016216842, -0.0024550876, 0.05099801, 0.038349863, 0.011502888, -0.037713755, -0.021352533, 0.057190053, 0.083086774, -0.043510962, -0.1062601, 0.05371431, 0.034647834, -0.013466602, -0.10586069, 0.051231623, -0.093803376, -0.052970912, 0.06808083, -0.009215504, 0.12134781, 0.07660185, 0.029503848, -0.0812234, -0.05509396, 0.00900643, -0.039279085, -0.003875695, 0.013239488, 0.07513374, -0.015138206, -0.11949579, 0.08839502, -0.04585559, 0.01599059, -0.07113142, 0.0018923852, 0.047820926, 0.035034925, 0.04545429, -0.07395721, -0.040501893, 0.021044131, -0.037708078, -0.073379695, 0.055454094, -9.757111e-34, -0.05160999, 0.057388023, -0.06395284, 0.07198863, -0.057584316, 0.073744774, 0.026675891, -0.044610012, -0.018780407, 0.022923985, 0.038793646, 0.06975444, -0.007889481, -0.072727256, 0.07603018, -0.057450596, -0.054414276, 0.03499243, -0.008035237, -0.0093906615, 0.07218523, -0.010116531, -0.08222031, -0.01646893, -0.0031301118, -0.0032777865, -0.024519, 0.07113383, -0.04262997, -0.10883056, 0.038941924, 0.0014981573, -0.039038792, -0.04419314, 0.058754433, -0.006100611, 0.0650159, -0.046580236, -0.05658481, 0.032258842, 0.057340696, 0.005916122, 0.08632184, -0.009271562, 0.015661528, -0.09694318, 0.023481088, 0.07341475, 0.0069864076, 0.10472269, 0.041387666, -0.05761113, -0.0738242, 0.009264931, 0.020456104, -0.032296404, 0.0038991568, 0.026359025, -0.013885229, 0.007710613, -0.0112632, 0.08506464, -0.04151888, -0.023904009, -0.007895389, -0.036872905, -0.08290024, 0.059201207, -0.013180191, 0.05190829, 0.03975245, -0.0045043775, 0.027478358, -0.098195255, 0.04717767, 0.083257325, 0.07326744, -0.064294375, 0.05554431, -0.046983436, 0.03128688, -0.071775846, 0.062428586, 0.047607746, -0.015371857, 0.025855053, -0.016228061, 0.03385549, 0.057326403, -0.0015685129, -0.005931744, -0.037564795, -0.043779023, -0.029270843, 0.027050935, -2.5233636e-08, 0.04265756, 0.04655353, -0.027489798, 0.017466048, 0.024737723, 0.00045148665, -0.06287102, 0.018188406, 0.0060013104, 0.057184096, 0.07056025, -0.07607609, 0.049996715, 0.04434333, 0.058997314, 0.02562199, -0.005318211, 0.018940391, -0.07739735, 0.0034714676, -0.081098184, -0.012480127, -0.028351925, -0.0021463204, -0.04163527, -0.099286325, -0.016074046, -0.0052684485, -0.008919976, 0.02045224, 0.03347177, 0.013913959, -0.002015787, 0.055340208, 0.13482554, 0.021592218, -0.057357416, 0.103800654, 0.036979713, -0.016128823, -0.046379615, -0.054123253, -0.05857152, 0.03093336, 0.0006066622, -0.0765648, -0.07900983, -0.052622933, -0.062718846, 0.09114356, -0.033503257, -0.019269472, 0.077084705, 0.042850733, -0.05888127, -0.01065161, 0.0008584239, -0.07145864, 0.016768431, -0.023193734, 0.07841114, -0.027271079, 0.00050620607, 0.04094691]}, {"Category": "SCIENCE", "Question": "A metal that is ductile can be pulled into this while cold & under pressure", "Answer": "wire", "vector": [-0.016019743, 0.05704877, -0.026335495, 0.0024064924, 0.0063067805, 0.025883272, -0.07240123, 0.029089738, 0.016573364, 0.13160741, 0.055080365, -0.096136816, -0.085706115, -0.004167248, 0.041027274, -0.004151922, -0.009763737, -0.09353561, 0.02944898, 0.016087037, 0.06451336, -0.037866656, -0.04440442, -0.0091213295, -0.1082084, -0.06559331, -0.05787552, -0.0009283308, -0.013502924, -0.04441052, -0.023044894, -0.04989069, 0.04737338, 0.00095162727, 0.030767381, -0.00474052, 0.026456133, -0.074906506, 0.105470955, 0.05716323, 0.053692367, 0.007848671, -0.019545384, -0.09217592, 0.015982099, -0.020422379, -0.073749915, 0.04750513, 0.048666373, 0.044209186, -0.018378062, -0.084284, -0.13570774, 0.08713294, -0.073511526, -0.033442397, 0.01311426, -0.04835527, 0.042829737, -0.037624303, 0.015547725, 0.018138276, 0.051385734, 0.045943324, 0.015087998, -0.015706297, -0.042832088, -0.035007443, -0.05956782, 0.016617743, 0.038309064, 0.002327891, 0.05741499, 0.08298195, -0.05587623, -0.011413616, -0.03989338, -0.00425608, 0.035292264, -0.08042397, -0.011012276, -0.015140419, -0.04405198, 0.020950781, 0.020185646, 0.03684801, 0.016234528, -0.070603825, -0.110518955, -0.048833735, 0.042533338, 0.007550589, 0.013410096, -0.01404346, 0.013447732, 0.048395053, -0.026222775, 0.0135351885, -0.056813825, -0.004127113, -0.030876724, -0.041257024, 0.038951658, -0.0883503, -0.019679442, 0.04629491, -0.11000499, 0.010922228, 0.094479255, 0.051208258, -0.06625505, 0.010765627, 0.0045214174, 0.05914025, 0.020671286, 0.029306572, -0.07218954, -0.057630975, 0.031787533, -0.09430811, 0.007582936, 0.0023087482, 0.083059944, -0.002239073, 0.06750565, 0.0785775, 0.06392091, -2.5573357e-33, 0.11333065, -0.13907962, 0.103633955, -0.08462005, 0.010430683, 0.07620656, -0.069571875, -0.01353759, 0.014404673, -0.004133361, -0.0560155, -0.10201221, 0.024993459, -0.06550265, 0.0065206126, 0.02015162, 0.0019148289, 0.013569922, 0.019515658, 0.027808256, -0.0050604595, 0.039322134, 0.03535687, -0.021366892, 0.005002041, 0.06937875, -0.017151311, -0.07984225, -0.04405657, 0.009024512, -0.06732041, -0.08120257, -0.124130525, 0.072632864, -0.04349286, -0.0690144, 0.021614838, -0.08464685, -0.0388078, -0.04000831, 0.052656025, -0.03396572, 0.042223383, -0.029428009, 0.044834252, -0.0015992871, 0.009313979, 0.03606162, 0.022538831, 0.016183214, -0.043065514, 0.011682847, 0.013057805, 0.0029386429, -0.01951862, 0.0064931624, 0.037157312, 0.04664218, -0.0028386444, -0.0052897497, 0.07350803, 0.052526485, 0.029527355, 0.026048768, 0.08981026, 0.006397154, -0.11014967, 0.03995154, 0.046991706, -0.081497096, 0.012416843, -0.022615941, 0.03543129, -0.06084282, 0.00070905033, 0.028455658, 0.037885524, -0.010656283, -0.08164015, -0.0008024875, 0.005246488, 0.0593687, -0.007786547, 0.041646786, 0.0453763, 0.04353091, 0.06453672, 0.041025095, 0.056424115, -0.0428033, 0.08874772, 0.0072250995, -0.07480998, -0.034043945, 0.052626822, 8.143883e-34, -0.015937919, 0.0014813418, 0.05280151, -0.05201226, 0.017451638, -0.025451476, -0.0027299463, 0.07716625, -0.055364598, -0.023428475, 0.030200366, 0.010674826, 0.03302616, -0.04686426, 0.08588223, 0.010543678, -0.06774283, -0.028565953, 0.008674148, -0.049949814, -0.009157374, 0.0054751877, -0.021831917, 0.042667583, 0.042801917, 0.013262255, -0.0105721485, 0.086744405, 0.014184854, -0.07765599, 0.03836935, 0.076502204, -0.013781569, 0.0004151882, -0.003078733, -0.08629142, -0.052103158, 0.011784898, 0.07097837, 0.029373992, -0.025854727, 0.010841392, -0.07701131, -0.012430001, 0.028677084, 0.0040580346, 0.016884327, -0.03018921, -0.05015871, 0.10165682, -0.007862372, -0.027811965, -0.019507024, -0.13396157, 0.04882586, 0.0016234507, -0.08623855, 0.029248662, 0.057693135, -0.013815133, 0.05601909, 0.04302235, 0.053193875, 0.035595044, -0.028296778, 0.029597824, -0.06298823, 0.03519893, 0.026085576, 0.020140355, 0.12689842, -0.00084658555, -0.09170832, -0.014934101, 0.079730034, 0.016083589, -0.00014212311, -0.011646923, 0.054571826, -0.024909273, -0.101865664, -0.020186728, 0.049159445, 0.030546129, 0.0035611643, -0.020677043, -0.021900134, -0.028999269, 0.052290846, 0.072805494, -0.005732917, -0.0032252143, 0.057904545, 0.051995605, 0.0061733117, -2.0663098e-08, 0.047227982, 0.05960357, 0.101058066, 0.0072139357, 0.053620208, -0.070980035, 0.002445609, -0.04981908, 0.017736644, 0.031248663, 0.01012478, -0.018459164, 0.055213246, 0.019563867, 0.050253943, 0.054284744, 0.06536713, -0.07269944, -0.04246916, -0.005479838, -0.08252954, -0.058031004, -0.052403588, -0.0032862297, 0.014659191, -0.06341494, 0.054872356, -0.016352085, 0.0048883446, 0.041084703, -0.09880615, 0.02016281, -0.030983636, -0.07952514, 0.0917562, 0.05744455, 0.0055969027, 0.024209594, 0.0075459476, -0.12105593, 0.018537708, -0.036558464, 0.010555856, -0.00013983683, 0.031908125, -0.006238614, 0.02407905, -0.06836461, -0.020620126, -0.027434016, -0.12416399, -0.025374021, 0.011513816, 0.0018115366, -0.06659306, 0.007645949, -0.0028224401, 0.05043904, -0.052397262, 0.028688159, 0.1088028, 0.016841028, 0.1291935, 0.056956537]}, {"Category": "SCIENCE", "Question": "In 1953 Watson & Crick built a model of the molecular structure of this, the gene-carrying substance", "Answer": "DNA", "vector": [-0.094167955, -0.038394567, 0.0072854585, -0.022100829, 0.034447227, 0.005876683, -0.07304081, 0.08049148, -0.035762697, 0.0619526, 0.04308824, 0.026530974, 0.018850707, 0.06728442, -0.051341705, 0.05120076, -0.15177429, -0.078256436, 0.043335002, -0.01885061, -0.005592308, 0.028546734, 0.044430748, 0.015204543, -0.026336983, 0.116462715, 0.05869279, 0.01412927, -0.004119608, -0.019964445, 0.049573127, -0.032879747, 0.003815583, -0.026509201, 0.07022659, 0.047498707, -0.0006933924, -0.008581358, 0.0267179, 0.026489517, -0.004652198, -0.008358867, -0.01695746, 0.092027485, 0.06929073, -0.057529863, -0.027153397, -0.008996178, -0.041143823, 0.021085255, -0.031391814, -0.02662392, -0.040143523, 0.009868772, 0.0006685148, 0.046574246, -0.07812829, -0.0446898, -0.016684525, -0.023708744, -0.003884429, 0.035378322, -0.008174207, -0.019172385, 0.14960518, 0.03759762, 0.012735071, -0.036292713, 0.060268275, 0.015978942, -0.014637369, 0.014250731, -0.045864154, 0.022207607, 0.11384265, -0.012234959, -0.0024350428, -0.054032005, 0.0057919924, -0.015470605, -0.076572224, -0.0057177865, 0.013174719, 0.11271786, -0.03069596, 0.051459406, 0.04483756, 0.016016323, -0.036090683, -0.021580188, 0.016073208, -0.03754218, -0.044373985, -0.022636652, -0.02192958, 0.086684026, -0.046598915, 0.025118668, 0.10586848, -0.065449744, 0.008983105, 0.036122024, -0.01160078, -0.024104929, -0.050781224, -0.047349308, -0.012764282, 0.025065107, 0.011116398, 0.025841385, -0.031582404, 0.029139834, 0.0062897247, -0.019288404, 0.0079257125, -0.03606099, -0.085173905, 0.03349401, 0.030742215, -0.049164385, -0.01753319, -0.020048697, -0.054116834, -0.028789615, -0.021242224, 0.025246795, -0.08276726, -5.1658565e-33, 0.0024517858, 0.04827846, 0.009183015, 0.08986231, -0.085509405, -0.010787123, 0.010042863, 0.010161892, -0.105033696, -0.02159731, -0.043640867, 0.013198962, 0.007986099, -0.076239005, -0.041120477, -0.01708497, -0.068338834, 0.04264051, -0.019817034, 0.019023163, -0.026020117, -0.024171399, 0.009238838, -0.0317293, -0.0010355641, 0.042357717, -0.06388943, 0.02554009, -0.021278176, -0.009366734, 0.0068846275, 0.018708885, -0.07894002, 0.08479022, 0.10942871, 0.03285232, 0.0034845269, -0.04157191, -0.004366204, 0.06603568, 0.026872046, 0.021931892, 0.07260947, 0.019015001, -0.0008360731, 0.04180406, -0.015096457, -0.08038237, -0.06265546, 0.0028943387, 0.0292781, 0.017584136, 0.062455505, -0.053972535, -0.035813056, 0.034145206, -0.020044439, -0.03926179, 0.01948733, 0.041809294, 0.0060082003, 0.10963244, 0.021571124, -0.007207879, 0.09690139, -0.034292787, -0.09400992, -0.049928907, 0.07009608, 0.09798103, 0.04361023, 0.0055498914, -0.061389953, -0.036970716, 0.057585347, -0.039658155, -0.049391802, 0.0005762053, -0.009901863, 0.05367934, -0.036757305, -0.059134554, -0.028009074, -0.117484815, -0.04939226, -0.057859365, -0.038280733, -0.024499591, 0.038590614, -0.011706024, 0.05985131, -0.09330448, -0.024348129, -0.053657793, 0.052505225, 2.9358184e-33, 0.007508732, -0.08588198, 0.022845011, 0.011013786, -0.05702877, -0.030313827, -0.0004798593, -0.008684516, 0.061338305, 0.011527908, 0.11965446, 0.02327677, 0.00092836557, -0.0061355303, 0.00076074176, 0.04823991, -0.060461313, -0.017876344, 0.011414368, 0.052707706, -0.018565357, 0.11077724, -0.077524126, 0.046357844, 0.011923691, 0.059822347, -0.043286897, -0.015152533, 0.093264185, 0.0009282904, -0.08838567, -0.029632185, 0.016929876, 0.022020401, -0.035474483, 0.028910728, 0.043357562, 0.023951858, 0.06606072, -0.076481126, -0.021996034, 0.10237583, -0.09729005, -0.008713326, 0.070197076, 0.09455261, 0.008840129, 0.09409909, 0.009033482, -0.010426942, 0.037781883, 0.0022127752, 0.0034633512, -0.1044899, 0.012486539, 0.093285486, -0.07148079, -0.031678516, 0.054831125, 0.046018064, -0.030252071, -0.0586848, 0.0058542336, -0.0028089774, 0.011982103, -0.014108505, 0.01078994, 0.017818946, 0.015597082, -0.09737084, -0.06668589, -0.005450217, 0.13466075, 0.040471133, 0.091892764, -0.05193056, -0.0835173, 0.0020862853, -0.030704303, 0.03471155, 0.041042436, -0.028655771, 0.007626747, 0.043695427, 0.07003312, -0.07199358, -0.0068867537, -0.01199831, -0.041647576, -0.019824035, 0.0008856451, 0.030544002, -0.018340936, 0.14119308, 0.019860087, -2.0160167e-08, 0.058542706, -0.014567354, 0.08071923, -0.032675058, 0.100638725, 0.102834985, -0.04051649, 0.022885919, 0.06702876, 0.062770166, -0.0700851, 0.025798915, -0.023944816, 0.06549761, -0.048056282, 0.066318974, -0.021908559, -0.025240604, -0.040042475, -0.008097361, 0.026992772, -0.01255294, -0.029886091, 0.09398238, 0.051086362, 0.019594425, 0.018188613, -0.018089263, -0.066670485, -0.03781085, -0.06814747, -0.014598242, -0.055841498, 0.07655053, -0.009368503, 0.017288005, 0.04964713, -0.010779023, -0.07103901, 0.035082087, 0.010785266, 0.021247651, -0.12386983, 0.012308183, 0.058646146, 0.05771771, -0.10586616, 0.0039999047, -0.054877143, 0.069833875, 0.021411616, -0.04659403, 0.026374739, -0.07951497, -0.05696923, 0.0024229328, 0.035515696, -0.05498305, -0.037526347, -0.093284726, -0.020544276, 0.047586825, 0.15434109, -0.054754235]}, {"Category": "SCIENCE", "Question": "Changes in the tropospheric layer of this are what gives us weather", "Answer": "the atmosphere", "vector": [0.06139694, -0.026255429, -0.049582805, 0.0055874884, -0.031480778, -0.017528364, -0.039941862, -0.01162448, -0.09024076, -0.07036837, -0.083294526, -0.09255349, 0.05781688, 0.036496527, -0.062499154, 0.04331891, 0.057046883, 0.00811012, 0.02966934, 0.018889148, -0.04908459, 0.02398587, 0.002928549, 0.07639492, -0.07617834, -0.055646874, -0.081341065, -0.01159838, 0.040831674, -0.09423223, -0.024462262, -0.084667, -0.05066745, -0.093093984, 0.0192426, -0.08845757, -0.038622178, 0.03944056, 0.054052174, 0.023217235, 0.025451398, 0.08728197, -0.0025411334, 0.02891858, -0.038830254, -0.0050104284, -0.058513947, 0.024104865, 0.06083325, -0.018382378, 0.09049514, -0.01413145, -0.10262899, -0.013364372, 0.0783673, -0.10987099, 0.03634233, -0.060863018, 0.022339832, 0.008810712, 0.042503852, 0.021688433, 0.10423859, 0.03650659, 0.056206975, 0.0053338213, -0.049444962, 0.0059686117, 0.007925532, -0.058063757, 0.033847596, -0.07457997, -0.03192015, 0.034664143, -0.040609308, 0.038578372, 0.033696678, 0.08983835, -0.03895362, 0.031689767, -0.07964892, 0.03237071, 0.118636005, -0.104120396, 0.11866384, 0.06238597, -0.03935361, 0.055284258, -0.087808706, 0.09153102, 0.07144783, 0.015610792, 0.038009193, 0.061670102, -0.040231008, -0.018467382, 0.06281598, 0.016430834, -0.09904122, -0.02567528, 0.066956505, -0.076638356, 0.019959053, 0.03203178, 0.035480652, -0.0027648779, -0.02751452, -0.03181065, 0.0012892031, 0.025574716, 0.0128112575, 0.03571845, 0.0104699945, 0.013678599, -0.015014254, -0.03702743, -0.04703202, 0.05939644, 0.07558266, -0.045233667, -0.016811138, -0.018726403, -0.03928541, -0.039163437, 0.051825404, -0.027921045, -0.11926471, 7.9113865e-34, 0.010446717, -0.025277255, 0.06928512, -0.026584165, -0.026315011, -0.04414309, -0.054609496, -0.033156905, 0.020390855, 0.005368229, -0.0023678974, -0.03039928, 0.019450726, 0.051029336, -0.008647346, 0.027264014, -0.08826923, 0.019036124, -0.062456235, -0.08999333, 0.0036871964, -0.066926196, -0.05098304, 0.06752539, 0.00067973684, -0.024601763, -0.09120184, -0.008848391, -0.048325095, -0.012968202, 0.00077195594, -0.08223249, 0.024001086, 0.09838834, -0.0020380842, -0.06692758, 0.02441287, 0.029049514, -0.041646615, -0.05199113, 0.072281055, -0.022111082, -0.041070987, -0.011360954, 0.06697504, -0.009349015, -0.04249163, 0.08839683, -0.11752316, -0.040756535, 0.009933464, -0.08606545, 0.051455125, 0.039677948, 0.007276383, 0.05711932, 0.029873585, 0.00544608, 0.015961602, 0.01907902, -0.0063359854, 0.020544896, 0.05748763, -0.038416263, 0.018927213, -0.014926712, -0.059825283, -0.041772287, 0.023495905, -0.07056141, 0.046416596, 0.09232176, 0.07377586, -0.0301519, 0.03226762, -0.020936897, -0.011251021, 0.027084729, -0.010558109, 0.049485598, -0.04385544, 0.0042582587, 0.04580118, -0.01728374, 0.010791907, 0.039798424, 0.032043383, -0.07834857, 0.09561865, 0.10055616, 0.03822556, -0.0068017454, -0.0072616697, -0.047275558, -0.03219167, 1.5197995e-34, 0.007385208, 0.031128801, 0.11370423, -0.013491343, 0.052168168, -0.08211928, -0.013305917, 0.047649547, 0.036163878, -0.08120188, 0.006317918, 0.035556015, 0.016891185, 0.028940845, 0.04337384, -0.037031077, 0.05986245, 0.013374752, -0.005393398, -0.070621915, -0.06617827, -0.07218664, -0.12565741, -0.05537976, 0.012424343, 0.0066607683, -0.09578264, -0.0020201383, 0.08756874, -0.034441926, 0.008762068, 0.14200501, 0.06830558, 0.0965095, -0.06511605, -0.038536545, 0.009512278, 0.03576299, 0.054293394, 0.009754854, 0.026718646, 0.064711995, -0.112886906, 0.00067754916, 0.024077445, 0.05204231, 0.027921446, 0.011785816, -0.009096433, 0.01948533, 0.07957137, -0.020186706, 0.022218063, 0.103711136, 0.057470404, 0.03905061, 0.13052942, 0.044982735, 0.061785594, -0.015874393, -0.01070148, 0.01653453, -0.08996564, -0.004043702, -0.010566473, 0.036709305, -0.026501095, -0.018228173, -0.02176871, -0.0048777806, 0.0041118525, 0.03891216, 0.013148346, -0.08864414, 0.02976749, 0.010879495, -0.00096186594, -0.051970746, 0.02426518, -0.055567354, -0.05074616, 0.039938997, 0.041440938, 0.029004054, -0.0007625246, 0.03364858, -0.09165195, 0.03249057, -0.026518013, 0.031879354, -0.012588841, -0.016398136, 0.024833065, -0.02371425, 0.058886953, -2.1602812e-08, 0.04407959, 0.05529064, -0.10395166, -0.03633434, 0.054045882, 0.09915362, 0.12095581, 0.010876135, 0.009052727, 0.032333583, 0.06818428, -0.043601792, 0.014303386, -0.046961144, 0.011848813, 0.008253231, 0.025944946, -0.01438498, 0.0068898927, -0.05535114, -0.012623301, 0.05776057, -0.008368721, 0.047723092, 0.0114579005, -0.0033887425, -0.017032517, -0.007975577, 0.074658975, 0.006165256, 0.01338912, -0.047055203, -0.019635672, -0.049997296, 0.004169155, -0.018805826, -0.055072032, 0.012133132, 0.07220568, 0.050800137, 0.002766257, -0.033962924, 0.01050662, -0.03981474, -0.024855405, -0.044634804, -0.08203411, 0.0032899964, 0.0059595807, -0.055111114, 0.014351217, -0.033619244, 0.00535264, -0.05217462, 0.04478082, 0.07030833, 0.015323712, 0.029351328, -0.07642534, 0.02759837, 0.014870355, -0.081016146, 0.09305525, 0.03266634]}, {"Category": "SCIENCE", "Question": "In 70-degree air, a plane traveling at about 1,130 feet per second breaks it", "Answer": "Sound barrier", "vector": [0.009454548, 0.07183371, -0.087298304, 0.046105344, -0.007983356, -0.047463827, 0.007083513, 0.006866916, -0.04623664, -0.010563486, -0.033731762, 0.028498096, -0.09296456, -0.022795973, -0.044599336, -0.06771367, 0.017719844, -0.0027062588, 0.0049410206, 0.006746794, 0.061726827, -0.011169164, -0.002098313, -0.043687373, 0.088877365, -0.049950544, 0.03962821, -0.023176916, 0.017691094, -0.016991632, -0.021939004, 0.002002034, 0.04847632, -0.024382303, -0.039314322, 0.09296241, -0.045025002, 0.040374063, -0.079399474, -0.021937452, 0.011115606, -0.0040706284, -0.03745206, 0.014743122, 0.015613966, -0.0040838746, -0.08758113, -0.005501787, -0.019805236, 0.0061138785, -0.02721915, -0.022920316, -0.07483677, 0.07241712, 0.02674308, 0.051383637, -0.059468158, -0.01967719, -0.004049686, -0.08762603, -0.0810477, -0.0072302963, 0.0014677279, -0.022094613, 0.033850923, -0.061380856, 0.0729939, -0.093610615, -0.061289433, -0.06623711, -0.021322744, -0.036680795, 0.008520317, -0.042282607, 0.009089901, 0.015580153, -0.1151841, 0.011843604, 0.049414683, 0.11028332, 0.0671806, -0.004402494, 0.10580396, 0.036310345, -0.09191614, 0.045202464, -0.008342393, 0.04852042, -0.13533483, -0.00010244903, -0.019052034, 0.008917561, 0.050891835, -0.04318753, -0.018564347, -0.00618586, 0.056230053, -0.04490209, 0.07318729, -0.04814658, 0.017305678, 0.059367277, 0.021632953, 0.016707962, -0.08826012, 0.054039396, 0.01490227, 0.09879319, 0.080178805, 0.00055168674, -0.020811098, 0.102276705, 0.031250577, 0.05363496, -0.06986929, 0.12977189, 0.052065235, 0.012699345, -0.007850611, 0.12381526, -0.042189285, 5.6275305e-05, 0.06261011, 0.0040734145, 0.03504347, 0.077093124, 0.08316242, -2.438634e-33, 0.062147226, -0.07767481, -0.027133146, -0.039773624, 0.03334467, 0.032114595, -0.016832093, 0.02402665, 0.089899324, -0.026578803, -0.05186563, -0.015965976, -0.029345809, 0.13200772, -0.037376583, 0.036679458, -0.026114741, -0.013307235, 0.1101978, -0.01767682, -0.0053937337, -0.013657276, 0.022366729, 0.024484402, 0.027806047, 0.015550511, -0.08296911, 0.07856256, 0.036039248, 0.0132964095, -0.0027596368, -0.004621491, -0.01259961, 0.03247677, -0.00030359413, 0.12922859, -0.042492557, -0.003274744, -0.013558717, 0.031720802, 0.052012183, -0.05302681, 0.03398487, -0.053341527, 0.042987857, -0.05212066, -0.07558421, -0.03953495, -0.037567347, 0.092506275, 0.04196826, -0.021446595, -0.015774375, 0.013562858, -0.0017547958, 0.032213114, 0.010975387, -0.012690439, -0.060845103, 0.035197474, 0.039087385, 0.1335441, 0.044122957, 0.102526486, 0.027088385, 0.0097117815, -0.14434996, -0.07139298, -0.13019052, 0.018873544, -0.02007998, -0.018438153, 0.05625544, 0.0010186798, -0.05950898, 0.005961422, -0.039300837, -0.04345227, -0.012842064, -0.08851787, 0.029044706, 0.051400557, 0.008233438, -0.061172154, -0.03137526, -0.012630453, 0.021493636, -0.08982941, -0.008089333, -0.063197054, -0.026478054, 0.009178909, -0.1285766, -0.05175507, 0.014465807, -2.7710286e-34, 0.12187174, -0.06577201, -0.0019686061, -0.03555808, 0.03268554, 0.049029104, 0.030024651, -0.09295525, 0.056585822, 0.021225346, 0.020801831, 0.05980419, 0.021922529, -0.017487725, 0.03431869, -0.02418432, -0.040214773, -0.034429792, -0.10821757, -0.033978507, -0.040216137, 0.08495635, 0.012719748, -0.045997947, -0.0051103695, -0.061016064, 0.008451426, 0.002896397, 0.0109738605, -0.0027156374, -0.048194006, -0.01486743, -0.021696143, -0.034238275, 0.03555869, -0.019586163, -0.035007127, 0.007361171, 0.013437952, -0.043006822, 0.0002884996, 0.04522863, -0.018509107, -8.8743436e-05, 0.08853342, -0.0008785765, -0.023035614, -0.0042140996, 0.060283367, -0.04384937, -0.012095022, 0.024003994, -0.03980136, 0.031523224, -0.010352807, 0.07569905, 0.023284035, -0.018938864, 0.0022926778, -0.024564758, -0.030022597, -0.01816834, 0.019710151, 0.017907862, 0.056118857, 0.018752905, 0.11279351, 0.012502302, 0.07009996, 0.07804739, 0.059400924, -0.033526365, 0.0010291073, 0.06325452, -0.000981457, -0.004413179, -0.050645575, 0.0104672555, -0.0060247285, -0.07763716, 0.002973137, -0.002779167, 0.01780314, -0.05450924, 0.020938596, -0.14062724, -0.054897852, 0.022101732, -0.018404847, 0.015124841, -0.0071101924, -0.0048062797, -0.06631626, -0.088616066, 0.028578227, -2.1233124e-08, 0.043213334, -0.053981658, -0.017813252, 0.07787489, -0.043292332, -0.0050986507, 0.036328904, 0.036455717, 0.05996296, -0.051472962, -0.043375745, 0.12166345, -0.02711027, -0.072995484, 0.016960133, 0.04572876, -0.06912974, 0.014387116, -0.014357124, -0.020544264, -0.10046556, -0.07149407, -0.045670863, 0.07015779, 0.03386077, -0.056279253, 0.04509784, 0.08847901, -0.023382602, 0.04877364, 0.03809859, 0.030154021, 0.07078862, 0.027806578, -0.015588958, -0.08682065, 0.06578254, 0.06398093, -0.00789512, -0.021197837, 0.012233282, -0.0019395476, -0.06530267, -0.031488728, -0.02406564, -0.009930644, 0.051625166, 0.020044724, 0.03873037, 0.071258925, -0.018866802, -0.00089780585, -0.06616775, 0.009096628, 0.0011564946, -0.0020683703, -0.009303427, 0.0124801425, -0.019912222, -0.040819194, 0.02185497, 0.1105453, 0.10758064, -0.07564]}] -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "weaviate-client": "^2.14.3" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /quickstart_end_to_end.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "## Weaviate quickstart guide (as a notebook!)\n", 8 | "\n", 9 | "This notebook will guide you through the basics of Weaviate. You can find the full documentation [on our site here](https://weaviate.io/developers/weaviate/quickstart).\n", 10 | "\n", 11 | "\n", 12 | " \"Open\n", 13 | "" 14 | ] 15 | }, 16 | { 17 | "cell_type": "markdown", 18 | "metadata": {}, 19 | "source": [ 20 | "You will need the Weaviate Python client. If you don't yet have it installed - you can do so with:" 21 | ] 22 | }, 23 | { 24 | "cell_type": "code", 25 | "execution_count": 1, 26 | "metadata": {}, 27 | "outputs": [], 28 | "source": [ 29 | "# !pip install -U weaviate-client" 30 | ] 31 | }, 32 | { 33 | "cell_type": "markdown", 34 | "metadata": {}, 35 | "source": [ 36 | "### Weaviate instance\n", 37 | "\n", 38 | "For this, you will need a working instance of Weaviate somewhere. We recommend either:\n", 39 | "- Creating a free sandbox instance on Weaviate Cloud Services (https://console.weaviate.cloud/), or\n", 40 | "- Using [Embedded Weaviate](https://weaviate.io/developers/weaviate/installation/embedded).\n", 41 | "\n", 42 | "Instantiate the client using **one** of the following code examples:" 43 | ] 44 | }, 45 | { 46 | "cell_type": "markdown", 47 | "metadata": {}, 48 | "source": [ 49 | "#### For using WCS\n", 50 | "\n", 51 | "NOTE: Before you do this, you need to create the instance in WCS and get the credentials. Please refer to the [WCS Quickstart guide](https://weaviate.io/developers/wcs/quickstart)." 52 | ] 53 | }, 54 | { 55 | "cell_type": "code", 56 | "execution_count": 2, 57 | "metadata": {}, 58 | "outputs": [], 59 | "source": [ 60 | "# # For using WCS\n", 61 | "# import weaviate\n", 62 | "# import json\n", 63 | "# import os\n", 64 | "\n", 65 | "# client = weaviate.Client(\n", 66 | "# url = \"https://some-endpoint.weaviate.network\", # Replace with your endpoint\n", 67 | "# auth_client_secret=weaviate.AuthApiKey(api_key=\"YOUR-WEAVIATE-API-KEY\"), # Replace w/ your Weaviate instance API key\n", 68 | "# additional_headers = {\n", 69 | "# \"X-OpenAI-Api-Key\": os.environ[\"OPENAI_APIKEY\"] # Replace with your inference API key\n", 70 | "# }\n", 71 | "# )" 72 | ] 73 | }, 74 | { 75 | "cell_type": "markdown", 76 | "metadata": {}, 77 | "source": [ 78 | "#### For using Embedded Weaviate\n", 79 | "\n", 80 | "This will spin up a Weaviate instance in the background." 81 | ] 82 | }, 83 | { 84 | "cell_type": "code", 85 | "execution_count": 3, 86 | "metadata": {}, 87 | "outputs": [ 88 | { 89 | "name": "stdout", 90 | "output_type": "stream", 91 | "text": [ 92 | "Started /Users/jphwang/.cache/weaviate-embedded: process ID 21668\n" 93 | ] 94 | }, 95 | { 96 | "name": "stderr", 97 | "output_type": "stream", 98 | "text": [ 99 | "{\"action\":\"startup\",\"default_vectorizer_module\":\"none\",\"level\":\"info\",\"msg\":\"the default vectorizer modules is set to \\\"none\\\", as a result all new schema classes without an explicit vectorizer setting, will use this vectorizer\",\"time\":\"2023-08-18T01:52:22+01:00\"}\n", 100 | "{\"action\":\"startup\",\"auto_schema_enabled\":true,\"level\":\"info\",\"msg\":\"auto schema enabled setting is set to \\\"true\\\"\",\"time\":\"2023-08-18T01:52:22+01:00\"}\n", 101 | "{\"action\":\"hnsw_vector_cache_prefill\",\"count\":3000,\"index_id\":\"knowledgeblock_1q1b9BLntORd\",\"level\":\"info\",\"limit\":1000000000000,\"msg\":\"prefilled vector cache\",\"time\":\"2023-08-18T01:52:22+01:00\",\"took\":567417}\n", 102 | "{\"action\":\"hnsw_vector_cache_prefill\",\"count\":3000,\"index_id\":\"docchunk_ZzfkiDQ02JIO\",\"level\":\"info\",\"limit\":1000000000000,\"msg\":\"prefilled vector cache\",\"time\":\"2023-08-18T01:52:22+01:00\",\"took\":464208}\n", 103 | "{\"level\":\"warning\",\"msg\":\"Multiple vector spaces are present, GraphQL Explore and REST API list objects endpoint module include params has been disabled as a result.\",\"time\":\"2023-08-18T01:52:22+01:00\"}\n", 104 | "{\"action\":\"grpc_startup\",\"level\":\"info\",\"msg\":\"grpc server listening at [::]:50051\",\"time\":\"2023-08-18T01:52:22+01:00\"}\n", 105 | "{\"action\":\"hnsw_vector_cache_prefill\",\"count\":3000,\"index_id\":\"chunk_Ga9xZlRrrGhH\",\"level\":\"info\",\"limit\":1000000000000,\"msg\":\"prefilled vector cache\",\"time\":\"2023-08-18T01:52:22+01:00\",\"took\":15272542}\n", 106 | "{\"action\":\"restapi_management\",\"level\":\"info\",\"msg\":\"Serving weaviate at http://127.0.0.1:6666\",\"time\":\"2023-08-18T01:52:22+01:00\"}\n", 107 | "{\"action\":\"hnsw_vector_cache_prefill\",\"count\":3000,\"index_id\":\"question_cNPobrLkKipx\",\"level\":\"info\",\"limit\":1000000000000,\"msg\":\"prefilled vector cache\",\"time\":\"2023-08-18T01:52:22+01:00\",\"took\":33429500}\n" 108 | ] 109 | } 110 | ], 111 | "source": [ 112 | "# For using embedded\n", 113 | "import weaviate\n", 114 | "from weaviate.embedded import EmbeddedOptions\n", 115 | "import json\n", 116 | "import os\n", 117 | "\n", 118 | "client = weaviate.Client(\n", 119 | " embedded_options=EmbeddedOptions(),\n", 120 | " additional_headers = {\n", 121 | " \"X-OpenAI-Api-Key\": os.environ[\"OPENAI_APIKEY\"] # Replace with your inference API key\n", 122 | " }\n", 123 | ")" 124 | ] 125 | }, 126 | { 127 | "cell_type": "markdown", 128 | "metadata": {}, 129 | "source": [ 130 | "### Create a class" 131 | ] 132 | }, 133 | { 134 | "cell_type": "code", 135 | "execution_count": 4, 136 | "metadata": {}, 137 | "outputs": [], 138 | "source": [ 139 | "if client.schema.exists(\"Question\"):\n", 140 | " client.schema.delete_class(\"Question\")" 141 | ] 142 | }, 143 | { 144 | "cell_type": "code", 145 | "execution_count": 5, 146 | "metadata": {}, 147 | "outputs": [ 148 | { 149 | "name": "stderr", 150 | "output_type": "stream", 151 | "text": [ 152 | "{\"action\":\"hnsw_vector_cache_prefill\",\"count\":1000,\"index_id\":\"question_DAjXSD8bgF1b\",\"level\":\"info\",\"limit\":1000000000000,\"msg\":\"prefilled vector cache\",\"time\":\"2023-08-18T01:52:22+01:00\",\"took\":51959}\n" 153 | ] 154 | } 155 | ], 156 | "source": [ 157 | "class_obj = {\n", 158 | " \"class\": \"Question\",\n", 159 | " \"vectorizer\": \"text2vec-openai\", # If set to \"none\" you must always provide vectors yourself. Could be any other \"text2vec-*\" also.\n", 160 | " \"moduleConfig\": {\n", 161 | " \"text2vec-openai\": {},\n", 162 | " \"generative-openai\": {} # Ensure the `generative-openai` module is used for generative queries\n", 163 | " }\n", 164 | "}\n", 165 | "\n", 166 | "client.schema.create_class(class_obj)" 167 | ] 168 | }, 169 | { 170 | "cell_type": "markdown", 171 | "metadata": {}, 172 | "source": [ 173 | "### Add objects\n", 174 | "\n", 175 | "We'll add objects to our Weaviate instance using a batch import process.\n", 176 | "\n", 177 | "We shows you two options, where you can either:\n", 178 | "- Have Weaviate create vectors, or\n", 179 | "- Specify custom vectors." 180 | ] 181 | }, 182 | { 183 | "cell_type": "markdown", 184 | "metadata": {}, 185 | "source": [ 186 | "#### Have Weaviate create vectors (with `text2vec-openai`)" 187 | ] 188 | }, 189 | { 190 | "cell_type": "code", 191 | "execution_count": 6, 192 | "metadata": {}, 193 | "outputs": [ 194 | { 195 | "name": "stdout", 196 | "output_type": "stream", 197 | "text": [ 198 | "importing question: 1\n", 199 | "importing question: 2\n", 200 | "importing question: 3\n", 201 | "importing question: 4\n", 202 | "importing question: 5\n", 203 | "importing question: 6\n", 204 | "importing question: 7\n", 205 | "importing question: 8\n", 206 | "importing question: 9\n", 207 | "importing question: 10\n" 208 | ] 209 | } 210 | ], 211 | "source": [ 212 | "# Load data\n", 213 | "import requests\n", 214 | "url = 'https://raw.githubusercontent.com/weaviate-tutorials/quickstart/main/data/jeopardy_tiny.json'\n", 215 | "resp = requests.get(url)\n", 216 | "data = json.loads(resp.text)\n", 217 | "\n", 218 | "# Configure a batch process\n", 219 | "with client.batch(\n", 220 | " batch_size=100\n", 221 | ") as batch:\n", 222 | " # Batch import all Questions\n", 223 | " for i, d in enumerate(data):\n", 224 | " print(f\"importing question: {i+1}\")\n", 225 | "\n", 226 | " properties = {\n", 227 | " \"answer\": d[\"Answer\"],\n", 228 | " \"question\": d[\"Question\"],\n", 229 | " \"category\": d[\"Category\"],\n", 230 | " }\n", 231 | "\n", 232 | " client.batch.add_data_object(\n", 233 | " properties,\n", 234 | " \"Question\",\n", 235 | " )" 236 | ] 237 | }, 238 | { 239 | "cell_type": "markdown", 240 | "metadata": {}, 241 | "source": [ 242 | "#### Specify \"custom\" vectors (i.e. generated outside of Weaviate)" 243 | ] 244 | }, 245 | { 246 | "cell_type": "code", 247 | "execution_count": 7, 248 | "metadata": {}, 249 | "outputs": [], 250 | "source": [ 251 | "# # Load data\n", 252 | "# import requests\n", 253 | "# fname = \"jeopardy_tiny_with_vectors_all-OpenAI-ada-002.json\" # This file includes pre-generated vectors\n", 254 | "# url = f'https://raw.githubusercontent.com/weaviate-tutorials/quickstart/main/data/{fname}'\n", 255 | "# resp = requests.get(url)\n", 256 | "# data = json.loads(resp.text)\n", 257 | "\n", 258 | "# # Configure a batch process\n", 259 | "# with client.batch(\n", 260 | "# batch_size=100\n", 261 | "# ) as batch:\n", 262 | "# # Batch import all Questions\n", 263 | "# for i, d in enumerate(data):\n", 264 | "# print(f\"importing question: {i+1}\")\n", 265 | "\n", 266 | "# properties = {\n", 267 | "# \"answer\": d[\"Answer\"],\n", 268 | "# \"question\": d[\"Question\"],\n", 269 | "# \"category\": d[\"Category\"],\n", 270 | "# }\n", 271 | "\n", 272 | "# custom_vector = d[\"vector\"]\n", 273 | "# client.batch.add_data_object(\n", 274 | "# properties,\n", 275 | "# \"Question\",\n", 276 | "# vector=custom_vector # Add custom vector\n", 277 | "# )" 278 | ] 279 | }, 280 | { 281 | "cell_type": "markdown", 282 | "metadata": {}, 283 | "source": [ 284 | "### Queries" 285 | ] 286 | }, 287 | { 288 | "cell_type": "markdown", 289 | "metadata": {}, 290 | "source": [ 291 | "#### Semantic search\n", 292 | "\n", 293 | "Let's try a similarity search. We'll use nearText search to look for quiz objects most similar to biology." 294 | ] 295 | }, 296 | { 297 | "cell_type": "code", 298 | "execution_count": 8, 299 | "metadata": {}, 300 | "outputs": [ 301 | { 302 | "name": "stdout", 303 | "output_type": "stream", 304 | "text": [ 305 | "{\n", 306 | " \"data\": {\n", 307 | " \"Get\": {\n", 308 | " \"Question\": [\n", 309 | " {\n", 310 | " \"answer\": \"DNA\",\n", 311 | " \"category\": \"SCIENCE\",\n", 312 | " \"question\": \"In 1953 Watson & Crick built a model of the molecular structure of this, the gene-carrying substance\"\n", 313 | " },\n", 314 | " {\n", 315 | " \"answer\": \"species\",\n", 316 | " \"category\": \"SCIENCE\",\n", 317 | " \"question\": \"2000 news: the Gunnison sage grouse isn't just another northern sage grouse, but a new one of this classification\"\n", 318 | " }\n", 319 | " ]\n", 320 | " }\n", 321 | " }\n", 322 | "}\n" 323 | ] 324 | } 325 | ], 326 | "source": [ 327 | "nearText = {\"concepts\": [\"biology\"]}\n", 328 | "\n", 329 | "response = (\n", 330 | " client.query\n", 331 | " .get(\"Question\", [\"question\", \"answer\", \"category\"])\n", 332 | " .with_near_text(nearText)\n", 333 | " .with_limit(2)\n", 334 | " .do()\n", 335 | ")\n", 336 | "\n", 337 | "print(json.dumps(response, indent=4))" 338 | ] 339 | }, 340 | { 341 | "cell_type": "markdown", 342 | "metadata": {}, 343 | "source": [ 344 | "The response includes a list of top 2 (due to the limit set) objects whose vectors are most similar to the word biology.\n", 345 | "\n", 346 | "Notice that even though the word biology does not appear anywhere, Weaviate returns biology-related entries.\n", 347 | "\n", 348 | "This example shows why vector searches are powerful. Vectorized data objects allow for searches based on degrees of similarity, as shown here." 349 | ] 350 | }, 351 | { 352 | "cell_type": "markdown", 353 | "metadata": {}, 354 | "source": [ 355 | "#### Semantic search with a filter\n", 356 | "You can add a Boolean filter to your example. For example, let's run the same search, but only look in objects that have a \"category\" value of \"ANIMALS\"." 357 | ] 358 | }, 359 | { 360 | "cell_type": "code", 361 | "execution_count": 9, 362 | "metadata": {}, 363 | "outputs": [ 364 | { 365 | "name": "stdout", 366 | "output_type": "stream", 367 | "text": [ 368 | "{\n", 369 | " \"data\": {\n", 370 | " \"Get\": {\n", 371 | " \"Question\": [\n", 372 | " {\n", 373 | " \"answer\": \"the nose or snout\",\n", 374 | " \"category\": \"ANIMALS\",\n", 375 | " \"question\": \"The gavial looks very much like a crocodile except for this bodily feature\"\n", 376 | " },\n", 377 | " {\n", 378 | " \"answer\": \"Elephant\",\n", 379 | " \"category\": \"ANIMALS\",\n", 380 | " \"question\": \"It's the only living mammal in the order Proboseidea\"\n", 381 | " }\n", 382 | " ]\n", 383 | " }\n", 384 | " }\n", 385 | "}\n" 386 | ] 387 | } 388 | ], 389 | "source": [ 390 | "nearText = {\"concepts\": [\"biology\"]}\n", 391 | "\n", 392 | "response = (\n", 393 | " client.query\n", 394 | " .get(\"Question\", [\"question\", \"answer\", \"category\"])\n", 395 | " .with_near_text(nearText)\n", 396 | " .with_where({\n", 397 | " \"path\": [\"category\"],\n", 398 | " \"operator\": \"Equal\",\n", 399 | " \"valueText\": \"ANIMALS\"\n", 400 | " })\n", 401 | " .with_limit(2)\n", 402 | " .do()\n", 403 | ")\n", 404 | "\n", 405 | "print(json.dumps(response, indent=4))" 406 | ] 407 | }, 408 | { 409 | "cell_type": "markdown", 410 | "metadata": {}, 411 | "source": [ 412 | "The response includes a list of top 2 (due to the limit set) objects whose vectors are most similar to the word biology - but only from the \"ANIMALS\" category.\n", 413 | "\n", 414 | "Using a Boolean filter allows you to combine the flexibility of vector search with the precision of where filters." 415 | ] 416 | }, 417 | { 418 | "cell_type": "markdown", 419 | "metadata": {}, 420 | "source": [ 421 | "#### Generative search (single prompt)\n", 422 | "\n", 423 | "Next, let's try a generative search, where search results are processed with a large language model (LLM).\n", 424 | "\n", 425 | "Here, we use a `single prompt` query, and the model to explain each answer in plain terms." 426 | ] 427 | }, 428 | { 429 | "cell_type": "code", 430 | "execution_count": 10, 431 | "metadata": {}, 432 | "outputs": [ 433 | { 434 | "name": "stdout", 435 | "output_type": "stream", 436 | "text": [ 437 | "{\n", 438 | " \"data\": {\n", 439 | " \"Get\": {\n", 440 | " \"Question\": [\n", 441 | " {\n", 442 | " \"_additional\": {\n", 443 | " \"generate\": {\n", 444 | " \"error\": null,\n", 445 | " \"singleResult\": \"DNA is like a special code that tells our bodies how to grow and work. It's like a recipe book that has all the instructions for making you who you are. Just like a recipe book has different recipes for different foods, DNA has different instructions for making different parts of your body, like your eyes, hair, and even your personality! It's really amazing because it's what makes you unique and special.\"\n", 446 | " }\n", 447 | " },\n", 448 | " \"answer\": \"DNA\",\n", 449 | " \"category\": \"SCIENCE\",\n", 450 | " \"question\": \"In 1953 Watson & Crick built a model of the molecular structure of this, the gene-carrying substance\"\n", 451 | " },\n", 452 | " {\n", 453 | " \"_additional\": {\n", 454 | " \"generate\": {\n", 455 | " \"error\": null,\n", 456 | " \"singleResult\": \"Well, a species is a group of living things that are similar to each other in many ways. They have the same kind of body parts, like legs or wings, and they can have babies with other members of their species. For example, dogs are a species, and so are cats. They look different and act differently, but all dogs can have puppies with other dogs, and all cats can have kittens with other cats. So, a species is like a big family of animals or plants that are all related to each other in a special way.\"\n", 457 | " }\n", 458 | " },\n", 459 | " \"answer\": \"species\",\n", 460 | " \"category\": \"SCIENCE\",\n", 461 | " \"question\": \"2000 news: the Gunnison sage grouse isn't just another northern sage grouse, but a new one of this classification\"\n", 462 | " }\n", 463 | " ]\n", 464 | " }\n", 465 | " }\n", 466 | "}\n" 467 | ] 468 | } 469 | ], 470 | "source": [ 471 | "nearText = {\"concepts\": [\"biology\"]}\n", 472 | "\n", 473 | "response = (\n", 474 | " client.query\n", 475 | " .get(\"Question\", [\"question\", \"answer\", \"category\"])\n", 476 | " .with_near_text(nearText)\n", 477 | " .with_generate(single_prompt=\"Explain {answer} as you might to a five-year-old.\")\n", 478 | " .with_limit(2)\n", 479 | " .do()\n", 480 | ")\n", 481 | "\n", 482 | "print(json.dumps(response, indent=4))" 483 | ] 484 | }, 485 | { 486 | "cell_type": "markdown", 487 | "metadata": {}, 488 | "source": [ 489 | "We see that Weaviate has retrieved the same results as before. But now it includes an additional, generated text with a plain-language explanation of each answer." 490 | ] 491 | }, 492 | { 493 | "cell_type": "markdown", 494 | "metadata": {}, 495 | "source": [ 496 | "#### Generative search (grouped task)\n", 497 | "\n", 498 | "In the next example, we will use a grouped task prompt instead to combine all search results and send them to the LLM with a prompt. We ask the LLM to write a tweet about all of these search results." 499 | ] 500 | }, 501 | { 502 | "cell_type": "code", 503 | "execution_count": 12, 504 | "metadata": {}, 505 | "outputs": [ 506 | { 507 | "name": "stdout", 508 | "output_type": "stream", 509 | "text": [ 510 | "🧬 Did you know? In 1953, Watson & Crick 🧪 built a model of the molecular structure of DNA, the gene-carrying substance! 🧬 #ScienceFacts\n", 511 | "\n", 512 | "🐦🌿 Exciting news! In 2000, a new species 🆕 of sage grouse, the Gunnison sage grouse, was discovered. It's not just another northern sage grouse, but a unique classification! 🦆🌿 #ScienceDiscoveries\n" 513 | ] 514 | } 515 | ], 516 | "source": [ 517 | "response = (\n", 518 | " client.query\n", 519 | " .get(\"Question\", [\"question\", \"answer\", \"category\"])\n", 520 | " .with_near_text({\"concepts\": [\"biology\"]})\n", 521 | " .with_generate(grouped_task=\"Write a tweet with emojis about these facts.\")\n", 522 | " .with_limit(2)\n", 523 | " .do()\n", 524 | ")\n", 525 | "\n", 526 | "print(response[\"data\"][\"Get\"][\"Question\"][0][\"_additional\"][\"generate\"][\"groupedResult\"])" 527 | ] 528 | }, 529 | { 530 | "cell_type": "markdown", 531 | "metadata": {}, 532 | "source": [ 533 | "Generative search sends retrieved data from Weaviate to a large language model, or LLM. This allows you to go beyond simple data retrieval, but transform the data into a more useful form, without ever leaving Weaviate." 534 | ] 535 | }, 536 | { 537 | "cell_type": "markdown", 538 | "metadata": {}, 539 | "source": [ 540 | "Well done! In just a few short minutes, you have:\n", 541 | "\n", 542 | "- Created your own cloud-based vector database with Weaviate,\n", 543 | "- Populated it with data objects,\n", 544 | " - Using an inference API, or\n", 545 | " - Using custom vectors,\n", 546 | "- Performed searches, including:\n", 547 | " - Semantic search,\n", 548 | " - Sementic search with a filter and\n", 549 | " - Generative search." 550 | ] 551 | }, 552 | { 553 | "cell_type": "markdown", 554 | "metadata": {}, 555 | "source": [ 556 | "## Next\n", 557 | "\n", 558 | "You can do much more with Weaviate. We suggest trying:\n", 559 | "\n", 560 | "- Examples from our [search how-to](https://weaviate.io/developers/weaviate/search) guides for [keyword](https://weaviate.io/developers/weaviate/search/bm25), [similarity](https://weaviate.io/developers/weaviate/search/similarity), [hybrid](https://weaviate.io/developers/weaviate/search/hybrid), [generative](https://weaviate.io/developers/weaviate/search/generative) searches and [filters](https://weaviate.io/developers/weaviate/search/filters) or\n", 561 | "- Learning [how to manage data](https://weaviate.io/developers/weaviate/manage-data), like [reading](https://weaviate.io/developers/weaviate/manage-data/read), [batch importing](https://weaviate.io/developers/weaviate/manage-data/import), [updating](https://weaviate.io/developers/weaviate/manage-data/update), [deleting](https://weaviate.io/developers/weaviate/manage-data/delete) objects or [bulk exporting](https://weaviate.io/developers/weaviate/manage-data/read-all-objects) data.\n", 562 | "\n", 563 | "For more holistic learning, try [Weaviate Academy](https://weaviate.io/developers/academy). We have built free courses for you to learn about Weaviate and the world of vector search.\n", 564 | "\n", 565 | "You can also try a larger, [1,000 row](https://raw.githubusercontent.com/databyjp/wv_demo_uploader/main/weaviate_datasets/data/jeopardy_1k.json) version of the Jeopardy! dataset, or [this tiny set of 50 wine reviews](https://raw.githubusercontent.com/databyjp/wv_demo_uploader/main/weaviate_datasets/data/winemag_tiny.csv)." 566 | ] 567 | }, 568 | { 569 | "cell_type": "markdown", 570 | "metadata": {}, 571 | "source": [] 572 | } 573 | ], 574 | "metadata": { 575 | "kernelspec": { 576 | "display_name": "base", 577 | "language": "python", 578 | "name": "python3" 579 | }, 580 | "language_info": { 581 | "codemirror_mode": { 582 | "name": "ipython", 583 | "version": 3 584 | }, 585 | "file_extension": ".py", 586 | "mimetype": "text/x-python", 587 | "name": "python", 588 | "nbconvert_exporter": "python", 589 | "pygments_lexer": "ipython3", 590 | "version": "3.10.12" 591 | }, 592 | "orig_nbformat": 4 593 | }, 594 | "nbformat": 4, 595 | "nbformat_minor": 2 596 | } 597 | --------------------------------------------------------------------------------