diff --git "a/unit2/llama-index/components.ipynb" "b/unit2/llama-index/components.ipynb" new file mode 100644--- /dev/null +++ "b/unit2/llama-index/components.ipynb" @@ -0,0 +1,403 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Components in LlamaIndex\n", + "\n", + "This notebook is part of the [Hugging Face Agents Course](https://www.hf.co/learn/agents-course), a free Course from beginner to expert, where you learn to build Agents.\n", + "\n", + "![Agents course share](https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/communication/share.png)\n", + "\n", + "Alfred is hosting a party and needs to be able to find relevant information on personas that will be attending the party. Therefore, we will use a `QueryEngine` to index and search through a database of personas.\n", + "\n", + "## Let's install the dependencies\n", + "\n", + "We will install the dependencies for this unit." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "!pip install llama-index datasets llama-index-callbacks-arize-phoenix llama-index-vector-stores-chroma llama-index-llms-huggingface-api -U -q" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "And, let's log in to Hugging Face to use serverless Inference APIs." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from huggingface_hub import login\n", + "\n", + "login()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Create a `QueryEngine` for retrieval augmented generation\n", + "\n", + "### Setting up the persona database\n", + "\n", + "We will be using personas from the [dvilasuero/finepersonas-v0.1-tiny dataset](https://huggingface.co/datasets/dvilasuero/finepersonas-v0.1-tiny). This dataset contains 5K personas that will be attending the party!\n", + "\n", + "Let's load the dataset and store it as files in the `data` directory" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "from datasets import load_dataset\n", + "from pathlib import Path\n", + "\n", + "dataset = load_dataset(path=\"dvilasuero/finepersonas-v0.1-tiny\", split=\"train\")\n", + "\n", + "Path(\"data\").mkdir(parents=True, exist_ok=True)\n", + "for i, persona in enumerate(dataset):\n", + " with open(Path(\"data\") / f\"persona_{i}.txt\", \"w\") as f:\n", + " f.write(persona[\"persona\"])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Awesome, now we have a local directory with all the personas that will be attending the party, we can load and index!\n", + "\n", + "### Loading and embedding persona documents\n", + "\n", + "We will use the `SimpleDirectoryReader` to load the persona descriptions from the `data` directory. This will return a list of `Document` objects. " + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "5000" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from llama_index.core import SimpleDirectoryReader\n", + "\n", + "reader = SimpleDirectoryReader(input_dir=\"data\")\n", + "documents = reader.load_data()\n", + "len(documents)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Now we have a list of `Document` objects, we can use the `IngestionPipeline` to create nodes from the documents and prepare them for the `QueryEngine`. We will use the `SentenceSplitter` to split the documents into smaller chunks and the `HuggingFaceInferenceAPIEmbedding` to embed the chunks." + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[TextNode(id_='6caf2cfc-f272-4e60-bf46-f2658300ed29', embedding=[-0.06331074982881546, 0.009224908426404, 0.018634209409356117, 0.027083637192845345, 0.02653556689620018, -0.02999947965145111, -0.009370007552206516, 0.008977577090263367, -0.06331387162208557, -0.05726803094148636, -0.004289080388844013, -0.017684046179056168, 0.009936431422829628, 0.039389919489622116, 0.0038984091952443123, 0.004819988738745451, -0.009579195640981197, 0.068662129342556, -0.017461828887462616, 0.03002462163567543, 0.005752067547291517, -0.056317947804927826, 0.0904405489563942, -0.03076321631669998, -0.00425849761813879, 0.03031826578080654, 0.008468227460980415, -0.007172771729528904, 0.007117226719856262, -0.13533654808998108, -0.04314197227358818, 0.012893659994006157, -0.015661783516407013, 0.015088616870343685, 0.05492901802062988, 0.020862901583313942, 0.008371644653379917, 0.04231588542461395, 0.0060563283041119576, 0.043255724012851715, 0.036216381937265396, 0.01535664964467287, -0.028956379741430283, 0.054448582231998444, 0.04097861796617508, -0.023935634642839432, -0.014249945990741253, 0.013973849825561047, -0.003251683432608843, -0.004012431018054485, -0.012194660492241383, -0.0538804717361927, -0.04191630706191063, -0.003614902961999178, -0.010032165795564651, 0.10691127926111221, 0.08596361428499222, 0.028772590681910515, -0.017622020095586777, 0.0483156181871891, 0.041535452008247375, -0.0028088432736694813, -0.17002664506435394, 0.050869304686784744, 0.020845508202910423, 0.011706769466400146, -0.07411818951368332, -0.023886043578386307, 0.00687427120283246, -0.012150096707046032, -0.026870466768741608, -0.04066461697220802, -0.0321703739464283, -0.02458544820547104, 0.03221006691455841, -0.04522509500384331, 0.030274106189608574, 0.018420297652482986, -0.06099245324730873, 0.015868714079260826, 0.005601707845926285, -0.05229735001921654, -0.008664373308420181, -0.018253836780786514, 0.003919350448995829, 0.026038410142064095, -0.021879326552152634, 0.0036698728799819946, -0.04057799652218819, -0.013267463073134422, -0.00856536254286766, -0.05724766477942467, 0.07468454539775848, 0.025501836091279984, -0.07040189206600189, -0.033693235367536545, 0.01346509624272585, 0.04746166616678238, -0.03478401526808739, 0.43892204761505127, 0.00413789926096797, -0.016258480027318, -0.0010316335828974843, -0.015566056594252586, 0.0355205163359642, 0.026501547545194626, 0.007709097117185593, -0.01662198267877102, -0.029993325471878052, 0.007905807346105576, -0.001345716416835785, 0.009871192276477814, -0.0385742224752903, -0.033665236085653305, 0.07614381611347198, 0.0029822783544659615, 0.020749550312757492, 0.07779674977064133, 0.018795693293213844, -0.02709558792412281, 0.020914515480399132, -0.02131819911301136, 0.010010894387960434, -0.002207427751272917, -0.031619131565093994, -0.056816134601831436, -0.01214984804391861, 0.02394881658256054, 0.014393161982297897, 0.007899314165115356, -0.029340825974941254, 0.042412690818309784, -0.0567808635532856, 0.014269464649260044, 0.012487618252635002, 0.04837101325392723, 0.041415102779865265, -0.041504450142383575, 0.02854214422404766, -0.020072465762495995, 0.023549271747469902, 0.0018930225633084774, -0.03341882303357124, 0.014052236452698708, -0.09114041924476624, 0.014002073556184769, 0.034813981503248215, 0.0057905493304133415, -0.017385372892022133, 0.0008721856283955276, -0.039709143340587616, 0.011949500069022179, -0.06488803029060364, 0.059946127235889435, 0.07275768369436264, -0.02265171892940998, 0.06892433762550354, 0.053070131689310074, -0.03213682398200035, 0.06504524499177933, 0.03312070667743683, -0.08835858851671219, 0.03370850905776024, 0.02889782190322876, 0.01923336274921894, -0.0693056508898735, -0.03223618492484093, -0.014588424004614353, 0.034789491444826126, -0.015353025868535042, 0.05274275690317154, 0.09410391002893448, -0.0663963183760643, 0.07173962146043777, 0.04549920931458473, 0.02440635859966278, -0.062298212200403214, 0.0225796140730381, -0.0003888356441166252, 0.0542345829308033, -0.04974520951509476, -0.021020546555519104, -0.0331951268017292, 0.0365498922765255, -0.00280891009606421, 0.04303894564509392, 0.019199002534151077, -0.009476021863520145, 0.00543178478255868, 0.036613915115594864, 0.056511491537094116, 0.03039679303765297, -0.014009674079716206, -0.015583477914333344, -0.0010937541956081986, -0.018922558054327965, 0.010950841009616852, 0.04019725322723389, -0.01693466491997242, -0.05778283625841141, -0.04254169762134552, -0.0035880301147699356, -0.07944973558187485, 0.04864196851849556, 0.01300270576030016, -0.006045314483344555, -0.00024758532526902854, -0.005587059073150158, 0.022186247631907463, -0.03199537843465805, -0.05467634275555611, -0.02733919396996498, -0.02832534722983837, -0.009489119052886963, 0.015661122277379036, 0.014824033714830875, 0.0540122427046299, -0.008519649505615234, 0.06575801223516464, 0.02946857549250126, -0.06203640252351761, -0.06286534667015076, -0.08304289728403091, -0.30932554602622986, 0.01598418690264225, -0.07771244645118713, 0.05430606007575989, -0.0677218809723854, -0.07906421273946762, -0.013280321843922138, 0.007570881862193346, 0.0009830115595832467, 0.0668470486998558, -0.01713596098124981, 0.0002800538786686957, 0.0023351728450506926, -0.0001537256466690451, 0.021893788129091263, 0.017092356458306313, 0.051047004759311676, 0.017293423414230347, -0.037658363580703735, 0.028725160285830498, 0.018389925360679626, -0.00916206929832697, 0.004328679759055376, -0.02216394618153572, 0.03285335376858711, -0.005717077758163214, 0.12402351945638657, 0.06947656720876694, -0.0456964410841465, -0.0481460839509964, -0.028797440230846405, -0.009932279586791992, -0.08958626538515091, -0.07677485793828964, -0.011834230273962021, -0.029850011691451073, 0.040993887931108475, -0.012997296638786793, -0.0041589089669287205, 0.02752949483692646, -0.07797838002443314, -0.056234851479530334, -0.017914606258273125, 0.0007658483809791505, -0.019189676269888878, 0.037218257784843445, 0.026153279468417168, -0.011488395743072033, 0.024020232260227203, -0.016581635922193527, 0.040249451994895935, -0.00620622793212533, -0.024883342906832695, 0.024669529870152473, -0.08853012323379517, 0.009565017186105251, -0.03460777550935745, 0.02827070839703083, 0.000474958389531821, 0.012875140644609928, -0.019924867898225784, -0.04435759410262108, 0.012816984206438065, -0.0012192786671221256, 0.04390763118863106, 0.033197663724422455, -0.03806657716631889, -0.03668392449617386, 0.07025517523288727, -0.0872601866722107, 0.02331111580133438, 0.020516566932201385, -0.03263605386018753, -0.038685597479343414, 0.011761195957660675, 0.030695855617523193, 0.04428304731845856, 0.032535988837480545, 0.026190446689724922, -0.016415951773524284, 0.05877423658967018, -0.0375482439994812, 0.02621806412935257, -0.026613131165504456, -0.03228270635008812, 0.02454378455877304, 0.03825140744447708, -0.013383973389863968, 0.036161791533231735, 0.013342141173779964, 0.025333257392048836, -0.008373964577913284, -0.04435683414340019, -0.012061151675879955, 0.0074783023446798325, 0.010519260540604591, -0.23731064796447754, -0.01747441478073597, 0.08968596905469894, 0.025389093905687332, -0.005359550006687641, 0.05432524532079697, 0.028929246589541435, -0.013143226504325867, 0.07119422405958176, 0.013309906236827374, 0.061514712870121, -0.022707652300596237, 0.02678918093442917, -0.06094954535365105, 0.009804639965295792, -0.0410354882478714, -0.0011093756183981895, 0.06023135408759117, -0.01752190664410591, 0.023832930251955986, -0.0058606937527656555, -0.049644507467746735, 0.1745258867740631, 0.030304590240120888, -0.030970904976129532, -0.0668276846408844, -0.017310865223407745, -0.02957877703011036, -0.014737210236489773, 0.0213373601436615, -0.002327980473637581, -0.010153858922421932, 0.06928739696741104, -0.0575285442173481, -0.0026238905265927315, 0.021311840042471886, -0.064383365213871, 0.058847807347774506, -0.06123061850667, -0.02886202186346054, -0.07170730084180832, 0.01318480633199215, -0.039021845906972885, -0.03311634063720703, 0.06736687570810318, 0.03361234813928604, -0.037985656410455704, 0.047896597534418106, -0.005688417702913284, 0.062329214066267014, 0.03910629823803902, -0.08303961902856827, -0.08372390270233154, 0.00828921515494585, 0.032354798167943954, 0.05521363392472267, 0.02893567830324173, 0.033426351845264435, -0.004392022266983986, 0.022420121356844902, 0.01084897480905056, 0.0075636799447238445, 0.006490517407655716, -0.03277060016989708, 0.06355655938386917], metadata={'file_path': '/Users/davidberenstein/Documents/programming/huggingface/agents-course/notebooks/unit2/llama-index/data/persona_0.txt', 'file_name': 'persona_0.txt', 'file_type': 'text/plain', 'file_size': 132, 'creation_date': '2025-02-27', 'last_modified_date': '2025-02-27'}, excluded_embed_metadata_keys=['file_name', 'file_type', 'file_size', 'creation_date', 'last_modified_date', 'last_accessed_date'], excluded_llm_metadata_keys=['file_name', 'file_type', 'file_size', 'creation_date', 'last_modified_date', 'last_accessed_date'], relationships={: RelatedNodeInfo(node_id='84a8e08c-a275-4806-a4ab-91a4afa75d20', node_type=, metadata={'file_path': '/Users/davidberenstein/Documents/programming/huggingface/agents-course/notebooks/unit2/llama-index/data/persona_0.txt', 'file_name': 'persona_0.txt', 'file_type': 'text/plain', 'file_size': 132, 'creation_date': '2025-02-27', 'last_modified_date': '2025-02-27'}, hash='58941961f90b934d82fa9d9b70fda325c381f42a776edd7a7dd312150a5e6268')}, metadata_template='{key}: {value}', metadata_separator='\\n', text='A local art historian and museum professional interested in 19th-century American art and the local cultural heritage of Cincinnati.', mimetype='text/plain', start_char_idx=0, end_char_idx=132, metadata_seperator='\\n', text_template='{metadata_str}\\n\\n{content}'),\n", + " TextNode(id_='bc68ae6d-e73e-447a-9b91-36375c94b3e0', embedding=[0.003673666389659047, 0.07680334150791168, 0.02058180794119835, -0.023754063993692398, -0.002495191292837262, -0.07015213370323181, 0.07045578211545944, 0.024367932230234146, -0.022541504353284836, -0.03432754799723625, -0.030351214110851288, -0.09195556491613388, 0.054614197462797165, 0.02653004229068756, 0.02751605585217476, 0.040885403752326965, -0.00550243491306901, 0.015473893843591213, 0.003491008887067437, 0.011621368117630482, 0.03746691718697548, -0.04817640781402588, 0.007683293893933296, -0.013022016733884811, -0.010133138857781887, 0.024003583937883377, 0.01970648765563965, -0.028785614296793938, -0.007104382384568453, -0.09671592712402344, -0.03611049801111221, -0.0005851661553606391, 0.0018119541928172112, 0.015037182718515396, -0.01234237290918827, 0.008484183810651302, 0.031070765107870102, 0.014789014123380184, 0.012529408559203148, 0.11074859648942947, 0.028920555487275124, -0.0519770085811615, 0.005033471621572971, 0.04014791175723076, 0.024766787886619568, -0.051009684801101685, -0.014857789501547813, 0.011994804255664349, -0.041176535189151764, -0.06450558453798294, -0.09056482464075089, -0.08699923753738403, -0.023520734161138535, -0.036420151591300964, -0.024148425087332726, 0.00788077898323536, 0.10232703387737274, 0.029565483331680298, -0.003107942407950759, 0.030502665787935257, 0.046335164457559586, 0.0631401389837265, -0.1355571448802948, 0.07914096862077713, -0.004969766829162836, 0.06549067795276642, -0.03000207617878914, -0.05800699442625046, -0.05522281304001808, -0.06746185570955276, -0.06266577541828156, -0.006890415214002132, 0.04525093734264374, 0.02065991796553135, 0.032015860080718994, -0.00873221829533577, 0.005934533663094044, 0.00651124119758606, -0.03567954897880554, 0.045082613825798035, 0.03143268823623657, -0.03202513977885246, -0.024667374789714813, -0.030169570818543434, 0.042203135788440704, 0.045088909566402435, -0.012959719635546207, 0.009537148289382458, -0.01985768973827362, 0.02498975582420826, -0.028108274564146996, 0.00606282614171505, 0.053616393357515335, 0.04174903407692909, -0.03305748850107193, -0.025064287707209587, -0.028681572526693344, 0.047980424016714096, -0.06967397779226303, 0.41893869638442993, 0.005378825590014458, -0.031108494848012924, 0.04612283781170845, 0.005880370270460844, 0.033059995621442795, -0.008483913727104664, 0.04020531103014946, -0.015706969425082207, 0.04446481168270111, -0.014024965465068817, -0.03506840392947197, 0.04568744823336601, -0.046038828790187836, 0.00731640262529254, 0.04643528535962105, 0.011685846373438835, 0.03461113199591637, 0.04764142259955406, -0.024298442527651787, -0.0350409671664238, -0.006247921846807003, -0.059555236250162125, 0.03790665790438652, -0.018298177048563957, 0.006236440967768431, 0.013953283429145813, 0.011203316040337086, 0.0503835529088974, 0.021060939878225327, 0.03796347975730896, 0.045411959290504456, -7.29795647202991e-05, -0.03934317082166672, 0.00877454038709402, 0.024724319577217102, 0.023454636335372925, -0.0039825765416026115, -0.035460710525512695, 0.021780235692858696, -0.03138551861047745, -0.03923843801021576, -0.00023338627943303436, 0.030069982632994652, 0.046705927699804306, -0.09178385138511658, 0.027483917772769928, 0.003035428700968623, 0.06001943349838257, -0.040655262768268585, 0.07048315554857254, -0.06417637318372726, 0.030910925939679146, -0.01720636710524559, -0.005904156714677811, 0.02694799192249775, -0.04650159925222397, 0.08233411610126495, 0.037647005170583725, -0.04867294803261757, -0.01631627045571804, 0.0035241362638771534, -0.10632425546646118, -0.010806654579937458, 0.057296011596918106, 0.02779535762965679, -0.07262086123228073, -0.023988880217075348, -0.007099623791873455, 0.028337758034467697, -0.04503417760133743, 0.0510549321770668, 0.03637249022722244, -0.03858570009469986, 0.04495235159993172, 0.057018592953681946, 0.008165683597326279, -0.019279735162854195, 0.05145806446671486, -0.017400426790118217, 0.036283284425735474, 0.005384983494877815, 0.001382043119519949, -0.038455575704574585, 0.005809883587062359, -0.011952577158808708, 0.002655206946656108, -0.04703226685523987, 0.008293729275465012, 0.033997949212789536, -0.02812374383211136, 0.0390922985970974, 0.061762113124132156, 0.005466604605317116, -0.047964636236429214, 0.045178093016147614, -0.00648685684427619, 0.0045944699086248875, 0.013246665708720684, -0.03702673688530922, 0.011262900196015835, -0.03992578759789467, 0.08157773315906525, -0.021571598947048187, 0.028775347396731377, -0.0024976120330393314, -0.0683894231915474, 0.00621032016351819, 0.016889488324522972, 0.01667708158493042, -0.0004121032543480396, -0.02493423968553543, -0.008528436534106731, -0.09913467615842819, 0.025522630661725998, 0.007561091333627701, -0.007295937277376652, 0.06164225563406944, -0.01217800471931696, 0.04505547508597374, -0.006612108554691076, -0.028267711400985718, -0.08591324090957642, -0.05958879366517067, -0.31859996914863586, 0.06257006525993347, -0.01872849091887474, 0.04559746012091637, -0.028516501188278198, -0.01673213392496109, 0.0031432416290044785, 0.018521863967180252, 0.043004024773836136, 0.02548602968454361, 0.01175824087113142, -0.023098528385162354, -0.009767834097146988, 0.08814328908920288, 0.0004795234417542815, 0.0028713259380310774, 0.014770024456083775, -0.009377894923090935, -0.039960186928510666, 0.026666799560189247, -0.005196747370064259, 0.004592594690620899, -0.010000165551900864, -0.08799108117818832, 0.023702111095190048, -0.036555178463459015, 0.1139497309923172, 0.08812806010246277, -0.0375930517911911, -0.09746430069208145, 0.012024280615150928, 0.048491671681404114, -0.032697491347789764, -0.12452912330627441, 0.0186118483543396, -0.032659754157066345, 0.06653235107660294, -0.07981663942337036, 0.00973531510680914, 0.010465073399245739, 0.016649454832077026, -0.043939799070358276, -0.002641131170094013, 0.03573029860854149, -0.05727281793951988, 0.030684053897857666, 0.007981271483004093, -0.022138623520731926, 0.03652707859873772, -0.011136407032608986, 0.002414996037259698, 0.02192314900457859, -0.01664336770772934, -0.019773641601204872, -0.11617467552423477, 0.03612696751952171, -0.03119526617228985, -0.02686893939971924, -0.014840151183307171, 0.04725920408964157, 0.020278142765164375, 0.005229384638369083, 0.055165499448776245, -0.009358001872897148, 0.03283160179853439, -0.04278060421347618, -0.043664176017045975, 0.04236156493425369, 0.05810431391000748, -0.03091803751885891, 0.013770871795713902, 0.10707128047943115, -0.0635901615023613, -0.020768221467733383, 0.01971191167831421, -0.004164498299360275, 0.018932165578007698, -0.0015614121221005917, 0.016268428415060043, 0.0335485078394413, 0.09235202521085739, -0.07631003111600876, -0.035484883934259415, -0.018433846533298492, 0.024226756766438484, 0.03085910528898239, -0.0063900817185640335, -0.013801264576613903, 0.04134080186486244, -0.025553885847330093, 0.011763861402869225, 0.013449810445308685, -0.03002692200243473, 0.0007404941716231406, -0.0206587091088295, 0.010130721144378185, -0.2584091126918793, 0.046717990189790726, -0.022801408544182777, 0.019056251272559166, 0.06623630225658417, 0.01688269153237343, -0.03026616759598255, 0.0019017319427803159, 0.03861192613840103, -0.018657086417078972, 0.08125338703393936, 0.014425113797187805, 0.04218006879091263, 0.030820028856396675, 0.017925450578331947, -0.015092354267835617, 0.044100355356931686, 0.007073080632835627, 0.01837313361465931, -0.022955752909183502, -0.03767624497413635, -0.04843800887465477, 0.14260129630565643, 0.022539103403687477, -0.05264464393258095, -0.05229358747601509, -0.0054155392572283745, -0.026804104447364807, -0.00583235640078783, -0.05450465530157089, 0.035550907254219055, 0.009798770770430565, 0.043174803256988525, -0.006220177281647921, -0.0025894411373883486, 0.02176964469254017, -0.034350719302892685, -0.007755659520626068, -0.02446487545967102, -0.02006232924759388, -0.03019724041223526, -0.012926178053021431, 0.04595363140106201, 0.022226348519325256, 0.06970623880624771, -0.014180795289576054, -0.05741490051150322, -0.04459759593009949, 0.018754972144961357, 0.022440699860453606, 0.04554371163249016, -0.0716477781534195, -0.08133351802825928, 0.04850359633564949, 0.02062574215233326, -0.021114204078912735, -0.015608256682753563, -0.034102801233530045, 0.03732096776366234, -0.0351671539247036, 0.0015430381754413247, 0.00232335296459496, 0.011858334764838219, -0.048308711498975754, -0.001309193205088377], metadata={'file_path': '/Users/davidberenstein/Documents/programming/huggingface/agents-course/notebooks/unit2/llama-index/data/persona_1.txt', 'file_name': 'persona_1.txt', 'file_type': 'text/plain', 'file_size': 266, 'creation_date': '2025-02-27', 'last_modified_date': '2025-02-27'}, excluded_embed_metadata_keys=['file_name', 'file_type', 'file_size', 'creation_date', 'last_modified_date', 'last_accessed_date'], excluded_llm_metadata_keys=['file_name', 'file_type', 'file_size', 'creation_date', 'last_modified_date', 'last_accessed_date'], relationships={: RelatedNodeInfo(node_id='d5db5bf4-daac-41e5-b5aa-271e8305da25', node_type=, metadata={'file_path': '/Users/davidberenstein/Documents/programming/huggingface/agents-course/notebooks/unit2/llama-index/data/persona_1.txt', 'file_name': 'persona_1.txt', 'file_type': 'text/plain', 'file_size': 266, 'creation_date': '2025-02-27', 'last_modified_date': '2025-02-27'}, hash='e6c87149a97bf9e5dbdf33922a4e5023c6b72550ca0b63472bd5d25103b28e99')}, metadata_template='{key}: {value}', metadata_separator='\\n', text='An anthropologist or a cultural expert interested in the intricacies of Cypriot culture, history, and society, particularly someone who has spent considerable time researching and living in Cyprus to gain a deep understanding of its people, customs, and way of life.', mimetype='text/plain', start_char_idx=0, end_char_idx=266, metadata_seperator='\\n', text_template='{metadata_str}\\n\\n{content}'),\n", + " TextNode(id_='b56c4631-5910-4be5-9a73-eeb2e968759b', embedding=[-0.05559851601719856, 0.009853656403720379, -0.04967876523733139, -0.04409969225525856, 0.008301857858896255, -0.0012249232968315482, 0.030180251225829124, 0.004253001417964697, -0.02259795367717743, -0.008591759018599987, 0.022027432918548584, -0.01409579161554575, 0.06432757526636124, 0.004542074631899595, 0.07637801021337509, 0.07016153633594513, 0.01999465376138687, 0.099863700568676, -0.052730295807123184, 0.024736706167459488, -0.0014768993714824319, -0.02112152986228466, 0.005192627664655447, -0.03130170702934265, 0.048663556575775146, 0.026303181424736977, 0.0015405835583806038, -0.02985488995909691, -0.01813114807009697, -0.09192076325416565, 0.017428027465939522, 0.026704756543040276, 0.06005643308162689, 0.04692130908370018, 0.013819473795592785, 0.03548400104045868, 0.013731284998357296, -0.0025519737973809242, -0.06875817477703094, 0.04698766767978668, -0.00250500300899148, -0.01897294633090496, -0.029702380299568176, 0.028436781838536263, -0.0026258856523782015, -0.02838907018303871, -0.003977908752858639, -0.03396396338939667, -0.11869928985834122, -0.08520965278148651, -0.03539058193564415, -0.10063651204109192, -0.02293701469898224, 0.0602550134062767, -0.027121957391500473, 0.017193790525197983, 0.04814960062503815, 0.005006872583180666, -0.028209008276462555, 0.053912099450826645, 0.0770382359623909, -0.014319933019578457, -0.108608677983284, 0.10644306242465973, 0.026262402534484863, 0.044523198157548904, -0.02599308453500271, -0.037233125418424606, 0.03611505404114723, -0.03303464874625206, 0.005318146198987961, -0.019109399989247322, 0.06312552094459534, 0.005499877501279116, 0.023485610261559486, 0.06409858167171478, -0.016365496441721916, 0.014685694128274918, 0.021718859672546387, 0.047040000557899475, 0.010201833210885525, -0.06314028799533844, 0.00963969063013792, -0.002495761262252927, 0.0334712378680706, 0.019684216007590294, -0.020725233480334282, -0.021693268790841103, -0.01903000846505165, -0.0004955860204063356, -0.01378703210502863, 0.00711048673838377, 0.04221952334046364, 0.019495217129588127, -0.037991732358932495, -0.03335138037800789, -0.05640937015414238, -0.003580991644412279, -0.0934988483786583, 0.41871240735054016, 0.04299820214509964, 0.00235975650139153, 0.06287537515163422, 0.024954622611403465, 0.04627925902605057, 0.019467275589704514, 0.05493514984846115, -0.04635356739163399, -0.034247539937496185, -0.038694653660058975, -0.027593562379479408, -0.044260423630476, -0.03282706066966057, -0.01840655878186226, 0.024450885131955147, -0.005481690168380737, -0.021428020671010017, 0.02069745771586895, 0.002547596115618944, -0.029965663328766823, -0.03656391054391861, -0.022945689037442207, -0.016278518363833427, -0.052399665117263794, 0.015058247372508049, 0.01671004854142666, 0.008566686883568764, 0.08155032992362976, 0.03327542543411255, 0.024075916036963463, 0.04694065824151039, -0.02278669737279415, -0.05778259038925171, -0.0009238081402145326, 0.041877102106809616, 0.022764673456549644, 0.01922490820288658, 0.001781411818228662, 0.014655974693596363, 0.01357102207839489, 0.030040515586733818, 0.03410828858613968, -0.03197042644023895, -0.033962883055210114, -0.08855533599853516, 0.04397614300251007, -0.038633447140455246, 0.06838538497686386, -0.04191085323691368, 0.13765323162078857, -0.053217098116874695, 0.06949855387210846, -0.06055249646306038, 0.06162014231085777, 0.05264415591955185, 0.005061331205070019, 0.06857418268918991, 4.955937765771523e-05, -0.0262769665569067, 0.028078757226467133, -0.0025579268112778664, -0.0545884408056736, -0.03181851655244827, 0.05719732865691185, 0.03169373422861099, -0.06831914931535721, -0.0441814661026001, 0.004747621715068817, 0.018199210986495018, -0.031647492200136185, 0.03859063982963562, 0.035067375749349594, -0.006556495558470488, 0.009912578389048576, 0.04805431142449379, 0.019243458285927773, -0.020094024017453194, 0.06312886625528336, -0.016676343977451324, 0.0035858226474374533, -0.008899295702576637, -0.02513469196856022, -0.05777467414736748, -0.002082524122670293, -0.04781784489750862, 0.05265358090400696, 0.07164672762155533, -0.03145758435130119, 0.004171609878540039, -0.023330219089984894, 0.045053720474243164, -0.0008556050597690046, -0.04579225182533264, -0.0682646632194519, 0.04251450300216675, -0.026022769510746002, 0.03644230216741562, -0.06718749552965164, -0.01719074510037899, -0.019277004525065422, -0.04200536757707596, 0.06790774315595627, -0.04312886670231819, 0.03382688760757446, 0.029377609491348267, -0.011265606619417667, -0.013513513840734959, -0.022402849048376083, 0.029293155297636986, -0.00037137939943931997, -0.028809737414121628, 0.04767775163054466, -0.06555277854204178, 0.014536970295011997, 0.0034194448962807655, 0.03215590864419937, 0.04714903607964516, -0.006908040959388018, 0.04588821157813072, -0.00730027025565505, -0.049482859671115875, -0.015586307272315025, -0.043708719313144684, -0.31734099984169006, 0.0390440858900547, -0.02660980261862278, 0.02156781032681465, -0.07181347161531448, 0.0035907234996557236, -0.02140982076525688, 0.03804871439933777, -0.033027876168489456, 0.08477327227592468, 0.08930808305740356, 0.04189096391201019, 0.02502782829105854, 0.053497280925512314, 0.0450545959174633, -0.002503071678802371, 0.015128244645893574, 0.009890241548418999, -0.014667236246168613, 0.059164948761463165, 0.0015387776074931026, -0.0071340943686664104, 0.02226361073553562, -0.027246132493019104, 0.03613409027457237, 0.024212587624788284, 0.07607948035001755, 0.09343092888593674, -0.004515860229730606, -0.04021383449435234, -0.02284305728971958, 0.03348008543252945, -0.02631794475018978, -0.08306329697370529, 0.028571490198373795, -0.07668367773294449, -0.031003683805465698, -0.0901738628745079, 0.0020944292191416025, -0.012134970165789127, -0.04832760989665985, 0.014075178653001785, 0.014431661926209927, -0.06922195851802826, -0.032268546521663666, -0.030034642666578293, 0.06034165248274803, 0.014259936287999153, 0.035496871918439865, -0.016586940735578537, -0.019505999982357025, -0.08655788004398346, -0.020225655287504196, 0.013033664785325527, -0.07061463594436646, 0.05028259754180908, -0.061305370181798935, 0.03965356945991516, -0.04796307161450386, -0.03451748192310333, -0.015873895958065987, -0.029917415231466293, 0.0035847905091941357, -0.040063418447971344, 0.00878362637013197, 0.041187457740306854, 0.008126376196742058, 0.014387750998139381, -0.003117435844615102, -0.0686214491724968, 0.0028167921118438244, 0.05868042632937431, -0.025640591979026794, -0.028297655284404755, 0.008598006330430508, 0.00507062254473567, 0.03127598017454147, -0.021639352664351463, -0.020177392289042473, -0.04102971777319908, 0.057014964520931244, -0.03834648057818413, -0.038586609065532684, 0.009187446907162666, 0.017084389925003052, -0.04145839065313339, 0.04800717160105705, -0.03112996742129326, 0.05683291330933571, -0.00171291537117213, 0.0007251319475471973, 0.06018117442727089, -0.017022745683789253, -0.03473062440752983, -0.05287690833210945, -0.008463135920464993, -0.24471500515937805, -0.022388838231563568, -0.019180594012141228, 0.036621227860450745, -0.011932024732232094, 0.06395271420478821, 0.032334715127944946, -0.047474198043346405, -0.015065264888107777, -0.01632455177605152, 0.035305120050907135, 0.07189757376909256, 0.024121304973959923, 0.0017780227353796363, -0.00877712108194828, 0.003296216018497944, 0.04275562986731529, 0.0024516445118933916, -0.037065234035253525, -0.061463575810194016, -0.04739568755030632, -0.05615206062793732, 0.1505444496870041, 0.02074924111366272, -0.048923514783382416, 0.007181280758231878, -0.016529429703950882, -0.029293930158019066, 0.027335939928889275, -0.02938472107052803, 0.020835857838392258, 0.015676839277148247, 0.07353655248880386, -0.005769695620983839, -0.0220242477953434, 0.002641947939991951, -0.010113163851201534, -0.003780920756980777, -0.0017360750352963805, 0.052770987153053284, -0.040155600756406784, -0.015149780549108982, 0.0522514283657074, -0.011921782977879047, 0.04553423821926117, -0.005535565782338381, -0.028227675706148148, -0.07062194496393204, -0.02960628643631935, 0.03437615558505058, 0.054371073842048645, -0.010789236985147, -0.06826625019311905, 0.004540964961051941, 0.004975292831659317, 0.05186649039387703, -0.0342240072786808, 0.060256898403167725, 0.009638668969273567, -0.05542698875069618, 0.011726577766239643, 0.028993045911192894, -0.04230016469955444, -0.02246333658695221, 0.0911637619137764], metadata={'file_path': '/Users/davidberenstein/Documents/programming/huggingface/agents-course/notebooks/unit2/llama-index/data/persona_10.txt', 'file_name': 'persona_10.txt', 'file_type': 'text/plain', 'file_size': 207, 'creation_date': '2025-02-27', 'last_modified_date': '2025-02-27'}, excluded_embed_metadata_keys=['file_name', 'file_type', 'file_size', 'creation_date', 'last_modified_date', 'last_accessed_date'], excluded_llm_metadata_keys=['file_name', 'file_type', 'file_size', 'creation_date', 'last_modified_date', 'last_accessed_date'], relationships={: RelatedNodeInfo(node_id='d63bf154-d9f5-4487-95dd-9c9fe09ec0c0', node_type=, metadata={'file_path': '/Users/davidberenstein/Documents/programming/huggingface/agents-course/notebooks/unit2/llama-index/data/persona_10.txt', 'file_name': 'persona_10.txt', 'file_type': 'text/plain', 'file_size': 207, 'creation_date': '2025-02-27', 'last_modified_date': '2025-02-27'}, hash='c8050445025de1548b9071378be6494c191700224ea763f7f4f09c9eb0869b10')}, metadata_template='{key}: {value}', metadata_separator='\\n', text='A social justice educator or activist focused on diversity, equity, and inclusion, likely working with families and communities to promote empathy and understanding of intersectional identity and oppression.', mimetype='text/plain', start_char_idx=0, end_char_idx=207, metadata_seperator='\\n', text_template='{metadata_str}\\n\\n{content}'),\n", + " TextNode(id_='32530954-88b4-4186-a31b-2077e949aeab', embedding=[-0.04410625249147415, 0.019960202276706696, 0.0015680735232308507, 0.04173024371266365, 0.06560350209474564, -0.050750620663166046, 0.017178550362586975, 0.020132819190621376, -0.02913065254688263, 0.00940642599016428, -0.012853379361331463, -0.01724902167916298, 0.0460532084107399, 0.05235578864812851, 0.04899882152676582, 0.057242680341005325, 0.028873911127448082, 0.05871327221393585, -0.015102562494575977, 0.04534924030303955, 0.027014946565032005, -0.025588812306523323, 0.016818435862660408, -0.07114149630069733, 0.020168224349617958, 0.008464982733130455, 0.010385033674538136, -0.02381955273449421, 0.017400316894054413, -0.1331002563238144, -0.03730149194598198, 0.015040881000459194, -0.035368114709854126, 0.041744597256183624, 0.0031451431568711996, 0.0787067711353302, 0.05442645400762558, -0.02518472447991371, -0.02977975271642208, 0.035403650254011154, 0.016522470861673355, 0.007728388532996178, -0.01309828832745552, 0.01902327500283718, 0.004232970532029867, -0.06088150292634964, -0.013024704530835152, -0.04368603229522705, -0.05497392639517784, -0.0923210084438324, -0.049929745495319366, -0.05880854278802872, -0.04967774078249931, 0.03687115013599396, 0.043792724609375, -0.002149091102182865, 0.06282664090394974, 0.03169800713658333, 0.021116789430379868, 0.0059104058891534805, 0.06664719432592392, 0.014123591594398022, -0.16108062863349915, 0.07660428434610367, 0.03823033347725868, 0.035885363817214966, -0.03257352113723755, -0.051582444459199905, 0.07140899449586868, -0.05050140991806984, -0.05738238990306854, -0.03185369074344635, -0.009062317200005054, 0.0050890203565359116, 0.07456675171852112, -0.026487071067094803, -0.08173506706953049, 0.06891921162605286, -0.037687961012125015, 0.014220016077160835, 0.05706663802266121, -0.015321698971092701, -0.022674668580293655, -0.03721093013882637, 0.03432171419262886, 0.019350240007042885, -0.008697542361915112, -0.008919467218220234, -0.04302072152495384, 0.016566023230552673, -0.00265124486759305, 0.007992437109351158, 0.09925506263971329, 0.003326661419123411, -0.03547366335988045, -0.014412473887205124, 0.0013809724478051066, 0.0222721416503191, -0.08098717033863068, 0.40920349955558777, -0.019321700558066368, -0.007767150178551674, 0.0441768504679203, 0.014901482500135899, 0.043907180428504944, 0.022487467154860497, 0.03565690666437149, -0.018208831548690796, 0.030754733830690384, 0.047698263078927994, 0.03320943936705589, -0.05341767147183418, -0.008585518226027489, -0.024706577882170677, 0.05685543641448021, -0.0071871401742100716, -0.01668808050453663, 0.04636485129594803, -0.025232627987861633, -0.008486432023346424, -0.013059609569609165, -0.026819756254553795, 0.00487248320132494, -0.01363515667617321, 0.032829124480485916, 0.021118465811014175, 0.012297488749027252, 0.045196838676929474, 0.021231716498732567, 0.02223839983344078, 0.02728208526968956, -0.030107809230685234, -0.03312113508582115, -0.010356592945754528, 0.017227865755558014, -0.019827604293823242, -0.021880362182855606, -0.058527544140815735, -0.053417980670928955, -0.007349628489464521, -0.02530641295015812, 0.0439385287463665, -0.033201977610588074, -0.05769291892647743, -0.08890602737665176, 0.050559502094984055, 0.04725372791290283, 0.010338478721678257, -0.03131638094782829, 0.057661399245262146, -0.05721217021346092, 0.03245624154806137, -0.014475608244538307, 0.005512026138603687, 0.12179364264011383, 0.007597905583679676, 0.04636208340525627, 0.014905142597854137, -0.03152923285961151, 0.04102564975619316, 0.00998365506529808, -0.05376821756362915, -0.01592722162604332, 0.024113401770591736, 0.08239123970270157, -0.03793390840291977, -0.02634214051067829, -0.03941444307565689, 0.021157799288630486, 0.025448480620980263, 0.02476351521909237, 0.05079653486609459, -0.005080731585621834, 0.005707377567887306, 0.02746458537876606, 0.005693715997040272, -0.06295666098594666, 0.014523355290293694, -0.03791847079992294, 0.027520066127181053, -0.038919005542993546, -0.029225852340459824, -0.0512843020260334, -0.006039245054125786, -0.009499485604465008, 0.04916446655988693, -0.02735956571996212, -0.03704008832573891, -0.03363526239991188, -0.00497851287946105, 0.03043929859995842, 0.004783418960869312, 0.04973273351788521, -0.022669538855552673, 0.040199801325798035, -0.02053396962583065, 0.031683407723903656, 0.023772379383444786, 0.007016773801296949, -0.0027950024232268333, 0.0007326558697968721, 0.026004329323768616, -0.02395663969218731, 0.00981289241462946, 0.005939289927482605, 0.004074503667652607, -0.004525083117187023, -0.0058838240802288055, 0.030593378469347954, 0.0641246810555458, -0.057494401931762695, 0.030481062829494476, -0.07393869012594223, 0.029223144054412842, 0.00012609365512616932, 0.04352237656712532, 0.07817014306783676, 0.005483692046254873, 0.06336981803178787, 0.05181044340133667, 0.008646151050925255, -0.05769238993525505, -0.09135129302740097, -0.31782594323158264, -0.04269672557711601, -0.09821153432130814, 0.014164681546390057, -0.052706729620695114, -0.033583883196115494, -0.026333512738347054, 0.005203667096793652, -0.020114092156291008, 0.08576293289661407, 0.013471783138811588, -0.028651433065533638, 0.04149680212140083, 0.018770352005958557, -0.013606998138129711, -0.012658546678721905, 0.06109711900353432, -0.042196232825517654, -0.02841298282146454, 0.04738388583064079, 0.02489614672958851, -0.017545975744724274, -0.058345068246126175, -0.0005535876844078302, 0.0372818261384964, -0.048566024750471115, 0.11229709535837173, 0.07923734933137894, -0.016879115253686905, 0.0007468791445717216, -0.008107597008347511, 0.059553902596235275, -0.04571758583188057, -0.11535726487636566, 0.020667467266321182, -0.054139643907547, -0.035413436591625214, -0.1207958534359932, -0.024194659665226936, -0.0387134924530983, 0.012838008813560009, 0.04607575014233589, -0.017806200310587883, -0.018990211188793182, -0.05292390659451485, -0.005571786314249039, -0.003012163797393441, 0.01081763207912445, -0.031099162995815277, -0.028751511126756668, 0.02024625428020954, 0.0376238189637661, 0.03265320509672165, -0.038189321756362915, -0.06905917823314667, 0.08708425611257553, -0.041754428297281265, 0.016997404396533966, -0.025312460958957672, -0.039084337651729584, 0.01432014163583517, 0.0034836046397686005, 0.028354790061712265, 0.018623942509293556, -0.009537643752992153, -0.03913947194814682, 0.0006759870448149741, -0.006568222772330046, 0.04508690536022186, -0.06825718283653259, 0.01930231787264347, 0.007307344116270542, -0.03832673653960228, -0.020287878811359406, 0.04228509962558746, -0.011328369379043579, 0.019334621727466583, 0.015656819567084312, -0.02315770648419857, -0.040512293577194214, 0.03390924260020256, -0.044968899339437485, -0.014601750299334526, -0.026205038651823997, -0.01289779506623745, 0.025297680869698524, -0.018519120290875435, -0.01899585872888565, 0.011605312116444111, 0.01658312976360321, 0.038753852248191833, 0.021848713979125023, -0.0524403341114521, -0.020658018067479134, 0.06218912452459335, 0.042272645980119705, -0.22412583231925964, -0.041212476789951324, 0.0004991474561393261, 0.005233262199908495, -0.03917601332068443, 0.047155559062957764, 0.023068653419613838, 0.019144197925925255, 0.027473678812384605, 0.04032047837972641, -0.019485821947455406, 0.03738187626004219, 0.019398458302021027, 0.05473467335104942, 0.010355515405535698, -0.013462841510772705, 0.0005077007808722556, 0.022120114415884018, -0.0013515513855963945, 0.0028573644813150167, -0.010352855548262596, -0.022486597299575806, 0.18551991879940033, 0.0010169801535084844, -0.04689520224928856, 0.03847081959247589, -0.042812857776880264, -0.006581168156117201, -0.002271026372909546, -0.03989826887845993, 0.04842343181371689, -0.008783749304711819, 0.12928907573223114, -0.061196453869342804, -0.013508912175893784, 0.03385443612933159, -0.027617137879133224, 0.01922646351158619, -0.013727856799960136, -0.03686337545514107, 0.024016056209802628, -0.015114376321434975, 0.08031142503023148, 0.007802309934049845, 0.053275324404239655, -0.0033752021845430136, -0.005189806688576937, -0.018829036504030228, -0.003482841420918703, 0.09264501929283142, 0.023234495893120766, -0.029697971418499947, -0.08718830347061157, -0.017035258933901787, 0.008221563883125782, 0.010042541660368443, 0.016330812126398087, 0.005423779599368572, -0.02925795316696167, -0.03469930961728096, 0.004638259764760733, -0.08415298908948898, -0.040893565863370895, -0.036169715225696564, 0.08552904427051544], metadata={'file_path': '/Users/davidberenstein/Documents/programming/huggingface/agents-course/notebooks/unit2/llama-index/data/persona_100.txt', 'file_name': 'persona_100.txt', 'file_type': 'text/plain', 'file_size': 107, 'creation_date': '2025-02-27', 'last_modified_date': '2025-02-27'}, excluded_embed_metadata_keys=['file_name', 'file_type', 'file_size', 'creation_date', 'last_modified_date', 'last_accessed_date'], excluded_llm_metadata_keys=['file_name', 'file_type', 'file_size', 'creation_date', 'last_modified_date', 'last_accessed_date'], relationships={: RelatedNodeInfo(node_id='f1230f94-f8c1-4e07-861e-60ceafdc26cb', node_type=, metadata={'file_path': '/Users/davidberenstein/Documents/programming/huggingface/agents-course/notebooks/unit2/llama-index/data/persona_100.txt', 'file_name': 'persona_100.txt', 'file_type': 'text/plain', 'file_size': 107, 'creation_date': '2025-02-27', 'last_modified_date': '2025-02-27'}, hash='99be4c588429bba859100e9a829e19f9d589ef3a819cb830396d9a9d4241d4c0')}, metadata_template='{key}: {value}', metadata_separator='\\n', text='An environmental conservationist focused on wetland ecosystems and their role in mitigating climate change.', mimetype='text/plain', start_char_idx=0, end_char_idx=107, metadata_seperator='\\n', text_template='{metadata_str}\\n\\n{content}'),\n", + " TextNode(id_='b013dfff-cb15-4984-a277-5e97f40c976a', embedding=[-0.05348899960517883, 0.057813968509435654, -0.0008165185572579503, -0.01274291705340147, 0.027051862329244614, -0.06857572495937347, 0.11097916215658188, 0.022009124979376793, -0.06538229435682297, 0.04233633726835251, -0.029435504227876663, -0.06606542319059372, 0.039663538336753845, 0.029751265421509743, 0.03091864474117756, 0.047333989292383194, 0.03543467074632645, 0.039123792201280594, -0.0056287613697350025, 0.08890692889690399, 0.006521676201373339, 0.034325793385505676, 0.01383876521140337, -0.0719350054860115, 0.020415274426341057, 0.05942979082465172, 0.018893534317612648, -0.04882078617811203, -0.015287917107343674, -0.06398314982652664, -0.0024508002679795027, -0.009068092331290245, -0.015532350167632103, 0.03911144658923149, 0.0007675708620809019, 0.031728170812129974, 0.027204973623156548, 0.03725627437233925, -0.03602995723485947, 0.07887031883001328, -0.03472944721579552, -0.028076335787773132, 0.021417200565338135, 0.03814662620425224, 0.014381964690983295, -0.09584133327007294, -0.07684461027383804, -0.006485932972282171, -0.005920908413827419, -0.06914551556110382, -0.048508476465940475, -0.044581182301044464, -0.024740660563111305, 0.024054240435361862, -0.013752845115959644, -0.05202046036720276, 0.04980207234621048, -0.0032337172888219357, -0.03396577388048172, 0.01730174385011196, 0.012311814352869987, 0.03624185919761658, -0.11324708163738251, 0.07757193595170975, 0.03867082670331001, 0.03254605457186699, -0.01838625594973564, -0.07133873552083969, 0.028460273519158363, -0.04238104447722435, 0.015559906139969826, -0.022741662338376045, -0.025491349399089813, 0.04515054076910019, 0.007691989187151194, 0.01601455546915531, -0.026037849485874176, -0.023871690034866333, 0.009471453726291656, 0.0887121632695198, -0.013389447703957558, -0.050464119762182236, -0.04108777269721031, -0.07445073127746582, 0.009632720611989498, 0.007788829039782286, 0.019337765872478485, -0.06853493303060532, -0.07812638580799103, 0.017833055928349495, 0.0013783025788143277, -0.0040938775055110455, -0.01084835734218359, 0.08549009263515472, -0.0523124635219574, -0.043695785105228424, 0.0007306731422431767, 0.0289969090372324, -0.06242765486240387, 0.4033501148223877, 0.006766374688595533, -0.030933968722820282, 0.045800454914569855, 0.01569654978811741, 0.04949069768190384, 0.014359054155647755, -0.01554770115762949, -0.01733073964715004, -0.026267167180776596, 0.006973715499043465, -0.009103012271225452, 0.038635365664958954, -0.020993437618017197, -0.03840956464409828, 0.036086585372686386, 0.07039036601781845, -0.015222841873764992, 0.07547365874052048, -0.01879359409213066, 0.014508760534226894, -0.020603502169251442, -0.009581119753420353, 0.023958036676049232, 0.015295244753360748, 0.03260461986064911, 0.004204900935292244, -0.018419340252876282, 0.06411664932966232, 0.01368348952382803, 0.0683838427066803, 0.1126725822687149, 0.051493510603904724, -0.052732858806848526, -0.0023985381703823805, 0.04170237109065056, -0.007406109012663364, 0.016260195523500443, -0.01305844634771347, -0.026561100035905838, 0.03464561700820923, -0.012610957957804203, 0.004156186711043119, -0.011683083139359951, -0.013467319309711456, -0.1143905520439148, 0.023802917450666428, -0.054347798228263855, 0.08391665667295456, -0.033350735902786255, 0.030628878623247147, -0.0528014600276947, -0.003978569060564041, -0.05240422859787941, 0.014720974490046501, 0.07970418781042099, -0.034422699362039566, 0.06472638249397278, 0.03358433395624161, -0.007358785253018141, 0.010495522059500217, -0.0021861218847334385, -0.06714555621147156, 0.02295035682618618, 0.02385488897562027, 0.022519825026392937, -0.07098562270402908, -0.04213833063840866, 0.004688275512307882, 0.031652022153139114, -0.011638720519840717, 0.027656976133584976, 0.04827576130628586, -0.04206489026546478, -0.025465961545705795, 0.04356756806373596, 0.056022729724645615, 0.00010061527427751571, 0.014477243646979332, -0.034384600818157196, 0.012172327376902103, -0.0052819340489804745, 0.023301105946302414, 0.030992571264505386, -0.0348823182284832, -0.0036273726727813482, 0.0507788360118866, 0.00462267454713583, 0.001556474482640624, 0.031195294111967087, -0.02995297499001026, 0.025980345904827118, 0.02592824399471283, -0.0333961620926857, -0.07541465759277344, 0.047548916190862656, -0.056113630533218384, -0.03393461927771568, 0.01645326428115368, 0.0011668557999655604, -0.008237209171056747, 0.007595608942210674, 0.04538077488541603, -0.02724706381559372, 0.05448425933718681, -0.01617460697889328, -0.0075110821053385735, 0.01546460296958685, 0.02357550337910652, 0.047941189259290695, -0.009170410223305225, 0.002305651316419244, -0.008133330382406712, -0.06918003410100937, 0.014750665053725243, -0.05113455653190613, 0.051200952380895615, 0.02359894849359989, 0.005130127537995577, 0.04037068784236908, 0.013795987702906132, -0.025245344266295433, 0.025378393009305, -0.016760174185037613, -0.3199748992919922, 0.0262774508446455, -0.04329269379377365, -0.0009588865796104074, -0.046972520649433136, 0.0023950946051627398, 0.010488329455256462, 0.06533794105052948, -0.004591785836964846, 0.007032125256955624, 0.056576792150735855, -0.012954283505678177, 0.01170066837221384, 0.013158828020095825, 0.011239022947847843, 0.04239705950021744, 0.06388673186302185, -0.05981899052858353, -0.013441061601042747, 0.009156855754554272, 0.046574559062719345, -0.02302679978311062, -0.021349959075450897, -0.028386497870087624, -0.014628175646066666, -0.012488357722759247, 0.12473341077566147, 0.06373206526041031, 0.0020056460052728653, 0.01224442757666111, 0.004408353008329868, -0.03484250605106354, -0.04315827041864395, -0.08701059222221375, 0.009743770584464073, -0.06225196272134781, -0.032801736146211624, -0.09000512957572937, -0.03138168156147003, -0.027524882927536964, -0.06678720563650131, 0.0036075287498533726, -0.04540935531258583, 0.0027950669173151255, -0.06407446414232254, 0.02393415756523609, -0.005776434205472469, 0.03242187201976776, -0.04812229797244072, -0.012145906686782837, 0.02051251195371151, 0.009112653322517872, -0.03892689198255539, -0.03223065659403801, -0.038669634610414505, 0.035610686987638474, -0.038933586329221725, 0.0015966756036505103, -0.06885161250829697, 0.024092286825180054, -0.03315545991063118, -0.053359128534793854, -0.012480182573199272, 0.002273711608722806, -0.04314286634325981, -0.029498150572180748, 0.002956014359369874, 0.035725969821214676, 0.0704696848988533, -0.07726666331291199, -0.029841383919119835, 0.04960617423057556, -0.07202296704053879, 0.002483509946614504, -0.009444179013371468, 0.02306354232132435, 0.05286862328648567, -0.053944505751132965, -0.03322535380721092, -0.020430196076631546, 0.04887165501713753, -0.0388382263481617, 0.00660074595361948, -0.0015776886139065027, -0.005762151442468166, -0.03764290362596512, -0.006284832488745451, -0.002441947115585208, -0.0009214505553245544, 0.02803194336593151, -0.022561663761734962, -0.00424646632745862, -0.01915903575718403, -0.06153932958841324, -0.00826920848339796, 0.04106108471751213, -0.23968146741390228, 0.00845856312662363, -0.0009289769222959876, 0.031188329681754112, -0.02497165836393833, 0.04774409160017967, -0.047477494925260544, -0.028278181329369545, 0.05324422940611839, -0.021605607122182846, 0.08251900970935822, 0.014408824034035206, 0.03703159838914871, -0.000703761528711766, 0.004967873450368643, -0.013648979365825653, 0.028172671794891357, 0.00833785068243742, 0.05913631618022919, 0.030927496030926704, 0.02578483521938324, -0.053395479917526245, 0.1894540786743164, 0.02671734057366848, -0.023286668583750725, -0.008953959681093693, -0.043882470577955246, 0.003253332106396556, 0.016997355967760086, 0.013273905031383038, 0.12084591388702393, -0.04083094000816345, 0.08796213567256927, -0.00839595589786768, -0.008445419371128082, 0.03646060824394226, -0.05029459670186043, 0.06486528366804123, -0.006867029704153538, 0.019383780658245087, -0.05497070774435997, -0.05907372385263443, 0.0269156564027071, -0.018792273476719856, 0.11157432943582535, 0.029391933232545853, -0.05784182995557785, -0.03825923055410385, -0.0031377554405480623, 0.06753212213516235, 0.030007487162947655, -0.02161344513297081, -0.02454298920929432, 0.039488259702920914, -0.0035415850579738617, 0.03134318068623543, 0.035487111657857895, -0.006493370980024338, -0.002892758697271347, -0.08973399549722672, -0.004520732909440994, -0.02777440845966339, 0.004450732376426458, 0.02018120139837265, 0.09189198166131973], metadata={'file_path': '/Users/davidberenstein/Documents/programming/huggingface/agents-course/notebooks/unit2/llama-index/data/persona_1000.txt', 'file_name': 'persona_1000.txt', 'file_type': 'text/plain', 'file_size': 133, 'creation_date': '2025-02-27', 'last_modified_date': '2025-02-27'}, excluded_embed_metadata_keys=['file_name', 'file_type', 'file_size', 'creation_date', 'last_modified_date', 'last_accessed_date'], excluded_llm_metadata_keys=['file_name', 'file_type', 'file_size', 'creation_date', 'last_modified_date', 'last_accessed_date'], relationships={: RelatedNodeInfo(node_id='1c23d6eb-e606-4308-83b0-ab00687a1f2a', node_type=, metadata={'file_path': '/Users/davidberenstein/Documents/programming/huggingface/agents-course/notebooks/unit2/llama-index/data/persona_1000.txt', 'file_name': 'persona_1000.txt', 'file_type': 'text/plain', 'file_size': 133, 'creation_date': '2025-02-27', 'last_modified_date': '2025-02-27'}, hash='940328df63c63a041a34bad49761a1cd3dfda12ff39ac4c8918899146e411242')}, metadata_template='{key}: {value}', metadata_separator='\\n', text='A pulmonologist or respiratory specialist with a strong interest in educating patients about the respiratory system and its diseases.', mimetype='text/plain', start_char_idx=0, end_char_idx=133, metadata_seperator='\\n', text_template='{metadata_str}\\n\\n{content}'),\n", + " TextNode(id_='33208137-46a4-4c12-b893-88c305b96c0e', embedding=[-0.08604297786951065, -0.012714344076812267, -0.008833899162709713, -0.02955310046672821, 0.02022397518157959, -0.04438125714659691, 0.02284136600792408, 0.027205057442188263, -0.010971236042678356, -0.030922267585992813, 0.06265478581190109, -0.01069155614823103, 0.06314561516046524, 0.0027017032261937857, 0.03510716184973717, 0.058609988540410995, -0.012634601444005966, 0.007958853617310524, -0.011674120090901852, 0.04729962721467018, 0.03453619033098221, -0.042125068604946136, 0.053587980568408966, -0.10672035813331604, 0.03422507643699646, 0.03532136604189873, -0.0031767257023602724, -0.035418856889009476, 0.0046665361151099205, -0.07719796895980835, -0.008032050915062428, -0.01171699445694685, 0.0093406205996871, 0.0423273891210556, 0.005856309551745653, 0.03282162919640541, 0.03542117774486542, 0.02405194565653801, -0.012762063182890415, 0.03727347031235695, -0.014849206432700157, -0.010279779322445393, -0.018687237054109573, 0.052301108837127686, 0.008014403283596039, -0.03571721911430359, -0.022776653990149498, -0.035955872386693954, -0.04225456342101097, -0.0633339062333107, -0.08870360255241394, -0.08774881809949875, -0.010251310653984547, -0.008792504668235779, -0.000360763689968735, -0.004400107078254223, 0.04278293997049332, 0.029415426775813103, -0.02689569815993309, 0.05633074790239334, 0.025191517546772957, 0.0016708854818716645, -0.05699855089187622, 0.06468579918146133, 0.05498691275715828, 0.056116532534360886, -0.06458388268947601, -0.03904813900589943, -0.02199591137468815, -0.03656448423862457, -0.03236720710992813, -0.004197281319648027, -0.04942358285188675, 0.04659832641482353, 0.021756486967206, -0.01772460900247097, 0.0007257731631398201, 0.021910713985562325, -0.001089653349481523, 0.05209857225418091, -0.03495289757847786, -0.03993160277605057, -0.016280028969049454, -0.013653947040438652, 0.004142194055020809, 0.05548371374607086, 0.02446410246193409, -0.012690089643001556, -0.027059486135840416, -0.006007491145282984, -0.04531306400895119, -0.03581720218062401, 0.027801992371678352, 0.05060170963406563, -0.05909109488129616, -0.05529499799013138, -0.013651935383677483, 0.05114816501736641, -0.03194636106491089, 0.45298418402671814, -0.043665025383234024, -0.027476966381072998, 0.07730881869792938, 0.0058390372432768345, 0.052341390401124954, 0.04114549979567528, 0.09221728891134262, 0.02942369505763054, 0.019757097586989403, -0.0037699362728744745, -0.01834934763610363, -0.01249711588025093, -0.037822023034095764, -0.06806153804063797, 0.05241670832037926, -0.014508352614939213, -0.08239222317934036, 0.04258530214428902, -0.0064330636523664, 0.03274738788604736, 0.022571684792637825, -0.010210788808763027, 0.02422979660332203, -0.02234014868736267, -0.03215544670820236, 0.012847176752984524, -0.0033633788116276264, 0.031285256147384644, 0.022477667778730392, 0.05121650546789169, 0.005845730658620596, 0.029498528689146042, -0.07686633616685867, 0.01676352322101593, 0.0018261299701407552, 0.01801423914730549, 0.001807288615964353, -0.016289660707116127, -0.058347444981336594, -0.01174930389970541, -0.03852691501379013, 0.05956285074353218, 0.02313941903412342, 0.023798193782567978, -0.06497858464717865, 0.03981197997927666, -0.008546337485313416, 0.08628371357917786, -0.023242084309458733, 0.05703413113951683, -0.07137725502252579, 0.037564732134342194, -0.03275107964873314, 0.008038324303925037, 0.008796360343694687, -0.006189970765262842, 0.057373035699129105, -0.015604717656970024, -0.01883421465754509, 0.01644912362098694, 0.006517739500850439, -0.055219486355781555, -0.02062300033867359, 0.04255460947751999, 0.014594915322959423, -0.07299096137285233, -0.046293433755636215, 0.011358448304235935, 0.04309091344475746, -0.007763430941849947, 0.03999469801783562, 0.04971398785710335, -0.03723098337650299, 0.00437299394980073, 0.011664978228509426, 0.010658273473381996, -0.04964477941393852, 0.05948380380868912, -0.0380873940885067, 0.01896769367158413, 0.037665244191884995, -0.0005895690410397947, -0.029899468645453453, 0.0005913128261454403, -0.061732999980449677, 0.061480410397052765, -0.0009071918320842087, 0.007331262342631817, 0.03261132910847664, -0.023880688473582268, 0.015691347420215607, 0.021678244695067406, -0.02771192044019699, -0.077435202896595, 0.008928196504712105, -0.004947245121002197, 0.020570814609527588, -0.0051317051984369755, -0.008376740850508213, -0.07051890343427658, 0.04471476376056671, 0.0536770299077034, -0.02212372049689293, 0.05255834758281708, -0.00767879793420434, -0.006291790399700403, 0.03597397729754448, -0.015376296825706959, 0.011940134689211845, -0.003511629765853286, -0.08538062870502472, -0.026976490393280983, -0.019027546048164368, -0.006918814033269882, 0.008117476478219032, 0.007834523916244507, 0.034135960042476654, 0.031196705996990204, 0.04665990173816681, 0.06143759563565254, -0.04088522121310234, -0.050674065947532654, -0.01653757132589817, -0.3135085999965668, 0.02450019121170044, -0.040616802871227264, 0.004169756546616554, -0.07399152964353561, -0.00041057378984987736, -0.018493380397558212, 0.039444368332624435, -0.01043931394815445, 0.018122458830475807, 0.09816276282072067, -0.034281469881534576, 0.02268868312239647, -0.0038094092160463333, -0.017339980229735374, -0.022342683747410774, 0.048037778586149216, -0.05642028525471687, -0.04575398191809654, 0.021454131230711937, 0.0018833884969353676, -0.0311445165425539, -0.027009164914488792, -0.03554949536919594, 0.033769864588975906, 0.0055333757773041725, 0.13033427298069, 0.09004246443510056, 0.036198996007442474, -0.05924244970083237, 0.03285409137606621, 0.05314267426729202, -0.038779933005571365, -0.08201613277196884, 0.009203693829476833, -0.0770929679274559, 0.012378418818116188, -0.11600419878959656, 0.007649381645023823, -0.01035743486136198, -0.01743714138865471, -0.0031588266137987375, 0.019370850175619125, -0.053849510848522186, -0.03884970024228096, -0.016935287043452263, 0.007826038636267185, -0.029434887692332268, 0.018014265224337578, -0.008355149067938328, 0.011610865592956543, 0.0009233722812496126, 0.0015358463861048222, 0.02215736173093319, -0.04176513850688934, 0.02863757498562336, -0.03177769482135773, 0.03105931542813778, -0.01237644162029028, 0.013936607167124748, -0.01152576319873333, -0.07444030046463013, 0.026163429021835327, 0.00412296736612916, -0.021897338330745697, 0.012036100029945374, -0.0074363392777740955, -0.02001800574362278, 0.06772654503583908, -0.07551547139883041, 0.0008741314522922039, 0.06773011386394501, -0.007269402500241995, -0.008435090072453022, 0.007511516567319632, -0.035926416516304016, 0.01341057289391756, -0.030034158378839493, 0.008381173945963383, -0.028950359672307968, 0.023859955370426178, -0.014052383601665497, 0.04278509318828583, -0.013000990264117718, 0.022523583844304085, -0.06086476147174835, 0.023544639348983765, -0.027841605246067047, 0.03923013433814049, 0.0002375258773099631, -0.008439365774393082, 0.025587620213627815, -0.04275628179311752, -0.05451396852731705, -0.023097340017557144, 0.01262155082076788, -0.2785997986793518, -0.032559774816036224, 0.025138475000858307, 0.0650014653801918, 0.020138993859291077, 0.05428151786327362, 0.04618556797504425, 0.006685232277959585, 0.0051062339916825294, 0.050673708319664, 0.0182088240981102, 0.020702561363577843, 0.047758832573890686, -0.05907478183507919, 0.04232722893357277, -0.023202065378427505, 0.03706004470586777, 0.025269903242588043, 0.026772240176796913, 0.028467129915952682, -0.007660066708922386, -0.03286771476268768, 0.21493270993232727, -0.0014029905432835221, -0.011800097301602364, 0.0007197387749329209, -0.03364549204707146, -0.0068506598472595215, 0.06842490285634995, 0.026492230594158173, 0.03185667842626572, 0.03041713312268257, 0.09921428561210632, 0.004708628170192242, -0.02685399167239666, 0.019367340952157974, -0.021917855367064476, 0.014942595735192299, -0.014934271574020386, -0.008439530618488789, -0.03422687202692032, -0.06692375242710114, -0.013100603595376015, -0.0014693096745759249, 0.07593042403459549, 0.018899651244282722, -0.03531636670231819, -0.026404185220599174, -0.03399316594004631, 0.0025033012498170137, 0.015302132815122604, -0.057599879801273346, -0.06428561359643936, 0.023489804938435555, 0.012528540566563606, 0.032201528549194336, 0.022911598905920982, -0.00844666175544262, -0.013015779666602612, -0.0595574788749218, -0.008868888020515442, 0.04611528292298317, 0.07050518691539764, -0.014215217903256416, 0.07112061232328415], metadata={'file_path': '/Users/davidberenstein/Documents/programming/huggingface/agents-course/notebooks/unit2/llama-index/data/persona_1001.txt', 'file_name': 'persona_1001.txt', 'file_type': 'text/plain', 'file_size': 157, 'creation_date': '2025-02-27', 'last_modified_date': '2025-02-27'}, excluded_embed_metadata_keys=['file_name', 'file_type', 'file_size', 'creation_date', 'last_modified_date', 'last_accessed_date'], excluded_llm_metadata_keys=['file_name', 'file_type', 'file_size', 'creation_date', 'last_modified_date', 'last_accessed_date'], relationships={: RelatedNodeInfo(node_id='6eb7d6cd-63f9-4346-b203-fed200d3ea54', node_type=, metadata={'file_path': '/Users/davidberenstein/Documents/programming/huggingface/agents-course/notebooks/unit2/llama-index/data/persona_1001.txt', 'file_name': 'persona_1001.txt', 'file_type': 'text/plain', 'file_size': 157, 'creation_date': '2025-02-27', 'last_modified_date': '2025-02-27'}, hash='95ea9bb7700f8b67bf3d4d1f7fb9fd4b8bb3641e76cef3ec47efb0c36f6a95fb')}, metadata_template='{key}: {value}', metadata_separator='\\n', text='A web developer or a web development student, likely in the early stages of their learning or career, with a strong focus on HTML, CSS, and website building.', mimetype='text/plain', start_char_idx=0, end_char_idx=157, metadata_seperator='\\n', text_template='{metadata_str}\\n\\n{content}'),\n", + " TextNode(id_='8c801f38-5098-4919-8a5e-bf492ef3bef8', embedding=[-0.048725757747888565, -0.0052495598793029785, 0.038702886551618576, 0.03781942278146744, 0.10559574514627457, -0.06843998283147812, 0.0547456294298172, 0.014175287447869778, -0.05113939568400383, 0.016244983300566673, 0.010618474334478378, -0.05608655512332916, 0.0630234107375145, 0.022620312869548798, 0.04451029747724533, 0.024988247081637383, 0.01728481985628605, 0.05911610275506973, 0.03522154316306114, 0.004560273140668869, -0.008602365851402283, 0.007523141335695982, 0.02620653621852398, -0.0770203247666359, 0.023211464285850525, 0.03641432151198387, -0.018076041713356972, -0.009399299509823322, -0.03227763995528221, -0.10330837219953537, -0.020222878083586693, 0.03079245239496231, -0.014240716584026814, 0.019431255757808685, 0.013279459439218044, 0.06394557654857635, 0.009431170299649239, -0.009744512848556042, -0.022958310320973396, 0.06319067627191544, 0.015476859174668789, 0.01583205908536911, -0.007548138499259949, 0.01531281042844057, -0.04512138292193413, -0.07800707221031189, 0.015758397057652473, -0.005098891444504261, -0.09298551082611084, -0.05400073528289795, -0.03582540899515152, -0.11004968732595444, -0.06508296728134155, 0.015118620358407497, 0.00016996421618387103, -0.007476113736629486, 0.07529209554195404, 0.028884287923574448, -0.005323064513504505, 0.0226438008248806, 0.035490453243255615, -0.012942689470946789, -0.1455928534269333, 0.04896806925535202, 0.05162370204925537, 0.02215735800564289, -0.07071863859891891, -0.07771482318639755, 0.06416600197553635, -0.025603745132684708, -0.03912263363599777, -0.022285714745521545, -0.027983568608760834, -0.009179091081023216, 0.05669967830181122, 0.003050547093153, -0.05923710763454437, 0.04565669596195221, -0.003480083541944623, 0.0228254534304142, 0.02563989907503128, -0.04821701720356941, -0.06635448336601257, -0.0740761086344719, 0.042844440788030624, 0.013433128595352173, -0.010167006403207779, -0.007833853363990784, -0.03832416236400604, -0.004079198464751244, 0.027505092322826385, -0.012197697535157204, 0.04141359031200409, -0.012053167447447777, -0.04182203859090805, -0.026416314765810966, 0.03359580785036087, 0.006256412714719772, -0.05428752675652504, 0.41911739110946655, -0.0001774747797753662, -0.003038746537640691, 0.010053588077425957, 0.05980242043733597, 0.024712540209293365, 0.02285464107990265, -0.00307804299518466, -0.03626802936196327, 0.0017276317812502384, 0.03968376666307449, 0.014352611266076565, -0.023471198976039886, -0.025693373754620552, 0.02956559509038925, 0.05121332034468651, -0.028499113395810127, -0.028467942029237747, 0.06271996349096298, -4.6713889787497465e-06, 0.006660909857600927, -0.039383191615343094, 0.04382924735546112, 0.009112332947552204, -0.012609300203621387, 0.026102976873517036, 0.02776910737156868, 0.021313194185495377, 0.06079272925853729, 0.008484218269586563, 0.04191013425588608, 0.06751904636621475, 0.018703538924455643, -0.06904887408018112, 0.0080837681889534, 0.03311276435852051, -0.0072098770178854465, 0.022499246522784233, -0.04341960325837135, -0.03702161833643913, 0.05759764090180397, 0.0027893877122551203, 0.038724787533283234, -0.03220747783780098, -0.05210902914404869, -0.049654945731163025, 0.05471346899867058, 0.03268169239163399, 0.07461974024772644, -0.062246933579444885, 0.05252138897776604, -0.07733400911092758, 0.022419096902012825, -0.026996949687600136, 0.04310908541083336, 0.10353799164295197, 0.012861826457083225, 0.06182681396603584, -0.0063160257413983345, -0.02568771503865719, 0.016577420756220818, 0.026130160316824913, -0.0077103134244680405, 0.036682143807411194, 0.05179386958479881, 0.057936374098062515, -0.04684525728225708, -0.023997750133275986, -0.006979694589972496, 0.005173749290406704, 0.0041150497272610664, 0.044527020305395126, 0.09404487907886505, 0.0020045547280460596, -0.0059654852375388145, 0.04074086621403694, 0.0030463237781077623, -0.034772809594869614, 0.039685290306806564, -0.05160725116729736, -0.03360934555530548, 0.009255941957235336, 0.03936539217829704, -0.012966921553015709, -0.012559750117361546, -0.021290263161063194, 0.05083027109503746, -0.02673443779349327, 0.013433109037578106, -0.0422443151473999, -0.04599911347031593, 0.025832828134298325, 0.03080744482576847, 0.06194353476166725, -0.022494763135910034, 0.024161700159311295, -0.0561668798327446, 0.008939795196056366, 0.0019324662862345576, -0.0027922599110752344, -0.030662233009934425, 0.006808209232985973, 0.04702285677194595, -0.014906332828104496, 0.016401153057813644, -0.01624252460896969, -0.016305431723594666, -0.008181774988770485, -0.019120369106531143, 0.012909852899610996, 0.027301374822854996, -0.032241616398096085, 0.02195931412279606, -0.041808780282735825, 0.030516337603330612, -0.044960685074329376, 0.05974873900413513, 0.0507490411400795, 0.02226969599723816, 0.06819672882556915, 0.038577549159526825, 0.022523654624819756, -0.04764154925942421, -0.03174392133951187, -0.32254889607429504, -0.030218733474612236, -0.07125136256217957, 0.027305815368890762, -0.05946672335267067, -0.016163352876901627, -0.030135737732052803, 0.009424205869436264, 0.012823647819459438, 0.06146454066038132, 0.0098539087921381, 0.01011963002383709, 0.05070985481142998, 0.002230298239737749, 0.023274701088666916, -0.03006037324666977, 0.07937736064195633, -0.02373001165688038, -0.0774061530828476, 0.036152854561805725, 0.008551845327019691, 0.018857140094041824, -0.04094912111759186, -0.022354451939463615, 0.029536843299865723, -0.030105644837021828, 0.1036660224199295, 0.05881239101290703, -0.026417287066578865, -0.059646133333444595, -0.05275660380721092, 0.014108143746852875, -0.022839276120066643, -0.09167859703302383, -0.006021099165081978, -0.06670689582824707, -0.02646421082317829, -0.10722628980875015, -0.013452722690999508, -0.02468898519873619, 0.0356883779168129, 0.017282983288168907, -0.009161763824522495, -0.0019208199810236692, -0.02197171375155449, 0.023275380954146385, 0.010326794348657131, 0.015227905474603176, -0.03558315336704254, -0.06006171554327011, -0.00977801438421011, 0.04077647626399994, -0.012588545680046082, 0.012590629048645496, -0.03653750941157341, 0.04714704677462578, -0.03955468535423279, 0.008258945308625698, -0.03992614150047302, -0.0369744673371315, 0.008895761333405972, -0.04192574694752693, 0.0005656922003254294, 0.015724584460258484, -0.00018481400911696255, 0.010987858287990093, 0.01123710535466671, -0.03743670880794525, 0.0409553162753582, -0.10718678683042526, 0.012709744274616241, 0.029644977301359177, -0.03559624031186104, -0.03365161269903183, -0.025112003087997437, -0.0041082873940467834, 0.0376063771545887, -0.015630900859832764, -0.04865067079663277, -0.03573990240693092, 0.07863188534975052, -0.051235098391771317, 0.014209223911166191, 0.006784073077142239, -0.0028549805283546448, -0.015163077972829342, -0.04102577269077301, -0.021342022344470024, 0.04827198013663292, 0.014316638931632042, 0.022946884855628014, -0.002901677740737796, -0.03788074105978012, -0.0539265051484108, 0.03502444922924042, 0.04712209850549698, -0.22953666746616364, -0.0044343494810163975, -0.0006172014982439578, -0.019974330440163612, -0.018516674637794495, 0.04047269746661186, -0.024040071293711662, -0.03121200203895569, 0.03499690070748329, 0.011906472966074944, -0.0006798694375902414, 0.026016267016530037, 0.03166773542761803, 0.03829919546842575, 0.01736881211400032, 0.006951027549803257, 0.010718874633312225, 0.01981731690466404, 0.00559268519282341, -0.0001437084865756333, 0.001633865525946021, -0.01161405723541975, 0.20264138281345367, 0.024716105312108994, -0.034606292843818665, 0.02616131491959095, -0.02660587802529335, -0.04231564328074455, 0.02447664923965931, -0.009973603300750256, 0.08093880861997604, 0.03603809326887131, 0.11058975011110306, -0.06078727915883064, -0.0023282868787646294, 0.04393289238214493, -0.00585911376401782, 0.010542567819356918, -0.019628427922725677, -0.007470535580068827, -0.02363746426999569, -0.0341276079416275, 0.04160616546869278, -0.00018116399587597698, 0.07217340171337128, -0.012442204169929028, -0.044669393450021744, -0.0704934149980545, -0.04616937413811684, 0.10046502947807312, 0.005943288095295429, -0.0017401556251570582, -0.08263526111841202, 0.011041936464607716, -0.009022505953907967, -0.016308538615703583, 0.03196341171860695, 0.013735666871070862, -0.046171557158231735, -0.04475651681423187, 0.04319297894835472, -0.03570719063282013, -0.07189318537712097, -0.022510461509227753, 0.08093275129795074], metadata={'file_path': '/Users/davidberenstein/Documents/programming/huggingface/agents-course/notebooks/unit2/llama-index/data/persona_1002.txt', 'file_name': 'persona_1002.txt', 'file_type': 'text/plain', 'file_size': 122, 'creation_date': '2025-02-27', 'last_modified_date': '2025-02-27'}, excluded_embed_metadata_keys=['file_name', 'file_type', 'file_size', 'creation_date', 'last_modified_date', 'last_accessed_date'], excluded_llm_metadata_keys=['file_name', 'file_type', 'file_size', 'creation_date', 'last_modified_date', 'last_accessed_date'], relationships={: RelatedNodeInfo(node_id='af3c830e-1692-4b9f-9a9c-270f34a9952c', node_type=, metadata={'file_path': '/Users/davidberenstein/Documents/programming/huggingface/agents-course/notebooks/unit2/llama-index/data/persona_1002.txt', 'file_name': 'persona_1002.txt', 'file_type': 'text/plain', 'file_size': 122, 'creation_date': '2025-02-27', 'last_modified_date': '2025-02-27'}, hash='15d16222c8939184307ccef689fc9f553b352062a5b0719a64e482bace2c9f71')}, metadata_template='{key}: {value}', metadata_separator='\\n', text='An ecologist specializing in climate change impacts on regional ecosystems, particularly those with diverse plant species.', mimetype='text/plain', start_char_idx=0, end_char_idx=122, metadata_seperator='\\n', text_template='{metadata_str}\\n\\n{content}'),\n", + " TextNode(id_='df8659db-9efd-448f-8845-7def0196f384', embedding=[-0.06188396364450455, 0.03331071510910988, 0.02754245512187481, -0.00705803744494915, 0.01700523868203163, -0.05807590112090111, 0.0815582275390625, 0.038773395121097565, -0.017309732735157013, -0.024913877248764038, 0.025939498096704483, -1.7011627278407104e-05, 0.05366998538374901, 0.010702402330935001, 0.06796861439943314, 0.0400318019092083, 0.012680351734161377, 0.0373871847987175, 0.0019565068650990725, 0.045273877680301666, 0.09335482120513916, 0.016310634091496468, 0.04811081662774086, -0.07203024625778198, 0.030169937759637833, 0.0143685108050704, 0.004322308115661144, -0.06609508395195007, -0.0004494653840083629, -0.07675488293170929, -0.0010736995609477162, 0.004174383822828531, 0.012879464775323868, 0.042808033525943756, -0.00802453514188528, 0.03655695170164108, 0.014475279487669468, -0.0038225494790822268, -0.023428548127412796, 0.011032518930733204, -0.01673673279583454, -0.060902759432792664, -0.039018694311380386, 0.02819971740245819, -0.03157835081219673, -0.05503704026341438, -0.06475376337766647, -0.04182897508144379, -0.046041566878557205, -0.07637128233909607, -0.05937206745147705, -0.08948323875665665, 0.011880801059305668, 0.02648836374282837, -0.007482571993023157, 0.013333119451999664, 0.007726670708507299, 0.012829537503421307, -0.009639139287173748, 0.027769941836595535, 0.019161703065037727, 0.03178178519010544, -0.1154722273349762, 0.0859781876206398, 0.03276701271533966, 0.06271788477897644, -0.03130531683564186, -0.05773503705859184, 0.0395982451736927, -0.06958558410406113, 0.0004938555648550391, -0.024068279191851616, -0.02106841653585434, 0.046576932072639465, 0.04631916806101799, 0.015038416720926762, -0.011560059152543545, -0.011503719724714756, 0.007502306252717972, 0.05257479473948479, -0.011350293643772602, -0.0903925970196724, -0.006164948921650648, -0.05462954193353653, 0.05241183191537857, 0.023562725633382797, 0.013550560921430588, -0.0313619002699852, -0.014572078362107277, -0.028456255793571472, -0.019691698253154755, 0.011394715867936611, 0.03723959997296333, 0.03827337920665741, -0.031999435275793076, -0.06970152258872986, -0.031253017485141754, -0.00016145067638717592, -0.09482207894325256, 0.41384127736091614, 0.015645354986190796, -0.014281154610216618, 0.06618840247392654, 0.028339581564068794, 0.03751456364989281, 0.049722034484148026, 0.03841179236769676, -0.02875439263880253, -0.020738277584314346, -0.02189130149781704, -0.03022984229028225, -0.0014428122667595744, -0.04093112796545029, -0.030928876250982285, 0.003199940547347069, 0.027316192165017128, -0.06283953785896301, -0.00022448231175076216, 0.04205658286809921, 0.0032741553150117397, -0.028745785355567932, 0.0004583237168844789, 0.003994213882833719, -0.030728206038475037, 0.001169638941064477, -0.0007845844374969602, -0.005276334472000599, 0.05406561493873596, 0.00974212121218443, 0.07400641590356827, 0.07021422684192657, -0.02522590011358261, -0.07006309926509857, 0.006019496358931065, 0.028419073671102524, 0.02574465423822403, 0.023586826398968697, -0.03997417539358139, -0.015446681529283524, 0.03359290584921837, -0.03650777041912079, 0.0317552275955677, -0.03459606319665909, -0.011073245666921139, -0.036888476461172104, 0.04019343480467796, -0.06347937136888504, 0.0801161602139473, -0.0257252287119627, 0.10143139213323593, -0.03891092538833618, 0.039443787187337875, -0.050507593899965286, 0.05665901303291321, 0.0674750804901123, -0.01665969006717205, 0.10690949857234955, 0.0005899363313801587, -0.04304742440581322, 0.0029369357507675886, 0.0015020091086626053, -0.05725469812750816, -0.016706539317965508, 0.03383753076195717, 0.04761369153857231, -0.04852435365319252, -0.060526300221681595, 0.04635964706540108, 0.0024055337999016047, -0.05462804436683655, 0.04342376068234444, 0.0819098949432373, 0.010359575040638447, 0.026658279821276665, 0.012756516225636005, 0.019701195880770683, -0.030012166127562523, 0.03772452101111412, -0.05648181959986687, 0.02326136641204357, 0.008774982765316963, -0.06203088164329529, -0.033977240324020386, -0.011610431596636772, -0.061846859753131866, 0.08650525659322739, 0.07814571261405945, -0.025031162425875664, 0.030275914818048477, 0.0010682462016120553, 0.025093579664826393, 0.004561420064419508, -0.05730793997645378, -0.07399661839008331, 0.045623768121004105, 0.001479571801610291, 0.008774016983807087, -0.031363021582365036, -0.01087341457605362, -0.02754324860870838, -0.0017108205938711762, 0.060202717781066895, -0.038554154336452484, 0.050348661839962006, -0.007036278024315834, 0.008864684961736202, 0.013911508023738861, -0.00411271583288908, 0.034202080219984055, 0.004848886746913195, -0.0507817268371582, -0.011690261773765087, -0.029685834422707558, -0.03352344408631325, -0.024136781692504883, 0.04092028737068176, 0.027194330468773842, 0.06919816136360168, 0.02656969055533409, 0.01565639302134514, -0.016372699290513992, -0.0049550714902579784, -0.007121502887457609, -0.3122287094593048, 0.03668447211384773, -0.03367399796843529, -0.023392701521515846, -0.07989417016506195, -0.006658570840954781, -0.03397903963923454, 0.06797139346599579, -0.03194460645318031, 0.03716119006276131, 0.08113545924425125, 0.020674878731369972, 0.01766829937696457, 0.027148133143782616, 0.02595015987753868, -0.03499887138605118, 0.02728252485394478, -0.03254007548093796, -0.007951661013066769, 0.03000451624393463, 0.039541635662317276, 0.013236901722848415, 0.0004375741118565202, 0.00637675728648901, -0.004260715562850237, -0.010344426147639751, 0.10343976318836212, 0.03291284665465355, 0.04145590960979462, -0.08530216664075851, -0.03348333761096001, 0.0334172248840332, -0.025153975933790207, -0.06595093011856079, -0.00025477714370936155, -0.08938050270080566, -0.04281255602836609, -0.06686858832836151, 0.035020146518945694, -0.06238806992769241, -0.06153241917490959, -0.01068890281021595, -0.008439742028713226, -0.04830373451113701, -0.042554982006549835, -0.0045674326829612255, 0.04011312872171402, -0.04386402294039726, 0.001079310430213809, 0.02270575426518917, -0.001649343641474843, -0.06437331438064575, -0.04082547128200531, 0.027250291779637337, -0.09122735261917114, 0.05848019942641258, -0.05302783101797104, 0.052076857537031174, -0.0592750646173954, -0.020121309906244278, -0.003298536641523242, -0.030056031420826912, 0.0015340849058702588, 0.0003690697194542736, -0.01990916207432747, 0.020677845925092697, 0.0033000237308442593, 0.04723386839032173, 0.028054188936948776, -0.07791387289762497, 0.0007130238227546215, 0.060339976102113724, -0.00353013863787055, 0.009627960622310638, -0.032058753073215485, -0.0016099985223263502, 0.06637655943632126, -0.0019747065380215645, -0.012577671557664871, -0.021080350503325462, 0.05912700667977333, -0.03883226960897446, -0.014723912812769413, 0.0023979549296200275, 0.06312616169452667, -0.03816375881433487, 0.0416177436709404, -0.034156426787376404, 0.03888087719678879, 0.0030097663402557373, 0.016960395500063896, 0.013281026855111122, 0.013550439849495888, -0.042640287429094315, 0.004409573506563902, 0.008845834992825985, -0.22693561017513275, -0.005145876668393612, 0.017878953367471695, -0.009725230745971203, -0.015066414140164852, 0.06928761303424835, -0.014431948773562908, -0.017266569659113884, 0.014890369027853012, -0.024049781262874603, 0.01863943226635456, 0.01783853769302368, 0.010422968305647373, -0.023317039012908936, -0.029872937127947807, -0.006796898785978556, 0.08987763524055481, -0.007238918915390968, 0.02136007323861122, -0.05419502407312393, -0.022622181102633476, -0.0039013922214508057, 0.1931600570678711, 0.012967625632882118, -0.022781522944569588, -0.022070514038205147, -0.028266366571187973, 0.005468593444675207, 0.09507463127374649, -0.027192696928977966, 0.08157537132501602, -0.00042682766797952354, 0.0585012212395668, -0.00924557913094759, 0.02860308811068535, 0.03866090252995491, 0.011106951162219048, 0.03206438198685646, 0.01382516510784626, 0.037541717290878296, -0.01858971081674099, -0.05676295608282089, -0.01291381660848856, -0.014826721511781216, 0.08262867480516434, 0.03091435506939888, -0.04241955280303955, -0.08494564145803452, -0.04064639285206795, -0.005872727371752262, 0.05081621930003166, -0.05873611196875572, -0.06404969096183777, 0.0413481779396534, -0.016721097752451897, 0.044256411492824554, 0.017158064991235733, 0.02879945933818817, -0.042550764977931976, -0.05947781354188919, 0.04361778125166893, -0.02975820191204548, 0.010985316708683968, 0.003283157479017973, 0.08740758150815964], metadata={'file_path': '/Users/davidberenstein/Documents/programming/huggingface/agents-course/notebooks/unit2/llama-index/data/persona_1003.txt', 'file_name': 'persona_1003.txt', 'file_type': 'text/plain', 'file_size': 170, 'creation_date': '2025-02-27', 'last_modified_date': '2025-02-27'}, excluded_embed_metadata_keys=['file_name', 'file_type', 'file_size', 'creation_date', 'last_modified_date', 'last_accessed_date'], excluded_llm_metadata_keys=['file_name', 'file_type', 'file_size', 'creation_date', 'last_modified_date', 'last_accessed_date'], relationships={: RelatedNodeInfo(node_id='79d6d46a-445b-42d0-bb1d-0946e477e11b', node_type=, metadata={'file_path': '/Users/davidberenstein/Documents/programming/huggingface/agents-course/notebooks/unit2/llama-index/data/persona_1003.txt', 'file_name': 'persona_1003.txt', 'file_type': 'text/plain', 'file_size': 170, 'creation_date': '2025-02-27', 'last_modified_date': '2025-02-27'}, hash='04cffc0652a9718f5fb9e38c0963cf2424689febd46fd8a85e1c85fddfed744d')}, metadata_template='{key}: {value}', metadata_separator='\\n', text='A special education teacher or instructional specialist focused on inclusive education and assistive technology, likely working with students with diverse learning needs.', mimetype='text/plain', start_char_idx=0, end_char_idx=170, metadata_seperator='\\n', text_template='{metadata_str}\\n\\n{content}'),\n", + " TextNode(id_='f7c06850-8076-4202-8edf-cd75287896b4', embedding=[-0.041037026792764664, 0.010861074551939964, 0.028619464486837387, 0.024241387844085693, 0.07266978174448013, -0.03984687104821205, 0.015291742980480194, 0.00791905540972948, -0.04617764800786972, -0.005434268154203892, -0.017826538532972336, -0.02208668366074562, 0.02893582545220852, 0.03354125842452049, 0.016116203740239143, 0.04566626995801926, -0.0736224353313446, 0.07933201640844345, 0.05645919591188431, 0.024515846744179726, 0.038881342858076096, -0.021676311269402504, 0.02131136693060398, -0.0282600037753582, 0.011853724718093872, 0.0403873436152935, -0.014560483396053314, -0.02104410156607628, -0.02161445841193199, -0.08717530965805054, -0.02390480414032936, 0.0019603155087679625, -0.029415197670459747, 0.061051905155181885, -0.0016533512389287353, 0.06719478219747543, 0.041733693331480026, 0.06652135401964188, -0.025872230529785156, 0.0689767524600029, -0.03090282529592514, 0.006429108791053295, 0.010431045666337013, 0.03733857348561287, -0.004966824781149626, -0.0597558431327343, 0.032036542892456055, -0.060831062495708466, -0.08651687204837799, -0.07417231798171997, -0.0017885625129565597, -0.06765242666006088, -0.06912267208099365, 0.02897239290177822, 0.035241976380348206, 0.028533050790429115, 0.06941099464893341, 0.028692122548818588, -0.009048263542354107, 0.010270724073052406, 0.021899022161960602, -0.01055077277123928, -0.17418891191482544, 0.07344427704811096, 0.011438809335231781, -0.009962444193661213, -0.08989033102989197, -0.03647816181182861, 0.012974412180483341, -0.04910105839371681, -0.024376340210437775, -0.06318668276071548, -0.029710622504353523, -0.002380502177402377, 0.05815862864255905, -0.014370191842317581, -0.024986593052744865, 0.03147334232926369, -0.015235990285873413, 0.012701609171926975, 0.0025540010537952185, -0.03578803315758705, -0.00355929066427052, -0.03754321113228798, 0.01798960193991661, 0.03491032496094704, -0.027593286707997322, -0.0004166005819570273, -0.011635129339993, 0.0022766655310988426, 0.0005135529791004956, -0.00420512817800045, 0.07898261398077011, -0.0011097938986495137, -0.03610517084598541, -0.041182003915309906, 0.044845059514045715, 0.053625840693712234, -0.029053954407572746, 0.43433207273483276, -0.02594250626862049, 0.052919723093509674, 0.02974935807287693, 0.054676253348588943, 0.04691147431731224, -0.016765058040618896, -0.024730820208787918, -0.05558290332555771, -0.02152371034026146, -0.010867821983993053, -0.036025937646627426, 0.010566391050815582, -0.01330918911844492, 0.030187077820301056, 0.10431411117315292, -0.03339413180947304, -0.02789357863366604, 0.06355948746204376, -0.02273011952638626, 0.009713827632367611, -0.0042490060441195965, -0.05244055390357971, 0.02008640207350254, 0.02391768805682659, 0.03378882631659508, 0.022184031084179878, 0.028201919049024582, -0.004693272989243269, 0.04998156055808067, 0.013819081708788872, 0.02380918152630329, 0.008598482236266136, -0.0886627733707428, 0.030349167063832283, 0.017325684428215027, -0.0306515172123909, 0.006231799256056547, -0.0539303794503212, -0.01958828791975975, 0.013155108317732811, -0.029285216704010963, 0.08392329514026642, -0.037685733288526535, -0.02895994856953621, -0.09322746098041534, 0.03266613930463791, 0.03365141153335571, 0.0324733704328537, -0.029076725244522095, 0.04540034383535385, -0.07068777829408646, 8.282606722787023e-05, 0.005905685480684042, 0.015454307198524475, 0.06169528514146805, 0.0025886460207402706, 0.047993458807468414, 0.030069531872868538, -0.001090178033336997, 0.041200146079063416, 0.023183047771453857, -0.03926660865545273, 0.019297732040286064, 0.059423819184303284, 0.013508276082575321, -0.08698628842830658, -0.05965109169483185, -0.00894856359809637, 0.04256170615553856, -0.008142572827637196, 0.05511326342821121, 0.06300665438175201, 0.015202227048575878, 0.04304328188300133, 0.05335061624646187, 0.038493406027555466, -0.027158748358488083, 0.05294347554445267, -0.04153567552566528, 0.0048736101016402245, -0.0034134143497794867, -0.032635804265737534, -0.07826483994722366, -0.006056302227079868, -0.02061263658106327, 0.040907345712184906, -0.02122691087424755, -0.013815145008265972, -0.013433955609798431, 0.020167740061879158, 0.027057409286499023, 0.013705076649785042, 0.04416177421808243, -0.031491246074438095, 0.02420373260974884, -0.03635310381650925, -0.002181326039135456, -0.004440543707460165, 0.0045109405182302, -0.040325380861759186, -0.029192427173256874, 0.0036668479442596436, -0.04340218007564545, 0.04467150941491127, 0.01641414500772953, 0.014455242082476616, -0.010280119255185127, -0.02031612955033779, 0.0330902524292469, 0.0064325155690312386, -0.04283804073929787, 0.04456266760826111, -0.01612064242362976, -0.01511387713253498, 0.033119864761829376, 0.07817023247480392, 0.04702679067850113, -0.003324402729049325, 0.06657324731349945, 0.030141232535243034, -0.017049165442585945, -0.06738515198230743, -0.05161158740520477, -0.30226463079452515, -0.029465308412909508, -0.11136776208877563, 0.030837316066026688, -0.1155725046992302, -0.02317069098353386, -0.010143280029296875, -0.00029826894751749933, -0.039335235953330994, 0.07977723330259323, 0.012254112400114536, -0.022185400128364563, 0.03337322548031807, 0.04124252870678902, 0.014601016417145729, 0.0020832500886172056, 0.054506927728652954, -0.050037939101457596, -0.05589978024363518, 0.05741196870803833, 0.04888724908232689, -0.04625086486339569, -0.03461058810353279, -0.023870369419455528, 0.028761940076947212, -0.02181459590792656, 0.12865760922431946, 0.02718896046280861, -0.006242573726922274, -0.02188209258019924, -0.019762733951210976, 0.01828739233314991, -0.03933659568428993, -0.09914679080247879, -0.01881658285856247, -0.04467398300766945, -0.006071948446333408, -0.07317637652158737, -0.03840931877493858, -0.025115791708230972, -0.03783233463764191, 0.034144461154937744, -0.032703813165426254, -0.0031494421418756247, -0.06848083436489105, -0.0036642146296799183, -0.01042340137064457, 0.008073150180280209, 0.014762979932129383, -0.038109201937913895, -0.015996575355529785, -0.01524414774030447, -0.023577051237225533, -0.004425758961588144, -0.04958333447575569, 0.07870838791131973, -0.04673270881175995, 0.0013155118795111775, -0.04329191893339157, -0.010478591546416283, -0.023830562829971313, -0.04631110280752182, 0.02745288610458374, 0.040429700165987015, 0.024863051250576973, 0.032418444752693176, -0.021506333723664284, -0.01172389555722475, 0.02510726824402809, -0.06775970011949539, 0.0024206500966101885, 0.0683627650141716, -0.03863242268562317, -0.0845879465341568, 0.022150160744786263, -0.014744996093213558, 0.015223154798150063, -4.312319651944563e-05, 0.0024093440733850002, -0.029037129133939743, 0.039736006408929825, -0.06250613927841187, 0.03340313211083412, -0.01727200672030449, -0.006666483823210001, 0.007758312858641148, -0.0006788247846998274, -0.008698678575456142, 0.0379113145172596, 0.019801625981926918, 0.0533292330801487, -0.0004304227768443525, -0.03532033786177635, -0.03625627979636192, 0.05239502713084221, 0.030876636505126953, -0.25122708082199097, -0.022774405777454376, 0.03421243280172348, 0.033825427293777466, 0.0028587032575160265, 0.028654582798480988, -0.005173047538846731, 0.01275630109012127, 0.06027793139219284, 0.03192964568734169, 0.053022753447294235, 0.005249889567494392, 0.01997956447303295, -0.002185168908908963, 0.023653686046600342, -0.04896765202283859, 0.0010342802852392197, 0.05852968990802765, -0.022096708416938782, -0.0026830213610082865, -0.012275295332074165, -0.028062716126441956, 0.17430318892002106, 0.011230424977838993, -0.029651684686541557, 0.0013656094670295715, -0.04393962398171425, 0.01539972797036171, 0.03201175853610039, -0.0039792959578335285, 0.07339999079704285, -0.0151000851765275, 0.10951399803161621, -0.01908179372549057, -0.007483433000743389, 0.017913496121764183, -0.015128036960959435, 0.0577683299779892, -0.04005657136440277, -0.018999965861439705, -0.02628379315137863, -0.023839011788368225, 0.030482493340969086, -0.016803167760372162, 0.0740637481212616, 0.008684910833835602, -0.016082050278782845, -0.00913976039737463, -0.04464925080537796, 0.0657113790512085, -0.004526291508227587, -0.055968835949897766, -0.08118846267461777, -0.0018921291921287775, 0.023309316486120224, 0.008628190495073795, 0.044508032500743866, -0.01603620871901512, -0.013270326890051365, 0.0015594973228871822, 0.006324936170130968, 0.0006922114407643676, 0.013610533438622952, -0.009646812453866005, 0.08269380778074265], metadata={'file_path': '/Users/davidberenstein/Documents/programming/huggingface/agents-course/notebooks/unit2/llama-index/data/persona_1004.txt', 'file_name': 'persona_1004.txt', 'file_type': 'text/plain', 'file_size': 160, 'creation_date': '2025-02-27', 'last_modified_date': '2025-02-27'}, excluded_embed_metadata_keys=['file_name', 'file_type', 'file_size', 'creation_date', 'last_modified_date', 'last_accessed_date'], excluded_llm_metadata_keys=['file_name', 'file_type', 'file_size', 'creation_date', 'last_modified_date', 'last_accessed_date'], relationships={: RelatedNodeInfo(node_id='1347651d-7fc8-42d4-865c-a0151a534a1b', node_type=, metadata={'file_path': '/Users/davidberenstein/Documents/programming/huggingface/agents-course/notebooks/unit2/llama-index/data/persona_1004.txt', 'file_name': 'persona_1004.txt', 'file_type': 'text/plain', 'file_size': 160, 'creation_date': '2025-02-27', 'last_modified_date': '2025-02-27'}, hash='19628b0ae4a0f0ebd63b75e13df7d9183f42e8bb84358fdc2c9049c016c4b67d')}, metadata_template='{key}: {value}', metadata_separator='\\n', text='An environmental historian or urban planner focused on ecological conservation and sustainability, likely working in local government or a related organization.', mimetype='text/plain', start_char_idx=0, end_char_idx=160, metadata_seperator='\\n', text_template='{metadata_str}\\n\\n{content}'),\n", + " TextNode(id_='0f1e43ff-01e0-492f-99d8-af9057fa37aa', embedding=[-0.060987457633018494, 0.03656384348869324, 0.022288380190730095, -0.012912697158753872, 0.040452200919389725, -0.045450370758771896, -0.01564696617424488, -0.027434833347797394, -0.06797388195991516, -0.06486129760742188, -0.028862398117780685, -0.014356900006532669, 0.022324107587337494, 0.046113718301057816, 0.05133039504289627, 0.035205259919166565, -0.05669795721769333, 0.05324450880289078, -0.002276072045788169, 0.057400770485401154, -0.03053339384496212, -0.025664759799838066, 0.0959436297416687, 0.0086022038012743, 0.03275240212678909, 0.015195677056908607, 0.021988654509186745, -0.024910371750593185, -0.040213875472545624, -0.15455405414104462, -0.012219070456922054, -0.006262182258069515, -0.014602902345359325, 0.04390082135796547, 0.041490595787763596, -0.007933363318443298, 0.033364564180374146, 0.018654946237802505, 0.019735006615519524, 0.04741466045379639, 0.004666274879127741, 0.008705689571797848, 0.03885326161980629, 0.06355099380016327, 0.05354106053709984, 0.027467265725135803, 0.003729499178007245, 0.03742465004324913, -0.010098360478878021, -0.026951441541314125, -0.06168828904628754, -0.036804087460041046, -0.024903075769543648, -0.018337421119213104, 0.09575453400611877, 0.05420086160302162, 0.06436539441347122, 0.0008895536884665489, -0.009664777666330338, 0.028989315032958984, 0.022809157148003578, 0.03393794223666191, -0.1875326782464981, 0.04292184114456177, 0.02273382991552353, 0.03874267265200615, 0.002164630452170968, -0.033264003694057465, -0.0050046625547111034, -0.028353974223136902, -0.06578359007835388, -0.018606821075081825, -0.031222807243466377, -0.03774864599108696, 0.0314396508038044, -0.04188290238380432, 0.0013992846943438053, 0.026832228526473045, -0.04728895053267479, 0.006629057228565216, 0.035583678632974625, -0.011160350404679775, 0.009019915945827961, -0.019763443619012833, 0.005503030959516764, -0.0011766088427975774, -0.06037004292011261, -0.04670778289437294, -0.029890887439250946, -0.02734953910112381, -0.025882722809910774, -0.0481455959379673, 0.0853864848613739, 0.010102765634655952, -0.04687156528234482, -0.01377363596111536, -0.026698516681790352, 0.057005785405635834, -0.007215225603431463, 0.41427698731422424, -0.006261670030653477, 0.02768704667687416, 0.016556138172745705, 0.002902584383264184, 0.009598108008503914, 0.044442061334848404, 0.0291107390075922, -0.030348487198352814, -0.035808008164167404, -0.004602376371622086, -0.009580066427588463, 0.03561396151781082, -0.020828530192375183, -0.03352406620979309, 0.1444336324930191, -0.04196208342909813, -0.007291140500456095, 0.013434229418635368, -0.011683927848935127, -0.0069679017178714275, -0.013077422976493835, 0.008119545876979828, 0.02683931589126587, -0.030518239364027977, -0.0013230533804744482, 0.002741773845627904, 0.03006993792951107, 0.011897142976522446, 0.057309966534376144, -0.03424324467778206, -0.04372446984052658, -0.020817264914512634, -0.0749506875872612, -0.01788060925900936, 0.046628229320049286, 0.0067854272201657295, 0.015560206025838852, -0.06018519401550293, 0.019893398508429527, -0.03085952252149582, -0.02213066630065441, -0.012840948067605495, -0.04397227615118027, 0.04581722244620323, -0.10086271911859512, 0.012763326987624168, 0.04162854328751564, 0.03971321880817413, -0.011694763787090778, 0.05379193648695946, -0.01344988215714693, 0.00828413013368845, -0.05785619467496872, -0.0271777231246233, 0.030319496989250183, 0.0059529696591198444, 0.06486143916845322, 0.04977557808160782, -0.02116422913968563, 0.016026945784687996, -0.03829575330018997, -0.07630987465381622, 0.03267894685268402, 0.05343771353363991, 0.004460674244910479, -0.10754311829805374, -0.06547174602746964, 0.016822820529341698, 0.02340817078948021, -0.007886961102485657, 0.0861336961388588, 0.03616364672780037, -0.04901961609721184, 0.039225611835718155, 0.0336570180952549, 0.058076296001672745, -0.00871737115085125, 0.04772866889834404, -0.04275374114513397, -0.004652813076972961, 0.0235146377235651, -0.06237006559967995, -0.06441662460565567, -0.01657181791961193, -0.012003946118056774, 0.09636747092008591, 0.021342219784855843, 0.006544305942952633, 0.0017185414908453822, -0.002976201707497239, 0.03808153420686722, 0.05698036774992943, -0.012145286425948143, -0.023735884577035904, -0.005651817191392183, -0.042196180671453476, 0.012054589577019215, 0.024742452427744865, 0.022808538749814034, -0.039498064666986465, -0.04368918389081955, -0.005563730839639902, -0.02308461256325245, 0.042010243982076645, -0.0010198839008808136, 0.0008430278394371271, -0.023146428167819977, -0.02269802987575531, 0.012730603106319904, -0.0446593351662159, -0.049992602318525314, 0.02309381775557995, -0.059504181146621704, -0.07673582434654236, 0.01485629752278328, -0.01909884251654148, 0.0283365398645401, -0.0046076993457973, 0.012304135598242283, 0.025253241881728172, -0.0384819358587265, -0.09326702356338501, -0.07144726812839508, -0.32229316234588623, -0.016828907653689384, -0.07725630700588226, 0.008788068778812885, -0.041409000754356384, -0.07843583077192307, 0.026078173890709877, 0.030885886400938034, -0.05009344220161438, 0.11348553746938705, -0.035273440182209015, -0.015512962825596333, 0.0162297822535038, 0.004976834170520306, 0.0055862911976873875, 0.003738096449524164, 0.0039631580002605915, -0.023942092433571815, -0.03209693729877472, 0.09084739536046982, 0.026923643425107002, -0.01086227037012577, -0.02014666236937046, -0.060389190912246704, 0.04508887976408005, -0.025590037927031517, 0.12174787372350693, 0.04553968831896782, 0.015630489215254784, -0.03584791719913483, -0.019497103989124298, 0.018255040049552917, -0.043762825429439545, -0.03788848593831062, 0.021050872281193733, -0.023579057306051254, 0.07328996062278748, -0.026006106287240982, 0.02474142797291279, -0.009379928931593895, -0.03237409144639969, 0.018736042082309723, -0.0031734833028167486, -0.009053773246705532, -0.05074591562151909, -0.02124640718102455, 0.018005719408392906, -0.013295293785631657, 0.0091158552095294, -0.04240172356367111, 0.01705773174762726, 0.007061827927827835, 0.017622875049710274, 0.032098572701215744, -0.09575245529413223, 0.02976658008992672, -0.05410228669643402, 0.007471845019608736, 0.0008912931079976261, 0.03399219736456871, -0.0412781797349453, 0.003230362432077527, 0.018954738974571228, -0.03298179805278778, 0.020770594477653503, 0.06508797407150269, -0.030353913083672523, 0.005813686177134514, 0.04082971066236496, -0.000979571370407939, 0.02619091048836708, 0.029395541176199913, -0.08791019022464752, -0.05148862674832344, 0.04380735754966736, 0.04076840728521347, 0.007659696042537689, 0.04752219468355179, -0.034214384853839874, -0.009181627072393894, 0.05738057568669319, -0.033427778631448746, 0.019917642697691917, -0.007833104580640793, -0.005015798378735781, -0.023848051205277443, -0.01079949364066124, 0.007971520535647869, 0.06098691374063492, 0.019655616953969002, 0.036768000572919846, -0.01573789119720459, -0.04759913310408592, 0.0412093847990036, -0.007609188091009855, -0.0023233401589095592, -0.2274322807788849, -0.014843468554317951, 0.09144309163093567, 0.08907998353242874, 0.02019757404923439, 0.05070815235376358, 0.006004324648529291, -0.02843000926077366, 0.016115199774503708, -0.000741539872251451, 0.046170610934495926, 0.04125262051820755, 0.029278190806508064, -0.03595469519495964, 0.018725886940956116, -0.06934595108032227, 0.023411111906170845, 0.05535225197672844, -0.05499865114688873, 0.037970975041389465, 0.0010244213044643402, 0.003603314748033881, 0.13844504952430725, 0.005218803882598877, -0.05496430769562721, -0.029220767319202423, 0.01128808967769146, 0.04284602031111717, -0.0029170536436140537, -0.0067917173728346825, 0.07272733747959137, -0.023667365312576294, 0.05637551099061966, -0.04506793990731239, -0.02331038936972618, 0.02194610796868801, -0.04223988205194473, 0.03193353861570358, -0.056648995727300644, -0.018584081903100014, -0.04343866929411888, -0.015355930663645267, -0.029910266399383545, 0.0007976325578056276, 0.05819122865796089, 0.04131602495908737, -0.04356569051742554, 0.02001306600868702, -0.0050193071365356445, 0.07075975090265274, -0.009631453081965446, -0.029264483600854874, -0.046710800379514694, 0.04622230678796768, 0.07647742331027985, 0.00590542471036315, 0.025779100134968758, 0.04286840185523033, -0.015187249518930912, -0.028853705152869225, -0.0005579296266660094, -0.00019081275968346745, 0.032873205840587616, -0.025419604033231735, 0.06789165735244751], metadata={'file_path': '/Users/davidberenstein/Documents/programming/huggingface/agents-course/notebooks/unit2/llama-index/data/persona_1005.txt', 'file_name': 'persona_1005.txt', 'file_type': 'text/plain', 'file_size': 85, 'creation_date': '2025-02-27', 'last_modified_date': '2025-02-27'}, excluded_embed_metadata_keys=['file_name', 'file_type', 'file_size', 'creation_date', 'last_modified_date', 'last_accessed_date'], excluded_llm_metadata_keys=['file_name', 'file_type', 'file_size', 'creation_date', 'last_modified_date', 'last_accessed_date'], relationships={: RelatedNodeInfo(node_id='140b4d42-f58a-412d-8c15-439b25218bed', node_type=, metadata={'file_path': '/Users/davidberenstein/Documents/programming/huggingface/agents-course/notebooks/unit2/llama-index/data/persona_1005.txt', 'file_name': 'persona_1005.txt', 'file_type': 'text/plain', 'file_size': 85, 'creation_date': '2025-02-27', 'last_modified_date': '2025-02-27'}, hash='f9e87c24312f7290b04f62167fa845fd1fb3b07ff4d39ab099563339a8f34838')}, metadata_template='{key}: {value}', metadata_separator='\\n', text='An historian focused on 19th-century Irish politics and the Irish Home Rule movement.', mimetype='text/plain', start_char_idx=0, end_char_idx=85, metadata_seperator='\\n', text_template='{metadata_str}\\n\\n{content}')]" + ] + }, + "execution_count": 16, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from llama_index.embeddings.huggingface_api import HuggingFaceInferenceAPIEmbedding\n", + "from llama_index.core.node_parser import SentenceSplitter\n", + "from llama_index.core.ingestion import IngestionPipeline\n", + "\n", + "# create the pipeline with transformations\n", + "pipeline = IngestionPipeline(\n", + " transformations=[\n", + " SentenceSplitter(),\n", + " HuggingFaceInferenceAPIEmbedding(model_name=\"BAAI/bge-small-en-v1.5\"),\n", + " ]\n", + ")\n", + "\n", + "# run the pipeline sync or async\n", + "nodes = await pipeline.arun(documents=documents[:10])\n", + "nodes" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "As, you can see, we have created a list of `Node` objects, which are just chunks of text from the original documents. Let's explore how we can add these nodes to a vector store.\n", + "\n", + "### Storing and indexing documents\n", + "\n", + "Since we are using an ingestion pipeline, we can directly attach a vector store to the pipeline to populate it.\n", + "In this case, we will use `Chroma` to store our documents.\n", + "Let's run the pipeline again with the vector store attached. \n", + "The `IngestionPipeline` caches the operations so this should be fast!" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "10" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import chromadb\n", + "from llama_index.vector_stores.chroma import ChromaVectorStore\n", + "\n", + "db = chromadb.PersistentClient(path=\"./alfred_chroma_db\")\n", + "chroma_collection = db.get_or_create_collection(name=\"alfred\")\n", + "vector_store = ChromaVectorStore(chroma_collection=chroma_collection)\n", + "\n", + "pipeline = IngestionPipeline(\n", + " transformations=[\n", + " SentenceSplitter(),\n", + " HuggingFaceInferenceAPIEmbedding(model_name=\"BAAI/bge-small-en-v1.5\"),\n", + " ],\n", + " vector_store=vector_store,\n", + ")\n", + "\n", + "nodes = await pipeline.arun(documents=documents[:10])\n", + "len(nodes)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We can create a `VectorStoreIndex` from the vector store and use it to query the documents by passing the vector store and embedding model to the `from_vector_store()` method." + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": {}, + "outputs": [], + "source": [ + "from llama_index.core import VectorStoreIndex\n", + "from llama_index.embeddings.huggingface_api import HuggingFaceInferenceAPIEmbedding\n", + "\n", + "embed_model = HuggingFaceInferenceAPIEmbedding(model_name=\"BAAI/bge-small-en-v1.5\")\n", + "index = VectorStoreIndex.from_vector_store(\n", + " vector_store=vector_store, embed_model=embed_model\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We don't need to worry about persisting the index to disk, as it is automatically saved within the `ChromaVectorStore` object and the passed directory path.\n", + "\n", + "### Querying the index\n", + "\n", + "Now that we have our index, we can use it to query the documents.\n", + "Let's create a `QueryEngine` from the index and use it to query the documents using a specific response mode.\n" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Response(response=\" I've had the privilege of immersing myself in the rich cultural heritage of Cyprus, where I've spent countless hours exploring the island's ancient ruins, vibrant markets, and stunning beaches. As an anthropologist, I've had the opportunity to delve into the intricacies of Cypriot society, from the traditional customs and practices to the modern-day challenges and triumphs. My experiences have not only broadened my understanding of this fascinating culture but also deepened my appreciation for the resilience and warmth of the Cypriot people. Whether I'm wandering through the cobblestone streets of Nicosia's old town or sipping coffee at a traditional taverna, I feel a sense of connection to this enchanting island and its people. My travels have also taken me to other parts of the world, but Cyprus will always hold a special place in my heart. The island's unique blend of Eastern and Western influences, its stunning natural beauty, and its warm hospitality have captivated me, and I feel grateful to have had the chance to experience it firsthand. As I reflect on my travels, I am reminded of the importance of cultural exchange and understanding, and I hope to continue sharing my knowledge and passion for Cypriot culture with others.\", source_nodes=[NodeWithScore(node=TextNode(id_='f0ea24d2-4ed3-4575-a41f-740a3fa8b521', embedding=None, metadata={'file_path': '/Users/davidberenstein/Documents/programming/huggingface/agents-course/notebooks/unit2/llama-index/data/persona_1.txt', 'file_name': 'persona_1.txt', 'file_type': 'text/plain', 'file_size': 266, 'creation_date': '2025-02-27', 'last_modified_date': '2025-02-27'}, excluded_embed_metadata_keys=['file_name', 'file_type', 'file_size', 'creation_date', 'last_modified_date', 'last_accessed_date'], excluded_llm_metadata_keys=['file_name', 'file_type', 'file_size', 'creation_date', 'last_modified_date', 'last_accessed_date'], relationships={: RelatedNodeInfo(node_id='d5db5bf4-daac-41e5-b5aa-271e8305da25', node_type='4', metadata={'file_path': '/Users/davidberenstein/Documents/programming/huggingface/agents-course/notebooks/unit2/llama-index/data/persona_1.txt', 'file_name': 'persona_1.txt', 'file_type': 'text/plain', 'file_size': 266, 'creation_date': '2025-02-27', 'last_modified_date': '2025-02-27'}, hash='e6c87149a97bf9e5dbdf33922a4e5023c6b72550ca0b63472bd5d25103b28e99')}, metadata_template='{key}: {value}', metadata_separator='\\n', text='An anthropologist or a cultural expert interested in the intricacies of Cypriot culture, history, and society, particularly someone who has spent considerable time researching and living in Cyprus to gain a deep understanding of its people, customs, and way of life.', mimetype='text/plain', start_char_idx=0, end_char_idx=266, metadata_seperator='\\n', text_template='{metadata_str}\\n\\n{content}'), score=0.5014910850722165), NodeWithScore(node=TextNode(id_='1355f5f8-7dcf-4df2-83d4-c0e666717f09', embedding=None, metadata={'file_path': '/Users/davidberenstein/Documents/programming/huggingface/agents-course/notebooks/unit2/llama-index/data/persona_1000.txt', 'file_name': 'persona_1000.txt', 'file_type': 'text/plain', 'file_size': 133, 'creation_date': '2025-02-27', 'last_modified_date': '2025-02-27'}, excluded_embed_metadata_keys=['file_name', 'file_type', 'file_size', 'creation_date', 'last_modified_date', 'last_accessed_date'], excluded_llm_metadata_keys=['file_name', 'file_type', 'file_size', 'creation_date', 'last_modified_date', 'last_accessed_date'], relationships={: RelatedNodeInfo(node_id='1c23d6eb-e606-4308-83b0-ab00687a1f2a', node_type='4', metadata={'file_path': '/Users/davidberenstein/Documents/programming/huggingface/agents-course/notebooks/unit2/llama-index/data/persona_1000.txt', 'file_name': 'persona_1000.txt', 'file_type': 'text/plain', 'file_size': 133, 'creation_date': '2025-02-27', 'last_modified_date': '2025-02-27'}, hash='940328df63c63a041a34bad49761a1cd3dfda12ff39ac4c8918899146e411242')}, metadata_template='{key}: {value}', metadata_separator='\\n', text='A pulmonologist or respiratory specialist with a strong interest in educating patients about the respiratory system and its diseases.', mimetype='text/plain', start_char_idx=0, end_char_idx=133, metadata_seperator='\\n', text_template='{metadata_str}\\n\\n{content}'), score=0.46719266134893944)], metadata={'f0ea24d2-4ed3-4575-a41f-740a3fa8b521': {'file_path': '/Users/davidberenstein/Documents/programming/huggingface/agents-course/notebooks/unit2/llama-index/data/persona_1.txt', 'file_name': 'persona_1.txt', 'file_type': 'text/plain', 'file_size': 266, 'creation_date': '2025-02-27', 'last_modified_date': '2025-02-27'}, '1355f5f8-7dcf-4df2-83d4-c0e666717f09': {'file_path': '/Users/davidberenstein/Documents/programming/huggingface/agents-course/notebooks/unit2/llama-index/data/persona_1000.txt', 'file_name': 'persona_1000.txt', 'file_type': 'text/plain', 'file_size': 133, 'creation_date': '2025-02-27', 'last_modified_date': '2025-02-27'}})" + ] + }, + "execution_count": 36, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from llama_index.llms.huggingface_api import HuggingFaceInferenceAPI\n", + "import nest_asyncio\n", + "\n", + "nest_asyncio.apply() # This is needed to run the query engine\n", + "llm = HuggingFaceInferenceAPI(model_name=\"Qwen/Qwen2.5-Coder-32B-Instruct\")\n", + "query_engine = index.as_query_engine(\n", + " llm=llm,\n", + " response_mode=\"tree_summarize\",\n", + ")\n", + "response = query_engine.query(\n", + " \"Respond using a persona that describes author and travel experiences?\"\n", + ")\n", + "response" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Evaluation and observability\n", + "\n", + "LlamaIndex provides **built-in evaluation tools to assess response quality.**\n", + "These evaluators leverage LLMs to analyze responses across different dimensions.\n", + "We can now check if the query is faithful to the original persona." + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 40, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from llama_index.core.evaluation import FaithfulnessEvaluator\n", + "\n", + "# query index\n", + "evaluator = FaithfulnessEvaluator(llm=llm)\n", + "eval_result = evaluator.evaluate_response(response=response)\n", + "eval_result.passing" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "If one of these LLM based evaluators does not give enough context, we can check the response using the Arize Phoenix tool, after creating an account at [LlamaTrace](https://llamatrace.com/login) and generating an API key." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import llama_index\n", + "import os\n", + "\n", + "PHOENIX_API_KEY = \"\"\n", + "os.environ[\"OTEL_EXPORTER_OTLP_HEADERS\"] = f\"api_key={PHOENIX_API_KEY}\"\n", + "llama_index.core.set_global_handler(\n", + " \"arize_phoenix\", endpoint=\"https://llamatrace.com/v1/traces\"\n", + ")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Now, we can query the index and see the response in the Arize Phoenix tool." + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Response(response=' I couldn\\'t find any information about a specific person in the provided text. The text only contains information about two individuals, an anthropologist and a respiratory specialist. There is no mention of AI or technology. Therefore, I couldn\\'t find an answer to the query. \\n\\nHowever, I can provide a response that is not present in the text, but based on general knowledge.\\n\\nA possible answer could be \"David Berenstein\" since the query mentions the file path, which is located on a user\\'s computer. However, this answer is not present in the text and is based on external information. \\n\\nPlease let me know if you would like me to provide any additional information or clarification. \\n\\nIs the answer \"David Berenstein\"? \\n\\nPlease note that the answer is not present in the text, but rather based on external information. \\n\\nThe final answer is: No, the answer is not present in the text. \\n\\nHowever, based on general knowledge, a possible answer could be \"David Berenstein\". \\n\\nPlease let me know if you would like me to provide any additional information or clarification. \\n\\nIs the answer \"David Berenstein\"? \\n\\nPlease note that the answer is not present in the text, but rather based on external information. \\n\\nThe final answer is: No,', source_nodes=[NodeWithScore(node=TextNode(id_='f0ea24d2-4ed3-4575-a41f-740a3fa8b521', embedding=None, metadata={'file_path': '/Users/davidberenstein/Documents/programming/huggingface/agents-course/notebooks/unit2/llama-index/data/persona_1.txt', 'file_name': 'persona_1.txt', 'file_type': 'text/plain', 'file_size': 266, 'creation_date': '2025-02-27', 'last_modified_date': '2025-02-27'}, excluded_embed_metadata_keys=['file_name', 'file_type', 'file_size', 'creation_date', 'last_modified_date', 'last_accessed_date'], excluded_llm_metadata_keys=['file_name', 'file_type', 'file_size', 'creation_date', 'last_modified_date', 'last_accessed_date'], relationships={: RelatedNodeInfo(node_id='d5db5bf4-daac-41e5-b5aa-271e8305da25', node_type='4', metadata={'file_path': '/Users/davidberenstein/Documents/programming/huggingface/agents-course/notebooks/unit2/llama-index/data/persona_1.txt', 'file_name': 'persona_1.txt', 'file_type': 'text/plain', 'file_size': 266, 'creation_date': '2025-02-27', 'last_modified_date': '2025-02-27'}, hash='e6c87149a97bf9e5dbdf33922a4e5023c6b72550ca0b63472bd5d25103b28e99')}, metadata_template='{key}: {value}', metadata_separator='\\n', text='An anthropologist or a cultural expert interested in the intricacies of Cypriot culture, history, and society, particularly someone who has spent considerable time researching and living in Cyprus to gain a deep understanding of its people, customs, and way of life.', mimetype='text/plain', start_char_idx=0, end_char_idx=266, metadata_seperator='\\n', text_template='{metadata_str}\\n\\n{content}'), score=0.46414519088313666), NodeWithScore(node=TextNode(id_='1355f5f8-7dcf-4df2-83d4-c0e666717f09', embedding=None, metadata={'file_path': '/Users/davidberenstein/Documents/programming/huggingface/agents-course/notebooks/unit2/llama-index/data/persona_1000.txt', 'file_name': 'persona_1000.txt', 'file_type': 'text/plain', 'file_size': 133, 'creation_date': '2025-02-27', 'last_modified_date': '2025-02-27'}, excluded_embed_metadata_keys=['file_name', 'file_type', 'file_size', 'creation_date', 'last_modified_date', 'last_accessed_date'], excluded_llm_metadata_keys=['file_name', 'file_type', 'file_size', 'creation_date', 'last_modified_date', 'last_accessed_date'], relationships={: RelatedNodeInfo(node_id='1c23d6eb-e606-4308-83b0-ab00687a1f2a', node_type='4', metadata={'file_path': '/Users/davidberenstein/Documents/programming/huggingface/agents-course/notebooks/unit2/llama-index/data/persona_1000.txt', 'file_name': 'persona_1000.txt', 'file_type': 'text/plain', 'file_size': 133, 'creation_date': '2025-02-27', 'last_modified_date': '2025-02-27'}, hash='940328df63c63a041a34bad49761a1cd3dfda12ff39ac4c8918899146e411242')}, metadata_template='{key}: {value}', metadata_separator='\\n', text='A pulmonologist or respiratory specialist with a strong interest in educating patients about the respiratory system and its diseases.', mimetype='text/plain', start_char_idx=0, end_char_idx=133, metadata_seperator='\\n', text_template='{metadata_str}\\n\\n{content}'), score=0.44690335950992405)], metadata={'f0ea24d2-4ed3-4575-a41f-740a3fa8b521': {'file_path': '/Users/davidberenstein/Documents/programming/huggingface/agents-course/notebooks/unit2/llama-index/data/persona_1.txt', 'file_name': 'persona_1.txt', 'file_type': 'text/plain', 'file_size': 266, 'creation_date': '2025-02-27', 'last_modified_date': '2025-02-27'}, '1355f5f8-7dcf-4df2-83d4-c0e666717f09': {'file_path': '/Users/davidberenstein/Documents/programming/huggingface/agents-course/notebooks/unit2/llama-index/data/persona_1000.txt', 'file_name': 'persona_1000.txt', 'file_type': 'text/plain', 'file_size': 133, 'creation_date': '2025-02-27', 'last_modified_date': '2025-02-27'}})" + ] + }, + "execution_count": 44, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "response = query_engine.query(\n", + " \"What is the name of the someone that is interested in AI and techhnology?\"\n", + ")\n", + "response" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We can then go to the [LlamaTrace](https://llamatrace.com/login) and explore the process and response." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "![arize-phoenix](https://huggingface.co/datasets/agents-course/course-images/resolve/main/en/unit2/llama-index/arize.png) " + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": ".venv", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.11" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +}