Local GraphRAG with LLaMa 3.1 - LangChain, Ollama & Neo4j

preview_player
Показать описание
In this video you learn how to perform GraphRAG with an Open Source model - Llama 3.1 and Neo4j as Graph database

Timestamps:
0:00 Introduction
1:40 Setup Llama 3.1 with Ollama
3:37 Setup of Neo4j
4:05 Code Walkthrough
Рекомендации по теме
Комментарии
Автор

This was EXACTLY what I've been looking for. Thank you for the great walkthrough, you just got yourself a new subscriber. Cheers

garic
Автор

Smart video ! It could be a good way to access easily relationships between stakeholders in any kind of business.

eloiseidlitz
Автор

Could you also create sample code for instances where multiple documents are stored in a directory in either .txt or a compressed format like Parquet?
How would it work then? Would you transform each document separately and combine them as a graph?
Would like to get your insight.

Thank you for the video!

mgmanzanillo
Автор

Congratulations, great approach! I was wondering if you could consider using a different embedding method instead of OpenAI's, as it requires payment. What do you think?

miguelprctba
Автор

How much VRAM and RAM do you think it takes to run the 70b model at minimum?

CptSnunu-iium
Автор

Has any tried this code for a large amounts of documents?
How does it scale?

mgmanzanillo
Автор

I try this approach with Ollama but It seesm when execute the row it run for more time and I need to stop the run..can help me? What is it the problem? The graph DB neo4j connection?

SilviaRicci
Автор

Running this error over and over in the "graph_documents = cell:
731 parsed_json =
732 for rel in parsed_json:
733 # Nodes need to be deduplicated using a set
--> 734 nodes_set.add((rel["head"], rel["head_type"]))
735 nodes_set.add((rel["tail"], rel["tail_type"]))
737 source_node = Node(id=rel["head"], type=rel["head_type"])

TypeError: string indices must be integers

PassingTheDog
Автор

Are the graph visualizations mostly used for development, to double check what the system is 'thinking' and look for valuable clustering?

ic_jason
Автор

You mentioned you received a key error at one point. I am getting that key error as well. Please share how you worked around the key error. Following your notebook, my key error is, KeyError: 'head'.

Transforming-AI
Автор

Thank u for great video.
Is it possible to still use ollama via langchain? I got a error when i use "if llmtype=="olllama"

-- error message : Received unsupported message type for Ollama.
(my_path) : LangChainDeprecationWarning: The method `BaseChatModel.__call__` was deprecated in langchain-core 0.1.7 and will be removed in 0.3.0. Use invoke instead.
warn_deprecated(

kevli
Автор

Great video! One thing I would be interested to know that were you be able to compare the results between the two approaches Graph or Vector search? Which one is retrieving the most relevant results?

Mohidthevloger
Автор

Hii, amazing content as usual man, i am trying to implement this noe4j graph on my pc after downloading your code, i went to neo4jaura and downloaded a .txt file containing the database credentials but whenever i try it from your code i get this error message below, please help

" Could not connect to Neo4j database. Please ensure that the url is correct"

it is exactly the same thing i downloaded from their website

oluwaseunakinropo
Автор

Interesting! Is Neo4j language dependent? So is it capable of finding relations of multilingual data or does Neo4j not care about the language and only the LLM to create the knowledge graph should be multilingual?

maxlgemeinderat
Автор

How can I use this for my code project files. I need to convert whole php project with python.

truliapro
Автор

Thank you for this video! 👏 I've been eager to see someone cover this topic. I have a couple of questions I hope you can help me with.
In this approach, is there a way to rerank the retrieved documents?
Did I understand correctly that you first query the graph database, and based on the retrieved entities and relationships, it then retrieves pieces of documents from the vector store?

sylap
Автор

Is this really an RDF Knowledge Grap, or just a Neo4J property graph. That doesn't look like a SPARQL query in your code.

tuba-inxs
Автор

I just finished learning the ChromaDB, can the GraphRAG works with ChromaDB instead of Neo4J?

DePhpBug
Автор

Nice. Can I only use llm ollama3.1 without openAi? Thanks

giantworks
Автор

where is the .env file in the repository?

federicosalvati