Тёмный

The easiest way to chat with Knowledge Graph using LLMs (python tutorial) 

Geraldus Wilsen
Подписаться 673
Просмотров 8 тыс.
0% 0

What is knowledge graph? How to integrate it with LLMs? If you have the same question, this video is for you! I will explain start from the basic theory until how to set up Neo4J database, build a graph chain using Langchain, Python, and Gemini ( open source model) , until how to do prompting strategies to enhance our model's performance
Chapter:
00:00:00 - Intro
00:00:31 - What is Knowledge Graph?
00:02:51 - Why is it important?
00:04:28 - Workflow
00:05:23 - Code
00:06:28 - Neo4J, Google Gemini, Hugging Face set up
00:07:51 - Data Overview
00:08:30 - Insert Data to Neo4J
00:10:21 - Building a Graph Chain
00:11:50 - Evaluation 1
00:14:00 - Prompting Strategies
00:16:03 - Evaluation 2
00:16:40 - Bonus ( How to Create a Dynamic Prompt? )
00:18:07 - Outro
Everything you'll need:
Github repo: github.com/projectwilsen/Know...
Gemini API: aistudio.google.com/app/apikey
HuggingFace API: huggingface.co/settings/tokens
Neo4J database set up: console.neo4j.io/
Neo4J Cypher cheat sheet: neo4j.com/docs/cypher-cheat-s...
References:
arxiv.org/pdf/2307.03172.pdf
arxiv.org/pdf/2311.07509.pdf
www.microsoft.com/en-us/resea...
#llm #knowledgegraph #langchain #neo4j #python

Опубликовано:

 

23 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 11   
@johnkintree763
@johnkintree763 Месяц назад
Nice demonstration of how performance can improve with in-context learning by providing examples of cypher queries in the prompts to gemini. Once we figure out how conversational digital agents can work well enough as interfaces to knowledge graphs and other open data resources, we can optimize it to work on personal devices such as smartphones. Some smartphones now have 16 GB of RAM.
@geralduswilsen
@geralduswilsen Месяц назад
Great thought John!
@jnanasrija7915
@jnanasrija7915 2 месяца назад
Great stuff !!
@geralduswilsen
@geralduswilsen 2 месяца назад
Glad it was helpful!
@lucasmorel153
@lucasmorel153 Месяц назад
Hi ! Great stuff and explanations thanks ! Do you think it is possible to the LLM to understand a non-LLM-created neo4J ? Like take any neo4j and read through it and understand it to answer questions from user ? using the same workflow ? would be soooooo awesome !
@geralduswilsen
@geralduswilsen Месяц назад
Hey, thank you! Anyway sorry, I didn't really understand what you meant by 'non-LLM created Neo4J'. Do you mean the schema (entity and relationship)? If so, then yes, you could try using predefined data in Neo4J, like the movie database. You can directly interact with it using LLM. However, here's the point: - To achieve better results, in my experience, we still need to fine-tune the model. - Secondly, in a real-world scenario, we would want to insert our own data, right? That's why we extract the entity and relationship from our data (e.g text, pdf) using LLM and push it to Neo4J
@m.tayyabkhan4861
@m.tayyabkhan4861 Месяц назад
very nice tutorial! By the way how can we make sure we only extract the important and relevant text from our own documents (like txt files or PDFs) to create nodes and relationships in Neo4j? I mean, PDFs often have a lot of extra stuff we don't care about.
@geralduswilsen
@geralduswilsen Месяц назад
This is an intriguing challenge. I am still exploring the best way to achieve this. Once I find a suitable solution, I will create a tutorial on it. I'm glad you asked about this!
@RitiGarg101
@RitiGarg101 Месяц назад
<a href="#" class="seekto" data-time="980">16:20</a> - Even though the cypher queries are giving correct context (answer) - the LLM is still responding with I don't know the answer. How do we fix that?
@geralduswilsen
@geralduswilsen Месяц назад
Nice question. One solution we could try to solve this problem is fine-tuning the model. Another approach is to create our own pipeline to directly pass the content retrieved from the database to the LLM. This way, we can control it more flexibly.
Далее
Graph RAG: Improving RAG with Knowledge Graphs
15:58
Просмотров 35 тыс.
МЕГА ФОКУС С КАЛЬКУЛЯТОРОМ
00:33
Python RAG Tutorial (with Local LLMs): AI For Your PDFs
21:33
How I'd Learn AI (If I Had to Start Over)
15:04
Просмотров 752 тыс.
GraphRAG: LLM-Derived Knowledge Graphs for RAG
15:40
Просмотров 95 тыс.
Knowledge Graphs - Computerphile
12:05
Просмотров 102 тыс.
LangGraph Simplified: Master Custom AI Agent Creation
43:51
Why Fine Tuning is Dead w/Emmanuel Ameisen
50:07
Просмотров 12 тыс.
МЕГА ФОКУС С КАЛЬКУЛЯТОРОМ
00:33