User specific data retrieval from neo4j embedding RAG #10069
Replies: 1 comment
-
🤖 Hello @GiteshKambli! I'm Dosu, your friendly neighborhood bot, here to assist with bugs, answer your curiosities, and guide you on your journey to be a contributor. While the human maintainers are away, I'm here to save the day... or at least keep the bugs at bay! 🦸♂️🦟 To retrieve data specific to each user from a Neo4j database for your chatbot using LlamaIndex, you can utilize the Here's an example of how you can use it: from llama_index.vector_stores.types import VectorStoreQuery
from llama_index.vector_stores.neo4jvector import Neo4jVectorStore
# Initialize the Neo4jVectorStore
store = Neo4jVectorStore(
username="neo4j_username",
password="neo4j_password",
url="bolt://localhost:7687",
embedding_dimension=300,
database="neo4j",
index_name="vector",
keyword_index_name="keyword",
node_label="Chunk",
embedding_node_property="embedding",
text_node_property="text",
distance_strategy="cosine",
hybrid_search=False,
)
# Create a VectorStoreQuery
query = VectorStoreQuery(query_embedding=user_embedding, similarity_top_k=5)
# Query the store
result = store.query(query)
# The result is a VectorStoreQueryResult object
# You can access the nodes, similarities, and ids from the result
nodes = result.nodes
similarities = result.similarities
ids = result.ids In this example, The Please note that you need to replace You can find more details about the If you have any further questions or need more clarification, feel free to ask. SourcesThis response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to build a chatbot based on data specific to each user, I want to retrieve the data for specific user from neo4j. How can I achieve this using llama index.
Beta Was this translation helpful? Give feedback.
All reactions