Notebooks
W
Weaviate
Rag Llama 2 Ollama

Rag Llama 2 Ollama

vector-searchvector-databaseretrieval-augmented-generationllm-frameworksweaviate-featuresfunction-callingweaviate-recipesmodel-providersPythongenerative-aimeta

Open In Colab

Local RAG with Ollama and Weaviate

This example is based on a post in the Ollama blog titled "Embedding models".

Setup

  1. Download and install Ollama for your operating system: https://ollama.com/download
  2. pip install the Python library to generate vector embeddings from the model with pip install ollama. (REST API or JavaScript library also available)
[1]
  1. Pull relevant LLM and embedding model
[2]
  1. Optional: Test if it works (ollama run llama2)
[3]

The sky appears blue because of a phenomenon called Rayleigh scattering. When sunlight enters Earth's atmosphere, it encounters tiny molecules of gases such as nitrogen and oxygen. These molecules scatter the light in all directions, but they scatter shorter (blue) wavelengths more than longer (red) wavelengths. This is known as Rayleigh scattering.

As a result of this scattering, the blue light is dispersed throughout the atmosphere, giving the sky its blue appearance. The blue color is most visible in the morning and evening when the sun is low on the horizon because the light has to travel through more of the atmosphere to reach our eyes, allowing more time for the blue light to be scattered.

