Find answers from the community

Updated 3 months ago

Hi all ,I just need an assistance to

Hi all ,I just need an assistance to retrieve an existing embeddings from neo4j using llama index I have several nodes and there is a text available for it and i have created an embedding of the same text in it i need to retrieve this embeddings using llama index ? how can i do it ? is there any reference link or git repo if there pls share here Thanks
t
n
13 comments
sorry I don't get a question. you're trying to retrieve embeddings from a neo4j vector store?
or graph store?
embedding [-0.042840488255023956,0.03162284940481186,-0.020775185897946358,0.012170901522040367,-0.051600754261016846,-0.027891861274838448,0.061851561069488525,0.07208336144685745,-0.05090389400720596,-0.038099255412817,0.011754359118640423,-0.06991245597600937,0.013662373647093773,-0.011212669312953949,-0.011003883555531502,0.051088713109493256,0.013046364299952984,-0.05769316107034683,-0.006948415189981461,0.06353568285703659,0.054805513471364975,-0.006477016489952803,-0.04364354535937309,0.04193500429391861,0.04670748859643936,0.020106466487050056,0.028349006548523903,-0.013576200231909752,-0.03315281122922897,-0.12941022217273712,0.0020160728599876165,0.049456287175416946,0.050817690789699554,0.0017689437372609973,0.0134945809841156,-0.010913060978055,-0.004846968222409487,0.04267922416329384,-0.026244189590215683,0.029831741005182266,-0.004150073044002056,0.022563733160495758,0.04458310082554817,0.04380439966917038,0.04486227408051491,0.019197983667254448,-0.04874177277088165,0.03874488174915314,0.09134403616189957,-0.00781730655580759,-0.040379125624895096,0.03457210958003998,0.009311629459261894,0.06692138314247131,-0.005263125523924828,-0.01998320035636425,0.04227500781416893,0.02994791977107525,0.008389467373490334,0.03773873299360275,0.016718178987503052,0.0016861797776073217,-0.1558544933795929,0.11166553199291229,-0.014539682306349277,0.034952022]
@titus this is my embedding available in neo4j graph database ,this is an embedding for a text and i have generated this using bge embedding model and stored in neo4j graph database
I am trying to retrieve this embeddings .
i have stored embeddings (vectors) inside a Neo4j graph by saving them as properties on nodes,
do you have the embedding's id? Or you don't know the ID but you're trying to retrieve it out?
otherwise is there a way to query out the nodes using cypher or LlamaIndex's property graph abstraction?
Consider a student as a node, which has properties such as text and embeddings. The embeddings represent the values derived from the text.

I don’t have an embedding ID. There can be multiple students in the database. When I query a particular student, I need to retrieve their embeddings from the Neo4j database. Is this approach correct? If not, please correct me.
@titus
oh ok. I think that in this case you could connect the neo4j graph to LlamaIndex's property graph index abstraction, then use a text-to-cypher retriever.

neo4j property graph index: https://docs.llamaindex.ai/en/stable/examples/property_graph/property_graph_neo4j/

text-to-cypher: https://docs.llamaindex.ai/en/stable/module_guides/indexing/lpg_index_guide/#texttocypherretriever
once you retrieve the node it should be straightforward to parse the node's properties which has the embedding?
@titus thanks for your time i will check it
contextualized_vectorstore_with_patient_name_node = Neo4jVector.from_existing_index(
HuggingFaceBgeEmbeddings(model_name="BAAI/bge-small-en-v1.5"),
url=NEO4J_URI,
username=USERNAME,
password=PASSWORD,
database=DATABASE,
index_name='fhir_xt',
retrieval_query=contextualize_query_with_patient_name_ns,
)


i have loaded the existing index using lang chain from my neo4j graph from the above code


now my objective is to replace langchain with llamaindex

i am stuck in the area where i am unable to load my existing vector using llama index
navaneeth — Today at 16:21
my embeddings are already available as a node properties i need to use this embeddings for semantic similarity
Add a reply
Sign up and join the conversation on Discord