DuckDB¶
DuckDB is a fast in-process analytical database. DuckDB is under an MIT license.
In this notebook we are going to show how to use DuckDB as a Vector store to be used in LlamaIndex.
Install DuckDB with:
pip install duckdb
Make sure to use the latest DuckDB version (>= 0.10.0).
You can run DuckDB in different modes depending on persistence:
in-memory
is the default mode, where the database is created in memory, you can force this to be use by settingdatabase_name = ":memory:"
when initializing the vector store.persistence
is set by using a name for a database and setting a persistence directorydatabase_name = "my_vector_store.duckdb"
where the database is persisted in the defaultpersist_dir
or to the one you set it to.
With the vector store created, you can:
.add
.get
.update
.upsert
.delete
.peek
.query
to run a search.
Basic example¶
In this basic example, we take the Paul Graham essay, split it into chunks, embed it using an open-source embedding model, load it into DuckDBVectorStore
, and then query it.
For the embedding model we will use OpenAI.
If you're opening this Notebook on colab, you will probably need to install LlamaIndex 🦙.
!pip install llama-index
Creating a DuckDB Index¶
!pip install duckdb
!pip install llama-index-vector-stores-duckdb
from llama_index.core import VectorStoreIndex, SimpleDirectoryReader
from llama_index.vector_stores.duckdb import DuckDBVectorStore
from llama_index.core import StorageContext
from IPython.display import Markdown, display
# Setup OpenAI API
import os
import openai
openai.api_key = os.environ["OPENAI_API_KEY"]
Download and prepare the sample dataset
!mkdir -p 'data/paul_graham/'
!wget 'https://raw.githubusercontent.com/run-llama/llama_index/main/docs/docs/examples/data/paul_graham/paul_graham_essay.txt' -O 'data/paul_graham/paul_graham_essay.txt'
--2024-02-16 19:38:34-- https://raw.githubusercontent.com/run-llama/llama_index/main/docs/docs/examples/data/paul_graham/paul_graham_essay.txt Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.110.133, 185.199.111.133, 185.199.108.133, ... Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.110.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 75042 (73K) [text/plain] Saving to: ‘data/paul_graham/paul_graham_essay.txt’ data/paul_graham/pa 100%[===================>] 73.28K --.-KB/s in 0.06s 2024-02-16 19:38:34 (1.24 MB/s) - ‘data/paul_graham/paul_graham_essay.txt’ saved [75042/75042]
documents = SimpleDirectoryReader("data/paul_graham/").load_data()
vector_store = DuckDBVectorStore()
storage_context = StorageContext.from_defaults(vector_store=vector_store)
index = VectorStoreIndex.from_documents(
documents, storage_context=storage_context
)
query_engine = index.as_query_engine()
response = query_engine.query("What did the author do growing up?")
display(Markdown(f"<b>{response}</b>"))
The author mentions that before college, they worked on two main things outside of school: writing and programming. They wrote short stories and also tried writing programs on an IBM 1401 computer. They later got a microcomputer and started programming more extensively.
Persisting to disk example¶
Extending the previous example, if you want to save to disk, simply initialize the DuckDBVectorStore by specifying a database name and persist directory.
# Save to disk
documents = SimpleDirectoryReader("data/paul_graham/").load_data()
vector_store = DuckDBVectorStore("pg.duckdb", persist_dir="./persist/")
storage_context = StorageContext.from_defaults(vector_store=vector_store)
index = VectorStoreIndex.from_documents(
documents, storage_context=storage_context
)
# Load from disk
vector_store = DuckDBVectorStore.from_local("./persist/pg.duckdb")
index = VectorStoreIndex.from_vector_store(vector_store)
# Query Data
query_engine = index.as_query_engine()
response = query_engine.query("What did the author do growing up?")
display(Markdown(f"<b>{response}</b>"))
The author mentions that before college, they worked on two main things outside of school: writing and programming. They wrote short stories and also tried writing programs on an IBM 1401 computer. They later got a microcomputer and started programming more extensively.
Metadata filter example¶
It is possible to narrow down the search space by filter with metadata. Below is an example to show that in practice.
from llama_index.core.schema import TextNode
nodes = [
TextNode(
**{
"text": "The Shawshank Redemption",
"metadata": {
"author": "Stephen King",
"theme": "Friendship",
"year": 1994,
"ref_doc_id": "doc_1",
},
}
),
TextNode(
**{
"text": "The Godfather",
"metadata": {
"director": "Francis Ford Coppola",
"theme": "Mafia",
"year": 1972,
"ref_doc_id": "doc_1",
},
}
),
TextNode(
**{
"text": "Inception",
"metadata": {
"director": "Christopher Nolan",
"theme": "Sci-fi",
"year": 2010,
"ref_doc_id": "doc_2",
},
}
),
]
vector_store = DuckDBVectorStore()
storage_context = StorageContext.from_defaults(vector_store=vector_store)
index = VectorStoreIndex(nodes, storage_context=storage_context)
Define the metadata filters.
from llama_index.core.vector_stores import ExactMatchFilter, MetadataFilters
filters = MetadataFilters(
filters=[ExactMatchFilter(key="theme", value="Mafia")]
)
Use the index as a retriever to use the metadatafilter option.
retriever = index.as_retriever(filters=filters)
retriever.retrieve("What is inception about?")
[NodeWithScore(node=TextNode(id_='736a1279-4ebd-496e-87b5-925197646477', embedding=[-0.006784645840525627, -0.021635770797729492, -0.015731574967503548, -0.03265434503555298, -0.005616107489913702, 0.025351788848638535, -0.0057811918668448925, 0.0027044713497161865, -0.01623653806746006, -0.023759208619594574, 0.027164479717612267, 0.017932699993252754, 0.029028963297605515, 0.003991158679127693, -0.0009047273779287934, 0.010973258875310421, 0.027164479717612267, -0.012844215147197247, 0.006972389295697212, -0.011148054152727127, 0.003528274828568101, 0.007736308965831995, -0.031022923067212105, -0.013996569439768791, 0.0012567456578835845, 0.004988139029592276, 0.010571876540780067, -0.024290068075060844, 0.019123896956443787, -0.02119554579257965, 0.014022464863955975, -0.023098871111869812, -0.009050510823726654, 0.001241370104253292, 0.006881754379719496, -0.007186027709394693, -0.0036577528808265924, -0.012734158895909786, 0.0034473512787371874, 0.003987921867519617, 0.01084378082305193, 0.003936130553483963, -0.01015754695981741, -0.011970238760113716, 0.004363407846540213, 0.0013425247743725777, 0.03288740664720535, -0.009186462499201298, -0.009549001231789589, 0.01988781802356243, 0.00900519359856844, 0.03363838046789169, -0.012539941817522049, -0.031955163925886154, 0.02144155278801918, 0.013096697628498077, -0.0035088532604277134, -0.009050510823726654, 0.002782158087939024, -0.014760489575564861, 0.0010722394799813628, 0.003816363401710987, -0.028821798041462898, 0.011102736927568913, -0.011335796676576138, -0.012798897922039032, -0.001216283766552806, 0.018787255510687828, 3.707318683154881e-05, 0.00591390673071146, 0.03358658775687218, 0.027371644973754883, -0.017414787784218788, 0.012973693199455738, 0.007419087924063206, -0.010791989043354988, -0.024303017184138298, 0.001213856041431427, 0.004201560281217098, -0.0054024686105549335, 0.023085923865437508, -0.02022445946931839, -0.0027643549256026745, 0.022334951907396317, 0.007198975421488285, 0.02203715220093727, -0.013841195963323116, 0.02256801165640354, 0.0038454958703368902, 0.0022626277059316635, -0.018424715846776962, 0.006308814510703087, 0.017220571637153625, 0.00503345625475049, -0.0069464934058487415, 0.029313813894987106, -0.007665096316486597, 0.004486411809921265, 0.029158441349864006, -0.013193805702030659, 0.0007109150174073875, 0.0006736901123076677, 0.00758093548938632, -0.011445852927863598, -0.021739352494478226, -0.008085899986326694, 0.028614632785320282, -0.009128197096288204, 0.008506703190505505, -0.006392975337803364, -0.020366886630654335, 0.021091962233185768, 0.030582698062062263, -0.046482592821121216, 0.016819190233945847, -0.016806241124868393, 0.014799333177506924, -0.011957291513681412, 0.01698751002550125, -0.026102760806679726, -0.010623668320477009, 0.04780326783657074, 0.019020315259695053, -0.0176090057939291, 0.02243853360414505, -0.0009945527417585254, 0.007542092353105545, 0.0009281952516175807, -0.011776021681725979, -0.008830398321151733, 0.05432895943522453, 0.01621064357459545, 0.00039571707020513713, 0.00791757833212614, -0.013044905848801136, 0.03190337494015694, -0.01125163584947586, 0.028847694396972656, -0.0282003041356802, -0.02044457197189331, 0.02770828641951084, 0.0271126888692379, -0.018994418904185295, 0.011983186937868595, -0.009613740257918835, 0.00953605305403471, 0.013491605408489704, -0.00014161653234623373, 0.026154551655054092, -0.021700508892536163, 0.022697489708662033, -0.027967242524027824, -0.001959972782060504, 0.02586969919502735, 0.03231770172715187, 0.019085053354501724, 0.001658936613239348, -0.006674589589238167, -0.014436794444918633, 0.005684083327651024, 0.023163611069321632, 0.0244583897292614, 0.0008909703465178609, -0.007250766735523939, 0.0011402154341340065, 0.022891705855727196, 0.029650457203388214, 0.006758750416338444, 0.00384873291477561, 0.004492885898798704, -0.0012939705047756433, 0.02680194191634655, -0.00532154506072402, 0.023396670818328857, -0.015653887763619423, 0.02957276999950409, 0.023293089121580124, 0.01736299693584442, -0.038196004927158356, -0.007444983813911676, -0.005366862285882235, 0.02031509391963482, 0.03356069326400757, 0.051221489906311035, -0.007716887630522251, -0.0014954706421121955, -0.006380027160048485, 0.005790902767330408, 0.01244930736720562, -0.0006445575854741037, 0.0018499166471883655, 0.021959464997053146, 0.01829523779451847, -0.013815300539135933, -0.6500830054283142, -0.008221851661801338, -0.01732415333390236, -0.012915428727865219, 0.0010447254171594977, 0.030997028574347496, 0.014216681942343712, 0.022697489708662033, -0.0171428844332695, -0.004389303270727396, -0.011387588456273079, 0.0074126143008470535, 0.0467415489256382, -0.003353479551151395, -0.05448433384299278, -0.03526980057358742, -0.013491605408489704, -0.021234387531876564, -0.023241296410560608, 0.0033761383965611458, -0.020392781123518944, 0.008267168886959553, -0.026465298607945442, -0.012022030539810658, 0.002188177779316902, -0.004007343202829361, 0.02667246386408806, -0.017311206087470055, 0.007192501798272133, 0.0038325481582432985, -0.005917143542319536, 0.013161436654627323, 0.013802352361381054, 0.006166388746351004, 0.04088914394378662, -0.007561514154076576, -0.021855883300304413, 0.028821798041462898, 0.0032385678496211767, 0.025170518085360527, -0.005162934307008982, -0.008636181242763996, 0.014915863052010536, -0.018994418904185295, -0.01266941986978054, -0.013400970958173275, 0.04000869393348694, -0.022270211949944496, 0.017816169187426567, 0.00038539929664693773, 0.00421450799331069, 0.016120009124279022, -0.0027659733314067125, 0.01747952774167061, 0.0074838269501924515, 0.004819817841053009, 0.032990988343954086, -0.003131748642772436, -0.0012308500008657575, 0.00835132971405983, 0.003641568124294281, -0.0026170737110078335, 0.0176090057939291, -0.0012494624825194478, 0.02072942443192005, -0.005936565343290567, -0.00503993034362793, 0.004994613118469715, 0.0225939080119133, -0.008435490541160107, -0.0035897770430892706, 0.016663815826177597, -0.019706549122929573, -0.02923612669110298, 0.025442423298954964, -0.0031560256611555815, 0.01698751002550125, 0.015822209417819977, 0.005907432641834021, 0.008655603043735027, -0.010565402917563915, 0.0022885233629494905, -0.029365604743361473, -0.01378940511494875, 0.009464840404689312, -0.00693354569375515, -0.05427716672420502, 0.016158850863575935, 0.00040603484376333654, 0.0036577528808265924, 0.03371606394648552, -0.009775587357580662, -0.004162717144936323, 0.026141604408621788, 0.010397081263363361, 0.010902046225965023, -0.007477353326976299, -0.007833417505025864, 0.017583109438419342, -0.023616783320903778, -0.011659491807222366, 0.0013117737835273147, -0.012041452340781689, 0.0014760489575564861, 0.02421238273382187, 0.002783776493743062, -0.0025571901351213455, 0.027319854125380516, 0.050030291080474854, -0.01894262805581093, 0.030453220009803772, 0.005295649170875549, -0.0030265478417277336, -0.013621083460748196, 0.00869444664567709, -0.02533883973956108, 0.02817440778017044, -0.004347223322838545, 0.0054024686105549335, -0.000619875849224627, -0.013116119429469109, -0.009322414174675941, -0.008759185671806335, -0.010306446813046932, 0.016430756077170372, 0.00438606645911932, -0.023474358022212982, -0.02312476746737957, -0.010332342237234116, 0.017893856391310692, 0.01829523779451847, -0.0025312944781035185, 0.01422963012009859, -0.0009710848098620772, 0.0136340307071805, -0.0002207194920629263, -0.002903543645516038, -0.0052438583225011826, 0.026348767802119255, -0.03016836941242218, 0.014074256643652916, -0.008778606541454792, 0.00034372357185930014, -0.0017592820804566145, 0.01346570998430252, -0.031307775527238846, -0.010125177912414074, -0.026063917204737663, -0.01676739752292633, -0.00585887860506773, -0.005726163741201162, 0.007762204855680466, -0.0018774307100102305, 0.013582239858806133, 0.011413483880460262, -0.02387573942542076, -0.01614590361714363, -0.005700267851352692, -0.02489861473441124, -0.017596056684851646, 0.016689712181687355, 0.0020263304468244314, -0.01804923079907894, -0.0006117834709584713, 0.006214942783117294, -0.0022011257242411375, 0.007710413541644812, 0.020548155531287193, 0.01118689775466919, -0.02682783640921116, 0.022088943049311638, 0.01149764470756054, 0.01259173359721899, 0.012429885566234589, -0.005528709851205349, 0.022231368348002434, 0.009432470425963402, -0.004965480417013168, -0.012132086791098118, -0.008286590687930584, 0.011737179011106491, -0.011653018184006214, 0.01716878078877926, -0.00195188052020967, 0.039413098245859146, -0.015213662758469582, 0.036978911608457565, 0.015071236528456211, -0.022075995802879333, 0.020638789981603622, -0.013070802204310894, 0.0008796410402283072, -0.005153223406523466, -0.019214531406760216, 0.0141001520678401, 0.027993138879537582, -0.00811826903373003, 0.01869661919772625, 0.0059883566573262215, 0.0386362299323082, 0.0336642749607563, -0.014656906947493553, 0.02662067301571369, -0.012235668487846851, -0.004415199160575867, -0.020496364682912827, 0.015874000266194344, -0.010973258875310421, 0.013659927062690258, 0.0005409751902334392, 0.004628837574273348, -0.02328014001250267, -0.008344856090843678, -0.007762204855680466, 0.02651708945631981, 0.02629697695374489, -0.020366886630654335, -0.0016095731407403946, -0.01922748051583767, -0.024290068075060844, 0.006758750416338444, 0.022956445813179016, -0.0028274753130972385, -0.006998284719884396, -0.0035703552421182394, -0.006745802704244852, 0.0014995168894529343, 0.020574050024151802, 0.010332342237234116, -0.027760079130530357, -0.013193805702030659, 0.03902466222643852, -0.0058685895055532455, 0.010779041796922684, -0.008849820122122765, -0.007166605908423662, -0.009380679577589035, -0.017816169187426567, 0.01794564723968506, -0.009348309598863125, 0.015563253313302994, 0.03205874562263489, 0.029831726104021072, -0.01820460334420204, 0.013180858455598354, -0.01966770552098751, 0.0123910428956151, -0.00822832528501749, -0.020340990275144577, 0.020431624725461006, -0.00789815653115511, 0.006218180060386658, -0.011426431126892567, -0.00622465368360281, 0.034389350563287735, -0.017181728035211563, 0.0029682826716452837, 0.007218397222459316, 0.013375075533986092, 0.03306867554783821, 0.011788969859480858, 0.006156677845865488, 0.0050561148673295975, 0.02449723333120346, 0.009031089022755623, 0.0038875762838870287, 4.352179530542344e-05, -0.0010155929485335946, -0.01439795084297657, -0.024600815027952194, -0.009853274561464787, -0.0021541898604482412, 0.014643959701061249, -0.015576200559735298, 0.015407879836857319, 0.009069932624697685, 0.004318090621381998, 0.007665096316486597, 0.010371185839176178, -0.0017317679012194276, -0.030997028574347496, -0.0030653912108391523, 0.03594308719038963, -0.009173514321446419, 0.00014424655819311738, -0.008603811264038086, 0.013970674015581608, -0.006804067641496658, 0.007438509725034237, -0.005014034919440746, -0.014825228601694107, 0.010455346666276455, 0.00681701535359025, 0.005476918537169695, -0.0021104910410940647, -0.012222721241414547, 0.01916274055838585, -0.021493343636393547, -0.002458463190123439, -0.027682391926646233, -0.0064447661861777306, -0.001683213748037815, -0.006836437154561281, -0.02053520642220974, 0.029987100511789322, 0.006606613751500845, 0.00537657318636775, -0.010164021514356136, 0.0072378190234303474, 0.01517481915652752, 0.01248167734593153, 0.009639635682106018, -0.020625842735171318, -0.022399690002202988, 0.0026850495487451553, -0.016845084726810455, -0.015757469460368156, -0.005415416322648525, 0.0188519936054945, -0.004806870128959417, 0.003722491906955838, -0.026374664157629013, -0.0345965139567852, -0.0015901514561846852, 0.0869574099779129, 0.010526559315621853, 0.030815759673714638, 0.026154551655054092, 0.01125163584947586, -0.010338816791772842, -0.03205874562263489, -0.022930549457669258, 0.003819600446149707, -0.024769136682152748, -0.016573181375861168, -0.03172210603952408, 0.011277532204985619, 0.01508418470621109, 0.03842906281352043, -0.012876585125923157, -0.010688407346606255, -0.00038357850280590355, -7.556253694929183e-05, -0.013892986811697483, -0.009322414174675941, 0.008085899986326694, 0.017116988077759743, 0.00822832528501749, -0.016430756077170372, -0.04959006607532501, 0.017065197229385376, -0.0019356957636773586, 0.003796941600739956, -0.02256801165640354, -0.0033372947946190834, -0.0015772036276757717, -0.008409595116972923, 0.005661424715071917, -0.0016476073069497943, -0.0026737202424556017, 0.03918003663420677, 0.013944778591394424, 0.017596056684851646, -0.006609850563108921, 0.009782060980796814, -0.022775176912546158, -0.015110080130398273, -0.014022464863955975, 0.028977170586586, -0.014190786518156528, -0.028718216344714165, 0.011050945147871971, 0.018877889961004257, -0.02022445946931839, 0.029650457203388214, 0.015187766402959824, -0.0006619561463594437, 0.0015861052088439465, 0.019486436620354652, 0.011232214979827404, 0.0028938327450305223, 0.015420827083289623, -0.0027934873942285776, 0.019395800307393074, -0.02028919942677021, -0.037626300007104874, 0.007509722840040922, -0.010170495137572289, 0.009128197096288204, -0.01586105301976204, -0.01935695856809616, -0.008603811264038086, -0.007406140211969614, -0.01595168747007847, 0.002808053744956851, -0.008105321787297726, -0.013362127356231213, 0.0021460975985974073, 0.018217552453279495, -0.0031819213181734085, 0.006745802704244852, 0.0015755851054564118, 0.030893445014953613, 0.009594318456947803, -0.02219252474606037, -0.030271951109170914, -0.002346788300201297, -0.0392577238380909, -0.0025976519100368023, 0.007988790981471539, -0.019085053354501724, -0.014359108172357082, -0.02000434696674347, -0.0018580090254545212, 0.006231127772480249, -0.007211923599243164, 0.022671593353152275, -0.015809260308742523, -0.00040987873217090964, -0.0020554629154503345, 0.005285938270390034, 0.0022561538498848677, -0.0026138366665691137, -0.00391023512929678, 0.02091069333255291, -0.02471734583377838, -0.017932699993252754, 0.008344856090843678, -0.004473464097827673, -0.0037645723205059767, -0.0007355967536568642, 0.00716013228520751, -0.0007975033950060606, -0.005629055202007294, 0.01747952774167061, -0.031307775527238846, 0.002071647671982646, -0.02359088696539402, 0.0002816146006807685, 0.01960296556353569, 0.005635528825223446, 0.0005057733505964279, 0.0063703167252242565, -0.022231368348002434, -0.0036253833677619696, -0.011814865283668041, 0.012235668487846851, 0.03938720002770424, -0.01235867291688919, -0.011542961932718754, 0.021493343636393547, -0.011860182508826256, 0.02175229974091053, -0.0019955793395638466, -0.039931006729602814, 0.009717321954667568, 0.011834287084639072, -0.008545546792447567, -0.004878082778304815, -0.019344009459018707, 0.007444983813911676, -0.000181370327482, -0.02299528941512108, -0.0012025267351418734, -0.025546004995703697, -0.008454912342131138, -0.0036448051687330008, -0.0171428844332695, 0.00028485155780799687, -0.02296939305961132, -0.004657970275729895, -0.009930960834026337, -0.012416938319802284, 0.015744522213935852, -0.021234387531876564, -0.021791143342852592, -0.0044799381867051125, 0.0029731381218880415, 0.003018455347046256, -0.03249897435307503, -0.038506750017404556, -0.013239122927188873, 0.004169190768152475, 0.01567978225648403, 0.03418218716979027, -0.0008974442607723176, 0.011012102477252483, 0.00018056108092423528, -0.005820035003125668, 0.026089811697602272, 0.000589934061281383, 0.01794564723968506, -0.0021428605541586876, 0.04360818490386009, 0.037445031106472015, 0.0029731381218880415, 0.018722515553236008, 0.0025005433708429337, 0.022166630253195763, 0.01645665057003498, 0.009458365850150585, 0.019408749416470528, 0.014967653900384903, -0.018101021647453308, -0.008940454572439194, 0.03154083713889122, -0.025066936388611794, -0.01645665057003498, -0.011737179011106491, -0.017842065542936325, 0.0005810324219055474, -0.029987100511789322, -0.02724216692149639, 0.012837741523981094, 0.02693141996860504, -0.01745363138616085, -0.00455762492492795, -0.014967653900384903, 0.007315505761653185, -0.03542517498135567, -0.001539978664368391, 0.0010107374982908368, 0.01835997775197029, 0.013148488476872444, 0.013569291681051254, 0.030556803569197655, -0.00402029138058424, -0.029495082795619965, 0.0038454958703368902, 0.0520501472055912, -0.008888662792742252, 0.009840326383709908, 0.01463101152330637, -0.013737613335251808, 0.00866207666695118, -0.02923612669110298, -0.012352199293673038, -0.04513602331280708, 0.014954706653952599, 0.003521800972521305, 0.0026219291612505913, 0.0035897770430892706, 0.004907215479761362, -0.023047080263495445, 0.03962026163935661, -0.012125612236559391, 0.03586539998650551, 0.006305577699095011, 0.0193181149661541, 0.015498514287173748, 0.00633470993489027, -0.009943909011781216, 0.030220160260796547, 0.005703505128622055, -0.0017689928645268083, 0.022542115300893784, 0.01257231179624796, 0.011847235262393951, -0.0072442926466465, -0.0020020531956106424, -0.01617179997265339, -0.022826967760920525, -0.01957707107067108, 0.019046209752559662, 0.033172257244586945, 0.016754450276494026, -0.012183877639472485, -0.0023435514885932207, 0.012643524445593357, 0.002867937320843339, -0.0037775200325995684, -0.004780974239110947, -0.003266081912443042, -0.0467415489256382, -0.012598207220435143, -0.019615912809967995, -0.01117394957691431, -0.01683213748037815, -0.006661641877144575, -0.03889518603682518, 0.012403990142047405, -0.011665965430438519, 0.006078991107642651, -0.01736299693584442, -0.026167498901486397, 0.04521371051669121, 0.011659491807222366, -0.009056984446942806, 0.026193395256996155, -0.0013781312154605985, -0.019486436620354652, -0.011471749283373356, -0.003118800697848201, 0.02786366082727909, 0.005379809997975826, -0.0032709373626857996, 0.003230475587770343, 0.009827378205955029, -0.008577915839850903, 0.0021153464913368225, -0.013621083460748196, -0.015420827083289623, -0.010306446813046932, -0.031178297474980354, -0.011957291513681412, 0.011523540131747723, -0.00889513734728098, 0.01355634443461895, -0.008435490541160107, -0.016741503030061722, 0.012242143042385578, -0.0033631904516369104, 0.019551174715161324, -0.026542985811829567, -0.029210232198238373, -0.023176558315753937, 0.011057419702410698, 0.0012502716854214668, -0.017557213082909584, -0.00044184361468069255, 0.0015027538174763322, 0.03754861280322075, -0.015886947512626648, 0.01801038719713688, -0.02168756164610386, 0.005826509092003107, -0.008862767368555069, 0.019085053354501724, -0.001272930414415896, -0.009529579430818558, 0.010558929294347763, -0.018282290548086166, 0.0035444595851004124, 0.013491605408489704, 0.010202865116298199, 0.024354808032512665, 0.013983621262013912, -0.017906803637742996, 0.002309563336893916, 0.02299528941512108, -0.008027634583413601, -0.005648477002978325, 0.0002723083598539233, 0.035917192697525024, -0.01621064357459545, 0.006425344850867987, 0.01779027469456196, -0.008927506394684315, 0.0011426431592553854, 0.004457279574126005, -0.0035120900720357895, 0.01126458402723074, -0.03703070059418678, -0.003347005695104599, -0.01916274055838585, 0.039931006729602814, -0.004376355558633804, 0.011640070006251335, -0.014074256643652916, -0.009652582928538322, -0.007198975421488285, 0.024393651634454727, -0.009743218310177326, -0.02290465496480465, 0.02318950556218624, 0.023383723571896553, -0.0031754474621266127, 0.010008648037910461, -0.0030653912108391523, -0.02496335469186306, 0.0024681738577783108, -0.038662124425172806, -0.035140324383974075, -0.03218822553753853, -0.026905523613095284, 0.04536908492445946, 0.007645674515515566, -0.0019486435921862721, -0.004836002364754677, 0.009665531106293201, -0.03125598281621933, -0.02877000719308853, -9.533827324048616e-06, 0.019279271364212036, 0.02549421414732933, 0.005114380270242691, -0.006399448961019516, 0.00869444664567709, 0.005457496736198664, 0.0132455974817276, -0.019654756411910057, 0.0216616652905941, -0.009031089022755623, -0.01157533098012209, 0.016845084726810455, 0.005237384233623743, -0.0005272181588225067, -0.004233929794281721, -0.007943473756313324, 0.01736299693584442, -0.011089788749814034, 0.02356499247252941, -0.02414764277637005, -0.011394062079489231, -0.027785973623394966, -0.016094112768769264, -0.014721645973622799, 0.002252916805446148, -0.0026219291612505913, -0.02069058082997799, 0.0057811918668448925, -0.008448437787592411, 0.0053992317989468575, -0.023137714713811874, -0.01007986068725586, 0.01876135915517807, -0.008921032771468163, -0.01007986068725586, -0.008921032771468163, -0.012365146540105343, 0.024536076933145523, -0.011743652634322643, 0.010112229734659195, 0.019214531406760216, -0.00967847928404808, 0.0019939609337598085, 0.014592167921364307, -0.0014622919261455536, -0.004460516385734081, 0.008027634583413601, -0.03293919935822487, -0.03604666888713837, -0.025817908346652985, -0.0032822666689753532, 0.012637050822377205, -0.003010363085195422, 0.03964615613222122, -0.015666835010051727, -0.007567987777292728, -0.005496340338140726, -0.0076197790913283825, -0.004959006793797016, -0.007024180144071579, 0.02449723333120346, -0.027164479717612267, -0.001715583261102438, -0.020276252180337906, 0.0036027247551828623, -0.02135091833770275, -0.0026154550723731518, -0.0107531463727355, -0.0038066525012254715, -0.017583109438419342, -0.00842901598662138, -0.012423411943018436, -0.013478657230734825, -0.017647847533226013, -0.03309457004070282, -0.011924921534955502, 0.03902466222643852, 0.20778626203536987, 0.006422107573598623, -0.012080295011401176, 0.016650868579745293, -0.017660796642303467, 0.018088074401021004, 0.022645698860287666, -0.0006623608060181141, -0.012863636948168278, 0.012009082362055779, -0.013193805702030659, 0.00944541860371828, 0.033301737159490585, 0.008396646939218044, 0.009438944980502129, -0.017997438088059425, -0.021700508892536163, -0.02113080583512783, -0.026284029707312584, -0.019188636913895607, -0.004114162642508745, 0.005713215563446283, -0.005680846516042948, -0.002369446912780404, 0.029779935255646706, 0.008545546792447567, -0.0165213905274868, 0.004288957919925451, 0.017751431092619896, 0.025002198293805122, -0.004230692982673645, -0.028070826083421707, 0.0031803029123693705, -0.005535183474421501, -0.031929269433021545, 0.016404859721660614, -0.0244583897292614, -0.00933536235243082, -0.010791989043354988, 0.006043384782969952, -0.004068845417350531, 0.014385003596544266, -0.005175882019102573, -0.00130287220235914, 0.008195956237614155, 0.014255525544285774, -0.021894726902246475, 0.011646544560790062, -0.014605116099119186, 0.010837307199835777, -0.04153653606772423, -0.013944778591394424, 0.029210232198238373, 0.02851105108857155, -0.015524409711360931, -0.021609874442219734, 0.01190549973398447, 0.02421238273382187, -0.004797159228473902, -0.027345748618245125, 0.022516220808029175, 0.02611570805311203, -0.020250355824828148, -0.017647847533226013, -0.003842259058728814, 0.0244583897292614, -0.026452351361513138, -0.02788955718278885, 0.04182138666510582, -0.035632338374853134, 0.021791143342852592, -0.003974974155426025, -0.00591390673071146, 0.013219701126217842, 0.02396637387573719, -0.02359088696539402, -0.02682783640921116, 0.01953822746872902, 0.0043116165325045586, 0.03534748777747154, -0.024937458336353302, 0.010902046225965023, -0.016404859721660614, -0.00794994831085205, -0.00455762492492795, -0.01785501278936863, 0.0032968330197036266, 0.011206318624317646, 0.0022027441300451756, -0.00800821278244257, -0.013905934989452362, -0.028744110837578773, -0.016754450276494026, 0.005917143542319536, 0.010545981116592884, 0.011076840572059155, 0.009141145274043083, 0.012831267900764942, -0.010053965263068676, -0.0020360411144793034, -0.03019426390528679, 0.028381573036313057, 0.028277991339564323, -0.019279271364212036, -0.03029784746468067, -0.01835997775197029, 0.011801918037235737, 0.044980648905038834, 0.002332222182303667, -0.029313813894987106, 0.003440877189859748, -0.012119138613343239, -0.013116119429469109, -0.012675894424319267, 0.021363865584135056, 0.006739328615367413, -0.013621083460748196, -0.037004806101322174, 0.002421238226816058, -0.004285721108317375, -0.008293064311146736, -0.00384873291477561, 0.0015067999484017491, 0.013362127356231213, -0.006483609788119793, 0.0032498971559107304, -0.007969369180500507, -0.0028663186822086573, 0.03262845054268837, -0.02739753946661949, 0.01547261793166399, -0.02480798028409481, 0.004334275145083666, -0.0052632796578109264, -0.0036027247551828623, 0.008480807766318321, 0.017958596348762512, 0.015278401784598827, -0.002523201983422041, -0.018748411908745766, 0.0011329322587698698, -0.01583515666425228, 0.010384134016931057, 0.007937000133097172, -0.009710848331451416, -0.008163586258888245, 0.010584824718534946, -0.005726163741201162, -0.020017296075820923, -0.018813150003552437, -0.013724666088819504, -0.02640056051313877, -0.0022836679127067327, -0.008966349996626377, 0.027268061414361, -0.022451480850577354, -0.010358238592743874, 0.010856728069484234, -0.012488150969147682, -0.012565838173031807, -0.03949078172445297, 0.012436360120773315, 0.013931830413639545, 0.00546073354780674, -0.015148923732340336, -0.010681932792067528, -0.1639709174633026, 0.023293089121580124, 0.015964634716510773, -0.006894702557474375, 0.026879629120230675, -0.02465260773897171, 0.03288740664720535, 0.002220547292381525, -0.022399690002202988, 0.0008723578648641706, -0.012598207220435143, -0.00705007603392005, -0.017414787784218788, -0.014902914874255657, -0.004399014171212912, 0.015019445680081844, -0.042805418372154236, 0.02006908692419529, 0.022399690002202988, -0.0007533999742008746, 0.006153441034257412, -0.016819190233945847, -0.022477377206087112, -0.019188636913895607, 0.002359736245125532, 0.02215368114411831, -0.0029456240590661764, 0.006862333044409752, -0.009561948478221893, -0.002031185897067189, -0.01191844791173935, 0.00922530610114336, -0.002044133609160781, 0.011996135115623474, 0.01623653806746006, 0.0047777374275028706, -0.009918013587594032, 0.0023273667320609093, -0.007283136248588562, -0.004780974239110947, 0.02662067301571369, 0.017777325585484505, 0.018994418904185295, 0.005470444448292255, -0.007147184573113918, 0.02372036501765251, 0.03278382495045662, -0.007406140211969614, 0.023539096117019653, -0.03063448891043663, -0.006409159861505032, -0.024639658629894257, -0.0026397323235869408, -0.006101649720221758, 0.02044457197189331, 0.018593037500977516, -0.001836968818679452, 0.011814865283668041, -0.004415199160575867, 0.0019227479351684451, -0.03659047558903694, -0.007477353326976299, 0.020871849730610847, 0.00444109458476305, -0.015537356957793236, -0.01791975274682045, -0.001009118976071477, 0.0006902794702909887, -0.023383723571896553, 0.006247312296181917, -0.015874000266194344, 0.009199410676956177, 0.0015237939078360796, -0.027811869978904724, 0.000155980495037511, 0.013724666088819504, -0.02306002750992775, -0.004350460134446621, 0.002518346766009927, -0.0019713023211807013, -0.021428605541586876, 0.025377683341503143, 0.014825228601694107, -0.02443249523639679, 0.03835137560963631, 0.027216270565986633, -0.024691451340913773, -0.02137681469321251, -0.010850254446268082, -0.03723786771297455, 0.0017835590988397598, -0.025079883635044098, -0.02028919942677021, -0.0032223830930888653, 0.02436775527894497, 0.0033033068757504225, 0.025753170251846313, -0.007749257143586874, 0.010209338739514351, -0.028407467529177666, -0.013880039565265179, -0.009820904582738876, -0.01264999806880951, 0.001183914253488183, 0.03288740664720535, 0.0349072627723217, 0.01061072014272213, 0.01701340638101101, 0.006331473123282194, 0.007315505761653185, -0.02015972137451172, 0.03599487617611885, 0.025610744953155518, 0.0059883566573262215, -0.005285938270390034, 0.02115670219063759, 0.01966770552098751, -0.04365997388958931, 0.009963330812752247, 0.014708698727190495, 0.0467415489256382, -0.0010212576016783714, 0.014035413041710854, 0.006862333044409752, -0.009037562645971775, 0.0030281662475317717, -0.08436784893274307, 0.001717201666906476, 0.0035088532604277134, 0.011769548058509827, 0.0007809140370227396, 0.027449332177639008, -0.020366886630654335, 0.03690122440457344, -0.01663791947066784, 0.006648694165050983, -0.003926419652998447, -0.04640490561723709, -0.032240018248558044, -0.020056139677762985, 0.02206304669380188, 0.005065825767815113, -0.008377225138247013, -0.009626687504351139, -0.03413039445877075, 0.005175882019102573, -0.0216616652905941, -0.008344856090843678, -0.0001375703577650711, -0.01191844791173935, 0.0022367320489138365, 0.003696596249938011, -0.02015972137451172, 0.006205231882631779, 0.0016508442349731922, 0.014126047492027283, -0.006486846599727869, -0.020677633583545685, 0.023098871111869812, -0.018618933856487274, -0.0019065631786361337, -0.00967847928404808, 0.006438292562961578, -0.005250331945717335, 0.024549024179577827, -0.03260255604982376, -0.003118800697848201, -0.0031527888495475054, 0.0032968330197036266, -0.04946058616042137, 0.0014040268724784255, -0.007011232431977987, -0.014436794444918633, 0.00016700636479072273, 0.03371606394648552, -0.01244930736720562, -0.014164891093969345, -0.008098847232758999, -0.009464840404689312, -0.009503684006631374, 0.013400970958173275, -0.015524409711360931, 0.025442423298954964, -0.030090682208538055, -0.022412637248635292, 0.024924511089920998, 0.021247336640954018, -0.015938738361001015, -0.012585259042680264, 0.021713456138968468, 0.0062699709087610245, -0.01299311500042677, 0.004165953956544399, -0.027268061414361, 0.019654756411910057, -0.0031592627055943012, -0.008901610970497131, 0.0072378190234303474, -0.03374196216464043, -0.005175882019102573, -0.03016836941242218, 0.0022399690933525562, -0.034233976155519485, -0.00769746582955122, 0.02502809278666973, -0.02303413301706314, -0.015692731365561485, -0.008933980949223042, 0.005201777908951044, -0.02788955718278885, 0.021635770797729492, 0.04254646226763725, 0.022024204954504967, 0.014022464863955975, -0.009205884300172329, -0.0282003041356802, -0.0005603968747891486, 0.012293933890759945, -0.0023856316693127155, -0.01149764470756054, 0.0048133437521755695, 0.00857144221663475, 0.0009629924898035824, 0.007341401185840368, 0.005124091170728207, 0.006952967494726181, -0.03001299500465393, 0.004399014171212912, -0.07949947565793991, 0.007334927562624216, -0.023862792178988457, -0.01041002944111824, 0.02119554579257965, 0.007341401185840368, 0.008383698761463165, -0.021648718044161797, 0.006072517018765211, 0.007509722840040922, -0.01148469652980566, 0.02131207473576069, 0.010274077765643597, -1.5641040590708144e-05, -0.011840760707855225, -0.0025895596481859684, 0.02059994637966156, -0.008487281389534473, 0.011950816959142685, 0.025571901351213455, -0.012086769565939903, 0.003906997852027416, -0.006137256044894457, -0.014372055418789387, -0.007982317358255386, -0.020988380536437035, 0.0025102542713284492, 0.018968524411320686, -0.011976713314652443, -0.0035023794043809175, 0.0033696643076837063, -0.02203715220093727, 0.02529999613761902, 0.017971543595194817, 0.004227456171065569, -0.025442423298954964, -0.008577915839850903, -0.01233925111591816, 0.03003889136016369, 0.010028069838881493, -0.02474324218928814, -0.01463101152330637, 0.01561504416167736, -0.022801071405410767, -0.022075995802879333, 0.009244727902114391, -0.021700508892536163, 0.004246877506375313, 0.01636601611971855, 0.008946928195655346, 0.021829986944794655, 0.014915863052010536, -0.021804092451930046, -0.016262434422969818, 0.003347005695104599, -0.02022445946931839, 0.01798449084162712, -0.0009095827699638903, -0.0011062275152653456, -0.006642220076173544, 0.0182304996997118, -0.0008051911718212068, -0.01683213748037815, -0.009134671650826931, -0.005752059165388346, 0.01061072014272213, -0.014566272497177124, 0.022114839404821396, -0.0032223830930888653, -0.01539493165910244, -0.021739352494478226, -0.005347440484911203, 0.0029342947527766228, 0.02084595523774624, 0.0006077372818253934, -0.00716013228520751, 0.022710436955094337, 0.013142014853656292, 0.00942599680274725, 0.005234147422015667, 0.033457107841968536, 0.004172428045421839, -0.02529999613761902, 0.026698358356952667, 0.03508853167295456, 0.03765219449996948, -0.014889967627823353, 0.025908542796969414, -2.9916493076598272e-05, -0.007723361253738403, -0.006590429227799177, 0.01960296556353569, 0.008629707619547844, 0.014877019450068474, -0.011860182508826256, -0.005651713814586401, -0.01621064357459545, -0.019188636913895607, 0.0077427830547094345, 0.02954687550663948, -0.010118704289197922, 0.006965915206819773, -0.002694760449230671, -0.01807512529194355, -0.02509283274412155, 0.028821798041462898, -0.024976301938295364, -0.022632749751210213, -0.015187766402959824, 0.008823923766613007, 0.02724216692149639, 0.010584824718534946, -0.022736333310604095, 0.006842911243438721, -0.03493315726518631, -0.013491605408489704, -0.013388022780418396, -0.03446703776717186, -0.0019486435921862721, -0.0015772036276757717, 0.008901610970497131, 0.023979321122169495, 0.038196004927158356, -0.01248167734593153, 0.007736308965831995, 0.00325313420034945, 0.023396670818328857, -0.018178708851337433, -0.0001203740612254478, -0.015511461533606052, 0.023111818358302116, -0.012222721241414547, -0.01115452777594328, -0.009167040698230267, -0.01385414320975542, -0.0031738290563225746, -0.0038357852026820183, 0.02159692719578743, -0.01966770552098751, 0.03905055671930313, -0.004787448327988386, -0.0009314321796409786, 0.0033599536400288343, -0.026776045560836792, -0.01017696876078844, -0.013841195963323116, 0.0006340374820865691, -0.030686281621456146, -0.021247336640954018, 0.02724216692149639, 0.015744522213935852, 0.027811869978904724, -0.012837741523981094, -0.021713456138968468, 0.0017398602794855833, 0.0021202019415795803, -0.0071536581963300705, 0.010902046225965023, -0.012099716812372208, 0.011219266802072525, 0.015187766402959824, 0.014605116099119186, -0.0069076502695679665, 0.014190786518156528, -0.0002251702971989289, 0.025261154398322105, -0.002346788300201297, -0.01991371251642704, -0.05026335269212723, 0.004470227286219597, -0.019680652767419815, -0.023539096117019653, -0.009807956404983997, 0.020483415573835373, -0.009069932624697685, 0.013737613335251808, 0.0006384882726706564, 0.011465274728834629, 0.0271126888692379, -0.03508853167295456, 0.02817440778017044, -0.028096720576286316, -0.009943909011781216, 0.03091934137046337, 0.005344203673303127, -0.005862115416675806, -0.013362127356231213, -0.02596033550798893], metadata={'director': 'Francis Ford Coppola', 'theme': 'Mafia', 'year': 1972, 'ref_doc_id': 'None', '_node_content': '{"id_": "736a1279-4ebd-496e-87b5-925197646477", "embedding": null, "metadata": {"director": "Francis Ford Coppola", "theme": "Mafia", "year": 1972, "ref_doc_id": "doc_1"}, "excluded_embed_metadata_keys": [], "excluded_llm_metadata_keys": [], "relationships": {}, "text": "", "start_char_idx": null, "end_char_idx": null, "text_template": "{metadata_str}\\n\\n{content}", "metadata_template": "{key}: {value}", "metadata_seperator": "\\n", "class_name": "TextNode"}', '_node_type': 'TextNode', 'document_id': 'None', 'doc_id': 'None'}, excluded_embed_metadata_keys=[], excluded_llm_metadata_keys=[], relationships={}, text='The Godfather', start_char_idx=None, end_char_idx=None, text_template='{metadata_str}\n\n{content}', metadata_template='{key}: {value}', metadata_seperator='\n'), score=0.7543986421543848)]