It's worth noting that the blue color of the sky can vary depending on a number of factors, including the amount of dust and water vapor in the atmosphere, which can absorb or scatter certain wavelengths of light. For example, during sunrise and sunset, when the sun is low on the horizon, the sky can take on hues of red, orange, and pink due to the scattering of light by atmospheric particles.
[4]
{'embedding': [-0.021702591329813004,
,  0.15009357035160065,
,  -0.3400360345840454,
,  0.09298147261142731,
,  -0.39127838611602783,
,  0.06238943338394165,
,  -0.33130955696105957,
,  -0.2786891460418701,
,  0.09664438664913177,
,  0.13602189719676971,
,  0.4002634286880493,
,  -0.41067466139793396,
,  0.21043244004249573,
,  0.031082946807146072,
,  0.06574380397796631,
,  -0.1371842920780182,
,  -0.08826376497745514,
,  0.023083731532096863,
,  -0.2947360873222351,
,  0.28975099325180054,
,  0.07283814996480942,
,  0.01543290726840496,
,  0.2452796846628189,
,  0.14312325417995453,
,  -0.2776225209236145,
,  0.5459028482437134,
,  -0.09798812866210938,
,  0.02923489920794964,
,  0.02753671631217003,
,  0.15834477543830872,
,  -0.29225167632102966,
,  0.003948435187339783,
,  0.014535926282405853,
,  -0.03330737352371216,
,  -0.2809745669364929,
,  0.23154978454113007,
,  0.23709622025489807,
,  0.612492024898529,
,  0.40364035964012146,
,  0.3277810215950012,
,  0.09551140666007996,
,  -0.007477905601263046,
,  0.33145445585250854,
,  -0.1987178474664688,
,  0.23117336630821228,
,  -0.31999683380126953,
,  -0.15714102983474731,
,  0.32886379957199097,
,  0.1591758131980896,
,  0.3830070197582245,
,  -0.10633336752653122,
,  -0.3779163360595703,
,  -0.06335574388504028,
,  0.02888503670692444,
,  0.22468352317810059,
,  -0.13662099838256836,
,  -0.3946607708930969,
,  -0.05114562064409256,
,  -0.0750737264752388,
,  0.014846203848719597,
,  0.2771098017692566,
,  0.24762699007987976,
,  -0.0807596892118454,
,  0.18020951747894287,
,  -0.10787424445152283,
,  -0.11106055974960327,
,  0.10673438012599945,
,  0.01676912233233452,
,  -0.03313891589641571,
,  -0.4681059718132019,
,  -0.1669580638408661,
,  -0.13353213667869568,
,  -0.05984427034854889,
,  0.588444709777832,
,  -0.690241277217865,
,  0.4033109247684479,
,  0.34067559242248535,
,  0.01959913596510887,
,  -0.22114047408103943,
,  0.17639502882957458,
,  -0.11780333518981934,
,  0.44363126158714294,
,  -0.17502981424331665,
,  0.12849470973014832,
,  -0.05145959556102753,
,  0.20652972161769867,
,  0.15372338891029358,
,  -0.1748417168855667,
,  -0.022024299949407578,
,  -0.12791378796100616,
,  -0.12482046335935593,
,  -0.37300729751586914,
,  0.3348013162612915,
,  0.009924901649355888,
,  0.08372540026903152,
,  0.05337611585855484,
,  0.34475329518318176,
,  0.23181286454200745,
,  -0.3164764642715454,
,  -0.07851649820804596,
,  -0.080330990254879,
,  -0.36906296014785767,
,  0.07940836250782013,
,  0.17657560110092163,
,  -0.05228140577673912,
,  0.15680699050426483,
,  -0.3909085988998413,
,  0.016110632568597794,
,  -0.06887106597423553,
,  -0.4764823913574219,
,  -0.5295385122299194,
,  0.16592156887054443,
,  -0.39453214406967163,
,  0.38629207015037537,
,  -0.04188971966505051,
,  0.1296466737985611,
,  -0.0789070799946785,
,  -0.09044595807790756,
,  -0.2526743710041046,
,  -0.32396456599235535,
,  -0.07270415872335434,
,  -0.14889097213745117,
,  0.20535244047641754,
,  -0.10211379081010818,
,  0.6262146234512329,
,  -0.001491781324148178,
,  -0.28333917260169983,
,  -2.210018717116563e-32,
,  0.21621525287628174,
,  -0.4405490458011627,
,  0.2245812714099884,
,  0.11282235383987427,
,  0.22313231229782104,
,  -0.18107499182224274,
,  -0.3172353506088257,
,  0.32481735944747925,
,  -0.2742753326892853,
,  -0.05880996584892273,
,  -0.4665745794773102,
,  0.26639872789382935,
,  0.002769988030195236,
,  0.06133321300148964,
,  0.030428092926740646,
,  0.2154613584280014,
,  -0.3482128977775574,
,  -0.2786923050880432,
,  0.03529033437371254,
,  -0.6489147543907166,
,  -0.266102135181427,
,  0.5444015264511108,
,  0.19716082513332367,
,  -0.10562965273857117,
,  -0.40842315554618835,
,  0.14724555611610413,
,  0.4031989574432373,
,  -0.5433954000473022,
,  -0.36450469493865967,
,  0.12598760426044464,
,  -0.07294467836618423,
,  0.09234243631362915,
,  -0.13638709485530853,
,  -0.08374717831611633,
,  -0.32725441455841064,
,  0.11774803698062897,
,  -0.15653365850448608,
,  -0.43038618564605713,
,  -0.2528173327445984,
,  -0.01656607910990715,
,  -0.12638282775878906,
,  -0.03797027841210365,
,  0.06114402040839195,
,  0.1220865249633789,
,  -0.18937177956104279,
,  -0.15063504874706268,
,  -0.13687387108802795,
,  -0.416470468044281,
,  0.07791389524936676,
,  0.22808954119682312,
,  -0.030072001740336418,
,  0.24327495694160461,
,  0.020738013088703156,
,  0.11312635987997055,
,  -0.20308968424797058,
,  -0.028681941330432892,
,  0.19701895117759705,
,  0.37422239780426025,
,  -0.313299298286438,
,  0.32864928245544434,
,  0.08319874107837677,
,  -0.18931031227111816,
,  0.09481986612081528,
,  -0.1290951371192932,
,  -0.0058138612657785416,
,  0.1472136378288269,
,  -0.06601773947477341,
,  0.1989586353302002,
,  0.608880877494812,
,  0.09035224467515945,
,  0.22145870327949524,
,  0.24014881253242493,
,  -0.006496774964034557,
,  -0.09509661793708801,
,  0.29174792766571045,
,  -0.03501240536570549,
,  0.09341610968112946,
,  0.08965088427066803,
,  0.05770811811089516,
,  0.009675804525613785,
,  0.0038124360144138336,
,  0.21865952014923096,
,  0.3101324141025543,
,  0.0012845546007156372,
,  -0.5051205158233643,
,  0.12877079844474792,
,  0.17668074369430542,
,  0.2363288402557373,
,  -0.31745266914367676,
,  -0.3854566216468811,
,  0.15840032696723938,
,  0.5517159700393677,
,  -0.08996646106243134,
,  -0.4578399658203125,
,  0.40151336789131165,
,  1.8944454302264148e-33,
,  0.09603863954544067,
,  -0.16221070289611816,
,  -0.015545235015451908,
,  -0.20651227235794067,
,  -0.08696769177913666,
,  -0.1920921802520752,
,  0.20809423923492432,
,  0.023980597034096718,
,  -0.3416011333465576,
,  0.13178463280200958,
,  -0.18798156082630157,
,  0.07642962038516998,
,  -0.1488245129585266,
,  -0.12669305503368378,
,  0.027890371158719063,
,  -0.07710729539394379,
,  -0.03238947317004204,
,  -0.11722266674041748,
,  0.022391319274902344,
,  -0.6184052228927612,
,  -0.004255745559930801,
,  0.19981344044208527,
,  0.14298711717128754,
,  -0.40078234672546387,
,  0.15447095036506653,
,  -0.36764657497406006,
,  -0.15103334188461304,
,  0.1299370527267456,
,  -0.19109246134757996,
,  -0.037715137004852295,
,  -0.09020310640335083,
,  0.16580255329608917,
,  0.018757697194814682,
,  -0.21386775374412537,
,  0.15066564083099365,
,  -0.032147713005542755,
,  -0.3509998023509979,
,  0.014848656952381134,
,  -0.12364213168621063,
,  -0.19667983055114746,
,  0.062315113842487335,
,  0.14970600605010986,
,  -0.2723986506462097,
,  -0.1721404641866684,
,  0.40257713198661804,
,  0.3444192409515381,
,  -0.0477236844599247,
,  -0.10657680034637451,
,  0.011397507041692734,
,  -0.05431567132472992,
,  0.5239127278327942,
,  0.0903012752532959,
,  0.13093441724777222,
,  0.10880371928215027,
,  0.6325736045837402,
,  -0.11031705141067505,
,  -0.07835827022790909,
,  -0.12132937461137772,
,  0.1159333735704422,
,  -0.005482152104377747,
,  0.17484456300735474,
,  -0.10955652594566345,
,  -0.09429026395082474,
,  -0.10824026167392731,
,  0.07637329399585724,
,  -0.07539671659469604,
,  -0.13584773242473602,
,  -0.24532866477966309,
,  0.4382590353488922,
,  0.09993459284305573,
,  0.27735233306884766,
,  -0.4471100866794586,
,  -0.18954628705978394,
,  -0.19322609901428223,
,  0.2658289670944214,
,  -0.2755199670791626,
,  -0.22317704558372498,
,  -0.2857556939125061,
,  0.20439419150352478,
,  -0.036813218146562576,
,  -0.15310941636562347,
,  -0.13762041926383972,
,  0.29591473937034607,
,  0.16756992042064667,
,  -0.08321479707956314,
,  -0.08374857157468796,
,  0.33681291341781616,
,  0.3415456712245941,
,  0.14816950261592865,
,  0.3281787633895874,
,  0.013393035158514977,
,  -0.08601508289575577,
,  0.15495190024375916,
,  -0.14077791571617126,
,  0.11236481368541718,
,  -1.0034752762067001e-07,
,  -0.03876318782567978,
,  0.14353102445602417,
,  0.05328653007745743,
,  0.21538013219833374,
,  0.08567828685045242,
,  0.46678435802459717,
,  -0.36198586225509644,
,  0.3673556447029114,
,  0.15739580988883972,
,  0.33496230840682983,
,  0.3561929762363434,
,  -0.011168988421559334,
,  0.11152113229036331,
,  0.40554776787757874,
,  -0.032877273857593536,
,  -0.06129052862524986,
,  0.11165933310985565,
,  -0.013202082365751266,
,  -0.023103684186935425,
,  0.13975790143013,
,  -0.46805834770202637,
,  -0.12229961901903152,
,  -0.22268787026405334,
,  0.09355314821004868,
,  -0.052904173731803894,
,  -0.32686373591423035,
,  -0.18949583172798157,
,  0.07504169642925262,
,  0.26273706555366516,
,  -0.039956994354724884,
,  -0.5213021636009216,
,  -0.20743031799793243,
,  -0.038431208580732346,
,  -0.5030588507652283,
,  -0.1806439310312271,
,  0.2684711217880249,
,  -0.10094627737998962,
,  -0.21464721858501434,
,  0.23262199759483337,
,  0.05883871018886566,
,  0.020660415291786194,
,  -0.6513321399688721,
,  0.14621634781360626,
,  0.3055979013442993,
,  0.44207507371902466,
,  0.0747411921620369,
,  0.2995058596134186,
,  -0.015410095453262329,
,  -0.5710037350654602,
,  -0.42376139760017395,
,  0.2118798792362213,
,  0.01843087375164032,
,  0.035425569862127304,
,  -0.17589356005191803,
,  -0.43282395601272583,
,  -0.3759150803089142,
,  -0.308958500623703,
,  -0.13737677037715912,
,  0.27137893438339233,
,  0.011830795556306839,
,  0.1924123913049698,
,  0.08476188778877258,
,  0.33317285776138306,
,  0.16225981712341309]}

Step 1: Generate embeddings

[5]
[6]
Started /Users/leonie/.cache/weaviate-embedded: process ID 32850
{"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":"2024-04-09T13:30:52+02:00"}
{"action":"startup","auto_schema_enabled":true,"level":"info","msg":"auto schema enabled setting is set to \"true\"","time":"2024-04-09T13:30:52+02:00"}
{"level":"info","msg":"No resource limits set, weaviate will use all available memory and CPU. To limit resources, set LIMIT_RESOURCES=true","time":"2024-04-09T13:30:52+02:00"}
{"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":"2024-04-09T13:30:52+02:00"}
{"action":"grpc_startup","level":"info","msg":"grpc server listening at [::]:50050","time":"2024-04-09T13:30:52+02:00"}
{"action":"restapi_management","level":"info","msg":"Serving weaviate at http://127.0.0.1:8079","time":"2024-04-09T13:30:52+02:00"}
True
[7]
{"level":"info","msg":"Created shard docs_SN8loOvzlYv7 in 1.157084ms","time":"2024-04-09T13:30:52+02:00"}
{"action":"hnsw_vector_cache_prefill","count":1000,"index_id":"main","level":"info","limit":1000000000000,"msg":"prefilled vector cache","time":"2024-04-09T13:30:52+02:00","took":38083}
[8]
{"level":"info","msg":"Completed loading shard myexampleindex_XGMjGqT60mbO in 2.642125ms","time":"2024-04-09T13:30:52+02:00"}
{"level":"info","msg":"Completed loading shard llamaindex_dWivqPiChdO8 in 5.01475ms","time":"2024-04-09T13:30:52+02:00"}
{"action":"hnsw_vector_cache_prefill","count":3000,"index_id":"main","level":"info","limit":1000000000000,"msg":"prefilled vector cache","time":"2024-04-09T13:30:52+02:00","took":225208}
{"level":"info","msg":"Completed loading shard mycontent_oiMgIfNpvwWZ in 706.541µs","time":"2024-04-09T13:30:52+02:00"}
{"action":"hnsw_vector_cache_prefill","count":3000,"index_id":"main","level":"info","limit":1000000000000,"msg":"prefilled vector cache","time":"2024-04-09T13:30:52+02:00","took":33000}
{"action":"hnsw_vector_cache_prefill","count":3000,"index_id":"main","level":"info","limit":1000000000000,"msg":"prefilled vector cache","time":"2024-04-09T13:30:52+02:00","took":8005667}
{"level":"info","msg":"Completed loading shard llamaindex_filter_fKXpSjFDc0KK in 5.150667ms","time":"2024-04-09T13:30:52+02:00"}
{"action":"hnsw_vector_cache_prefill","count":3000,"index_id":"main","level":"info","limit":1000000000000,"msg":"prefilled vector cache","time":"2024-04-09T13:30:52+02:00","took":385625}
{"level":"info","msg":"Completed loading shard myexternalcontext_T58iI8xW5iA8 in 4.168958ms","time":"2024-04-09T13:30:52+02:00"}
{"action":"hnsw_vector_cache_prefill","count":3000,"index_id":"main","level":"info","limit":1000000000000,"msg":"prefilled vector cache","time":"2024-04-09T13:30:52+02:00","took":5969292}
[9]
QueryReturn(objects=[Object(uuid=_WeaviateUUIDInt('56f66958-dbee-469a-a170-ebfc1b65172e'), metadata=MetadataReturn(creation_time=None, last_update_time=None, distance=None, certainty=None, score=None, explain_score=None, is_consistent=None, rerank_score=None), properties={'text': 'Llamas weigh between 280 and 450 pounds and can carry 25 to 30 percent of their body weight'}, references=None, vector={'default': [0.20390161871910095, 0.23614734411239624, -0.38450300693511963, 0.41218075156211853, -0.3761504888534546, -0.13563679158687592, 0.05481676757335663, -0.08999389410018921, -0.39202630519866943, 0.5020553469657898, 0.33837682008743286, -0.6673769950866699, 0.1679535210132599, 0.3123660385608673, 0.025210224092006683, 0.210839182138443, 0.3430388867855072, -0.213998943567276, -0.30820319056510925, 0.4516986906528473, 0.21469347178936005, -0.06823334842920303, -0.0848790630698204, 0.07997660338878632, -0.3046180009841919, 0.23734384775161743, -0.40219777822494507, -0.008450683206319809, 0.048596084117889404, -0.041891977190971375, -0.46394863724708557, -0.09091179817914963, 0.06493058055639267, -0.1123972088098526, -0.6799883842468262, 0.03633490949869156, 0.053898219019174576, -0.17885512113571167, 0.25682663917541504, 0.26240891218185425, 0.16762204468250275, 0.5017691254615784, 0.06400685012340546, 0.036683619022369385, 0.018679458647966385, -0.49890652298927307, -0.43865659832954407, 0.3001047968864441, 0.018481425940990448, 0.5438300967216492, -0.03533543273806572, -0.32382023334503174, -0.12369605153799057, 0.2477201521396637, 0.11258567869663239, -0.4861973524093628, -0.011881085112690926, -0.4267210364341736, -0.2308068573474884, -0.04821677505970001, 0.2688342332839966, 0.3935123085975647, 0.009952162392437458, -0.05888410285115242, 0.13321788609027863, -0.2236717790365219, -0.36623674631118774, -0.2272404283285141, -0.25023698806762695, -0.19935305416584015, 0.016127046197652817, -0.11143293231725693, -0.1407550573348999, 0.43768471479415894, -0.34951773285865784, -0.15362265706062317, 0.20974719524383545, -0.08247919380664825, -0.17015963792800903, 0.28167957067489624, -0.3633929193019867, -0.03433013707399368, 0.04478272423148155, 0.1255963146686554, 0.20396490395069122, 0.19866180419921875, -0.12755869328975677, 0.2826012969017029, -0.4045286178588867, 0.013326466083526611, 0.08172477036714554, -0.06114944815635681, 0.06982796639204025, -0.013289744034409523, -0.12762102484703064, 0.14036931097507477, -0.32449039816856384, -0.0021496517583727837, -0.23948809504508972, -0.20359888672828674, 0.10313919186592102, -0.22894126176834106, 0.3786284029483795, 0.17538774013519287, -0.2727423310279846, 0.044700391590595245, 0.2451881468296051, 0.3232765197753906, 0.13323673605918884, 0.11221841722726822, -0.271648108959198, -0.008048838004469872, 0.0050802044570446014, 0.6043242812156677, -0.108094722032547, 0.035162221640348434, -0.13659659028053284, -0.014479465782642365, -0.17689767479896545, 0.0537700280547142, -0.027266543358564377, -0.12676560878753662, 0.2828406095504761, -0.4246187210083008, 0.4269537925720215, 0.004925549030303955, -0.3751378655433655, 5.940063154872878e-34, 0.08846211433410645, -0.3159000873565674, 0.19132748246192932, 0.23626059293746948, 0.08255765587091446, -0.23222613334655762, -0.27749401330947876, 0.18769429624080658, 0.14098681509494781, 0.0027011949568986893, -0.40234604477882385, 0.06884467601776123, 0.14881080389022827, 0.13973790407180786, 0.18265582621097565, -0.12307804822921753, -0.12755241990089417, -0.08002340793609619, 0.24063831567764282, -0.3406171202659607, -0.1948944628238678, -0.030762214213609695, 0.14060834050178528, -0.25106534361839294, 0.02095835469663143, 0.20357762277126312, 0.04291487857699394, -0.4194456934928894, -0.314144492149353, 0.058106619864702225, 0.05749842897057533, -0.19029104709625244, -0.3434984087944031, -0.19879955053329468, -0.27633175253868103, 0.10973039269447327, 0.23189382255077362, 0.0070069339126348495, -0.40744662284851074, 0.09159144759178162, 0.4122217893600464, -0.24415647983551025, 0.3204207122325897, 0.2931935787200928, -0.0482974611222744, 0.1420726478099823, 0.23881395161151886, -0.02134416438639164, -0.18850407004356384, 0.1998024731874466, 0.08290926367044449, 0.26303374767303467, 0.07911455631256104, 0.2175436168909073, -0.265519380569458, 0.21212011575698853, 0.16260451078414917, 0.08960941433906555, -0.19952720403671265, 0.3131560683250427, 0.24752353131771088, 0.13509079813957214, 0.071515291929245, -0.18169471621513367, -0.02280387654900551, -0.16870702803134918, -0.053486358374357224, -0.18984635174274445, -0.016250593587756157, 0.09297376126050949, 0.27861249446868896, -0.08373528718948364, 0.4132506251335144, -0.09442859888076782, -0.17916469275951385, 0.07683785259723663, 0.24124374985694885, 0.09081035107374191, -0.06165599450469017, 0.04379938915371895, 0.15585193037986755, 0.2513812780380249, 0.3975215554237366, -0.014040231704711914, -0.2338443100452423, 0.4192071557044983, -0.02070368081331253, 0.17309647798538208, -0.11200884729623795, -0.16322055459022522, 0.339597225189209, 0.23718827962875366, -0.42408227920532227, -0.506540834903717, -0.02221369370818138, -4.6793704428709297e-33, -0.15784615278244019, 0.2614832818508148, -0.26302552223205566, 0.03163084760308266, -0.050466638058423996, -0.2582996189594269, 0.0077776480466127396, 0.3963807225227356, -0.12348710000514984, -0.046700045466423035, -0.1335192620754242, -0.06792553514242172, 0.004305936396121979, 0.10501295328140259, 0.29669731855392456, 0.10340651869773865, -0.17672473192214966, 0.017007160931825638, 0.011902431026101112, -0.6303901672363281, -0.0016287583857774734, -0.07572347670793533, 0.1679215133190155, 0.32470962405204773, -0.15207155048847198, 0.030307400971651077, -0.22439610958099365, -0.06923454999923706, -0.12282570451498032, -0.3151669204235077, -0.10014878213405609, -0.3752254247665405, 0.011415015906095505, 0.02453746646642685, -0.25218215584754944, -0.24985197186470032, -0.36215731501579285, 0.3467864394187927, 0.16760589182376862, 0.2282046377658844, 0.016164081171154976, 0.02537897415459156, -0.0007882844656705856, 0.15696322917938232, 0.03348667174577713, -0.053343869745731354, 0.3311832547187805, -0.49688422679901123, 0.20671480894088745, -0.16931377351284027, 0.4814547598361969, -0.1281822770833969, -0.040048517286777496, 0.00033586472272872925, 0.25120705366134644, -0.28409337997436523, -0.07571408152580261, 0.026915201917290688, 0.15418048202991486, -0.34225234389305115, -0.12795878946781158, 0.3083609938621521, -0.10312168300151825, 0.07547596842050552, -0.009479351341724396, 0.10225266218185425, 0.1786251962184906, -0.08659740537405014, 0.045950111001729965, 0.16881781816482544, -0.0202042069286108, -0.456371545791626, 0.23991480469703674, 0.021099839359521866, 0.0578102208673954, -0.044537514448165894, 0.12322822213172913, -0.02222495898604393, 0.449921190738678, 2.131052315235138e-05, -0.1383029967546463, -0.24680334329605103, 0.3566422760486603, -0.022289736196398735, 0.03415657579898834, 0.07862881571054459, 0.08198811858892441, 0.012117549777030945, -0.2168695330619812, 0.3764412999153137, -0.2225286364555359, 0.25782471895217896, 0.21793247759342194, -0.35635221004486084, 0.0662403553724289, -9.900999486944784e-08, -0.09110690653324127, 0.13477551937103271, -0.17631939053535461, 0.5110820531845093, 0.04438566789031029, 0.6530160903930664, -0.2534448802471161, -0.09010297060012817, 0.2997146248817444, 0.2953689694404602, 0.23891334235668182, -0.18425226211547852, -0.13547825813293457, 0.34478452801704407, -0.2805585265159607, 0.027631983160972595, 0.024983417242765427, 0.020756777375936508, 0.15004616975784302, -0.2802700102329254, -0.31688958406448364, -0.04339088499546051, -0.04161039739847183, 0.19500690698623657, 0.16106662154197693, -0.10088959336280823, -0.5544471740722656, 0.14310528337955475, 0.18300777673721313, 0.46472615003585815, -0.2980903685092926, -0.03990182653069496, -0.3886431157588959, -0.06276129931211472, 0.2888743281364441, -0.005085445009171963, 0.09811632335186005, -0.11560837924480438, 0.1953316032886505, 0.14693841338157654, 0.15396881103515625, -0.35922881960868835, 0.11881886422634125, 0.16132743656635284, 0.31143662333488464, -0.1294727921485901, -0.40169328451156616, -0.005421461537480354, 0.06798385083675385, -0.40343207120895386, 0.300888329744339, -0.3684270679950714, -0.01297798566520214, 0.12604022026062012, -0.3788487911224365, -0.1156391128897667, -0.01734609156847, -0.26546645164489746, -0.054482344537973404, 0.4778689742088318, 0.2617504298686981, -0.015208926051855087, -0.07224859297275543, 0.21683526039123535]}, collection='Docs')])

Step 2: Retrieve

Next, add the code to retrieve the most relevant document given an example prompt:

[10]
Llamas are members of the camelid family meaning they're pretty closely related to vicuñas and camels

Step 3: Generate

Lastly, use the prompt and the document retrieved in the previous step to generate an answer!

[11]

Llamas are members of the camelid family, which means they are closely related to other animals in the same family, including:

1. Vicuñas: Vicuñas are small, wild relatives of llamas and alpacas. They are found in the Andean region and are known for their soft, woolly coats.
2. Camels: Camels are large, even-toed ungulates that are closely related to llamas and vicuñas. They are found in hot, dry climates around the world and are known for their ability to go without water for long periods of time.
3. Guanacos: Guanacos are large, wild animals that are related to llamas and vicuñas. They are found in the Andean region and are known for their distinctive long necks and legs.
4. Llama-like creatures: There are also other animals that are sometimes referred to as "llamas," such as the lama-like creatures found in China, which are actually a different species altogether. These creatures are not closely related to vicuñas or camels, but are sometimes referred to as "llamas" due to their physical similarities.

In summary, llamas are related to vicuñas, camels, guanacos, and other animals that are sometimes referred to as "llamas."