Introduction To Property Graphs

LlamaIndex · Beginner ·📰 AI News & Updates ·2y ago

Key Takeaways

This video introduces property graphs, their differences from knowledge graphs, and implementations in LlamaIndex, covering graph extractors and retrievers, and demonstrating how to construct a property graph using Neo4J and LlamaIndex.

Full Transcript

hello everyone Ravi here from Lama index welcome to this video series on property graphs in this series we'll explore property graphs their differences from knowledge graphs and implementations in Lama index we'll also discuss how you can Implement property graphs using Neo 4J and llama index and we'll Implement everything U the property graphs in Lama index and with neo4j with uh M AI AMA and open source embeddings so uh this is first video uh in this series which introduces property graphs uh different extractors and how to construct a property graph and use retriever within the Lama index framework so let's get started with it let's first start uh by comparing knowledge graphs and uh property graphs and understanding its differences so as seen here knowledge graphs use a Triplex structure subject predicate and object to represent a relationship uh for example uh John is a subject and leaves in predicate SF is uh object or city right and then uh information about JN and SF is emed in these node labels right so however this structure lacks details about uh these entities like John's age or sf's population or any other properties so that's where property graphs uh will help you property graphs as a structure has nodes labels uh relationships and property is attached to each of these uh nodes or entities and for example a person and uh city are the labels here with the relationship leaves in and there are uh properties attached to each of these uh person and City for example person has a name uh John and age 30 and then city has a name SF and population 8.5 million right so uh this is uh the difference between how a property graph and knowledge graphs looks like on a broader level now let's discuss property graph construction and then quiring so there are two stages construction and quering uh the upper one is uh property graph construction and the lower one is quering stage so during uh construction uh this begins with documents and to uh graph extractors to build property graphs so there are three types of uh extractors uh implicit path extractor simple LM extractor and schema llm uh extractor so uh once property graph is constructed during wiring stage we'll use this property graph and uh graph retrievers uh there are uh four different graph retrievers llm CM retriever vctor context retriever text to cyer Retriever and uh Cipher template Retriever and uh and then pass whatever information uh we retrieved using these graph retriever for the given query to llm and generate an answer for the given query so these are the uh two stages uh the construction and quiring where we use extractors and retrievers uh to get a final answer for the Q query we'll discuss in detail about these extractors and uh Retrievers in upcoming slides so we'll start with uh graph extractors first right so I said there are three different graph extractors implicit path extractor simple llm extractor schema llm extractor we'll start with the implicit path extractor so there's a lot text Chunk e and uh it for example it divides uh uh we divided this large text into three different chunks ABC right so and then the relationship between these different chunks right B comes after a c comes after B and then a comes before b b comes before c and even um all these three chunks U have we got it from so Source text E right so all these relationships have been here so so this is how with implicit path extractor by just creating chunks and their node relationships we'll just create uh a property graph so let's look into an example on how uh it gets created so we have a large sentence let's say large text Chunk the SAT the cat sat on the M mat it was very comfortable and then the sun shown through the uh window warming the cat's for right so so uh and this Big Tex chunk is the source and we divided this big text Chunk into three different uh chunks here the cats sat on the mat and it was very comfortable and the sun Shone through the window warming the cats four right so uh the relationship it was very comfortable uh uh is coming after the cats out on the mate and even the third chunk comes after the second chunk and the first chunk come before the second chunk second chunk comes before the third chunk and these are uh belonging to the bigger uh text Chunk right so these relationships are embedded here and then a property graph is constructed accordingly then the next one is uh simple LM extractor so here given a text Chunk uh we'll use llm to extract entities and relationships so for example we have extracted three entities and there are some relationships between uh these three entities and these three entities are taken from uh Tex chunk right so they have uh mentions from uh the text Chunk so as a same example the sun shown through the window warming the cats for as it sat on the mat so we have extracted uh four entities here Sun cat window and mat right and there are relationships between these two uh four entities as well and then U these entities have been extracted from Tex Chun so those were also mentioned here right so uh that's how we'll use an llm to extract the entities and the relationships between them uh using uh uh simple LM extractor now next look into scheme LM extractor it is similar to uh simple LM extractor but it uses a predefined schema so it restricts uh what kind of entities are available what kind of relationships are available between the entities right so this is provid uh in a predefined schema and uh so LM is restricted to use this predefined schema on labels and relationships and then uh create this property graphs so since we have restricted on the mat entity and relationship so it is excluded from this property graphs so other entities and the relationships are present here unlike uh previous uh property graph so if you just examine previous one a simple LM extractor it has mat and then relationship between them right uh but in schemm extractor we have restricted that so U The Entity and the relationship is totally gone here right so uh this is how you can create schema uh property graph using schema LM extractor so you can use a single uh extractor or multiple combination of extractors to build a property graph which we'll uh look into uh during uh the implementation in further videos and after uh creating a property graph now you have to use graph retrievers uh to quy it and get an answer right so like let's look into uh different graph retrievers so the first one is llm synonym retriever so given a user query it generates synonyms for uh query terms and then um find relevant notes using exact keyword match whatever uh synonyms are created and then uh see if these synonyms are present in the property graph do extract uh exact keyword match and then uh return direct liary hood of adjacent nodes the next one is Vector context retri here we use embeddings uh to find the relevant nodes through Vector search and then uh return direct neighborhood of adjacent nodes this is simple uh Vector search uh but we create emings for the text noes and well as notes and then uh for the query and do as um cosine similarity to get the relevant nodes right the next one is uh text to Cipher so this generates Cipher statements using llm for the given query and um based on this Cipher statement you uh return the corresponding data using uh this generated Cipher and then um get an answer accordingly in Cipher template retriever uh from the user query we extract lant parameters uh based on the template already available and then run the cipher uh template which then gives uh an answer for the given query so that's all I have in the further videos we'll uh cover implementing property graphs in llama index with various extractors retrievers and neo4j using Mr LM for demonstration see you in the next video thank you

Original Description

In this video we will give an introduction to property graphs. OUTLINE: 00:49 - Difference between knowledge graphs and property graphs 02:06 - PropertyGraph Construction 03:15 - Graph Extractors 03:27 - ImplicitPathExtractor 05:15 - SimpleLLMExtractor 06:14 - SchemaLLMExtractor 07:30 - Graph Retrievers 07:42 - LLMSynonymRetriever 08:09 - VectorContextRetriever 08:35 - Text2CypherRetriever 08:54 - CypherTemplateRetriever Slide deck: https://docs.google.com/presentation/d/15qKwdOVoobnIuGDVN0qNl7hDO3nPwLAdETpCoBAKqfQ/edit?usp=sharing #llms #propertygraph #knowledgegraph #mistralai #llamaindex #ai #retrieval
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from LlamaIndex · LlamaIndex · 0 of 60

← Previous Next →
1 LlamaIndex Virtual Meetup (May 4th, 2023)
LlamaIndex Virtual Meetup (May 4th, 2023)
LlamaIndex
2 LlamaIndex + MongoDB Workshop/Fireside Chat
LlamaIndex + MongoDB Workshop/Fireside Chat
LlamaIndex
3 Discover LlamaIndex: Ask Complex Queries over Multiple Documents
Discover LlamaIndex: Ask Complex Queries over Multiple Documents
LlamaIndex
4 Discover LlamaIndex: Document Management
Discover LlamaIndex: Document Management
LlamaIndex
5 Discover LlamaIndex: Joint Text to SQL and Semantic Search
Discover LlamaIndex: Joint Text to SQL and Semantic Search
LlamaIndex
6 Discover LlamaIndex: JSON Query Engine
Discover LlamaIndex: JSON Query Engine
LlamaIndex
7 LlamaIndex Webinar: Active Retrieval Augmented Generation
LlamaIndex Webinar: Active Retrieval Augmented Generation
LlamaIndex
8 LlamaIndex Webinar: Demonstrate-Search-Predict (DSP) with Omar Khattab
LlamaIndex Webinar: Demonstrate-Search-Predict (DSP) with Omar Khattab
LlamaIndex
9 LlamaIndex Sessions: Practical challenges of building a Legal Chatbot over your PDFs
LlamaIndex Sessions: Practical challenges of building a Legal Chatbot over your PDFs
LlamaIndex
10 LlamaIndex Webinar: Graph Databases, Knowledge Graphs, and RAG with Wey (NebulaGraph)
LlamaIndex Webinar: Graph Databases, Knowledge Graphs, and RAG with Wey (NebulaGraph)
LlamaIndex
11 LlamaIndex Webinar: Community Project Showcase (07/07/2023)
LlamaIndex Webinar: Community Project Showcase (07/07/2023)
LlamaIndex
12 LlamaIndex Webinar: LLMs for Investment Research (with Didier Lopes, co-founder/CEO at OpenBB)
LlamaIndex Webinar: LLMs for Investment Research (with Didier Lopes, co-founder/CEO at OpenBB)
LlamaIndex
13 Discover LlamaIndex: Bottoms-Up Development With LLMs (Part 1, LLMs and Prompts)
Discover LlamaIndex: Bottoms-Up Development With LLMs (Part 1, LLMs and Prompts)
LlamaIndex
14 Discover LlamaIndex: Bottoms-Up Development With LLMs (Part 2, Documents and Metadata)
Discover LlamaIndex: Bottoms-Up Development With LLMs (Part 2, Documents and Metadata)
LlamaIndex
15 Discover LlamaIndex: Key Components to build QA Systems
Discover LlamaIndex: Key Components to build QA Systems
LlamaIndex
16 Discover LlamaIndex: Bottoms-Up Development with LLMs (Part 3, Evaluation)
Discover LlamaIndex: Bottoms-Up Development with LLMs (Part 3, Evaluation)
LlamaIndex
17 LlamaIndex Webinar: From Prompt to Schema Engineering with Pydantic  (with @jxnlco)
LlamaIndex Webinar: From Prompt to Schema Engineering with Pydantic (with @jxnlco)
LlamaIndex
18 Discover LlamaIndex: Bottoms-Up Development with LLMs (Part 4, Embeddings)
Discover LlamaIndex: Bottoms-Up Development with LLMs (Part 4, Embeddings)
LlamaIndex
19 Discover LlamaIndex: Custom Retrievers + Hybrid Search
Discover LlamaIndex: Custom Retrievers + Hybrid Search
LlamaIndex
20 LlamaIndex Webinar: Document Metadata and Local Models for Better, Faster Retrieval
LlamaIndex Webinar: Document Metadata and Local Models for Better, Faster Retrieval
LlamaIndex
21 LlamaIndex Webinar: Build Personalized AI Characters with RealChar
LlamaIndex Webinar: Build Personalized AI Characters with RealChar
LlamaIndex
22 LlamaIndex Webinar: Make RAG Production-Ready
LlamaIndex Webinar: Make RAG Production-Ready
LlamaIndex
23 LlamaIndex Workshop: Building RAG with Knowledge Graphs
LlamaIndex Workshop: Building RAG with Knowledge Graphs
LlamaIndex
24 Discover LlamaIndex: Introduction to Data Agents for Developers
Discover LlamaIndex: Introduction to Data Agents for Developers
LlamaIndex
25 LlamaIndex Webinar: Finetuning + RAG
LlamaIndex Webinar: Finetuning + RAG
LlamaIndex
26 Discover LlamaIndex: SEC Insights, End-to-End Guide
Discover LlamaIndex: SEC Insights, End-to-End Guide
LlamaIndex
27 Discover LlamaIndex: Custom Tools for Data Agents
Discover LlamaIndex: Custom Tools for Data Agents
LlamaIndex
28 LlamaIndex Sessions: Building a Lending Criteria Chatbot in Production
LlamaIndex Sessions: Building a Lending Criteria Chatbot in Production
LlamaIndex
29 Discover LlamaIndex: Bottoms-Up Development with LLMs (Part 5, Retrievers + Node Postprocessors)
Discover LlamaIndex: Bottoms-Up Development with LLMs (Part 5, Retrievers + Node Postprocessors)
LlamaIndex
30 LlamaIndex Webinar: How to Win a LLM Hackathon
LlamaIndex Webinar: How to Win a LLM Hackathon
LlamaIndex
31 LlamaIndex Webinar: LLM Challenges in Production (w/ Mayo Oshin, AI Jason, Dylan from Starmorph)
LlamaIndex Webinar: LLM Challenges in Production (w/ Mayo Oshin, AI Jason, Dylan from Starmorph)
LlamaIndex
32 LlamaIndex Webinar: Agents Showcase!
LlamaIndex Webinar: Agents Showcase!
LlamaIndex
33 LlamaIndex Webinar: Learn about DSPy
LlamaIndex Webinar: Learn about DSPy
LlamaIndex
34 LlamaIndex Webinar: Time-based retrieval for RAG (with Timescale)
LlamaIndex Webinar: Time-based retrieval for RAG (with Timescale)
LlamaIndex
35 LlamaIndex Webinar: Build/Break/Test LLM Apps Showcase (co-hosted with TrueEra, Pinecone)
LlamaIndex Webinar: Build/Break/Test LLM Apps Showcase (co-hosted with TrueEra, Pinecone)
LlamaIndex
36 LlamaIndex Workshop: Evaluation-Driven Development (EDD)
LlamaIndex Workshop: Evaluation-Driven Development (EDD)
LlamaIndex
37 LlamaIndex Webinar: Building LLM Apps for Production, Part 1 (co-hosted with Anyscale)
LlamaIndex Webinar: Building LLM Apps for Production, Part 1 (co-hosted with Anyscale)
LlamaIndex
38 LlamaIndex Webinar: Learn about Fine-tuning + RAG (w/ Victoria Lin, author of RA-DIT)
LlamaIndex Webinar: Learn about Fine-tuning + RAG (w/ Victoria Lin, author of RA-DIT)
LlamaIndex
39 LlamaIndex Webinar: What's next for AI after OpenAI Dev Day?
LlamaIndex Webinar: What's next for AI after OpenAI Dev Day?
LlamaIndex
40 Introducing create-llama
Introducing create-llama
LlamaIndex
41 LlamaIndex Webinar: PrivateGPT - Production RAG with Local Models
LlamaIndex Webinar: PrivateGPT - Production RAG with Local Models
LlamaIndex
42 Multi-modal Retrieval Augmented Generation with LlamaIndex
Multi-modal Retrieval Augmented Generation with LlamaIndex
LlamaIndex
43 LlamaIndex Webinar: LLaVa Deep Dive
LlamaIndex Webinar: LLaVa Deep Dive
LlamaIndex
44 A deep dive into Retrieval-Augmented Generation with Llamaindex
A deep dive into Retrieval-Augmented Generation with Llamaindex
LlamaIndex
45 LlamaIndex Workshop: Multimodal + Advanced RAG Workhop with Gemini
LlamaIndex Workshop: Multimodal + Advanced RAG Workhop with Gemini
LlamaIndex
46 LlamaIndex Webinar: Efficient Parallel Function Calling Agents with LLMCompiler
LlamaIndex Webinar: Efficient Parallel Function Calling Agents with LLMCompiler
LlamaIndex
47 Introduction to Query Pipelines (Building Advanced RAG, Part 1)
Introduction to Query Pipelines (Building Advanced RAG, Part 1)
LlamaIndex
48 LLMs for Advanced Question-Answering over Tabular/CSV/SQL Data (Building Advanced RAG, Part 2)
LLMs for Advanced Question-Answering over Tabular/CSV/SQL Data (Building Advanced RAG, Part 2)
LlamaIndex
49 LlamaIndex Webinar: Advanced Tabular Data Understanding with LLMs
LlamaIndex Webinar: Advanced Tabular Data Understanding with LLMs
LlamaIndex
50 Ollama X LlamaIndex Multi-Modal
Ollama X LlamaIndex Multi-Modal
LlamaIndex
51 Build Agents from Scratch (Building Advanced RAG, Part 3)
Build Agents from Scratch (Building Advanced RAG, Part 3)
LlamaIndex
52 LlamaIndex Webinar: Build No-Code RAG with Flowise
LlamaIndex Webinar: Build No-Code RAG with Flowise
LlamaIndex
53 LlamaIndex Sessions: Practical Tips and Tricks for Productionizing RAG (feat. Sisil @ Jasper)
LlamaIndex Sessions: Practical Tips and Tricks for Productionizing RAG (feat. Sisil @ Jasper)
LlamaIndex
54 Introduction to LlamaIndex v0.10
Introduction to LlamaIndex v0.10
LlamaIndex
55 Build SELF-DISCOVER from Scratch with LlamaIndex
Build SELF-DISCOVER from Scratch with LlamaIndex
LlamaIndex
56 Introducing LlamaCloud (and LlamaParse)
Introducing LlamaCloud (and LlamaParse)
LlamaIndex
57 LlamaIndex Sessions: 12 RAG Pain Points and Solutions
LlamaIndex Sessions: 12 RAG Pain Points and Solutions
LlamaIndex
58 LlamaIndex Webinar: RAG Beyond Basic Chatbots
LlamaIndex Webinar: RAG Beyond Basic Chatbots
LlamaIndex
59 A Comprehensive Cookbook for Claude 3
A Comprehensive Cookbook for Claude 3
LlamaIndex
60 LlamaIndex Webinar: RAPTOR - Tree-Structured Indexing and Retrieval
LlamaIndex Webinar: RAPTOR - Tree-Structured Indexing and Retrieval
LlamaIndex

This video introduces property graphs and their implementation in LlamaIndex, covering graph extractors and retrievers, and demonstrating how to construct a property graph using Neo4J and LlamaIndex. The video provides a comprehensive overview of property graphs, their differences from knowledge graphs, and how to use them for entity and relationship extraction. By the end of this video, viewers will be able to construct a property graph, implement graph extractors, and use graph retrievers to q

Key Takeaways
  1. Define the differences between knowledge graphs and property graphs
  2. Construct a property graph using graph extractors
  3. Implement graph retrievers to query the property graph
  4. Use LLMs to extract entities and relationships from text
  5. Optimize graph retrieval using vector search and cipher templates
💡 Property graphs provide a more detailed and structured representation of entities and relationships compared to knowledge graphs, allowing for more accurate and efficient querying and retrieval of information.

Related Reads

📰
Google Is Winning the AI Race and Losing Its Business Model at the Same Time
Google is leading in AI development but its business model is under threat due to changes in search behavior and advertising revenue, learn how AI is disrupting traditional business models
Medium · AI
📰
China Just Overtook America on the Only Metric That Predicts Who Builds the Future
China surpasses the US in a key metric that forecasts future technological advancements, highlighting a shift in global innovation leadership
Medium · AI
📰
AI Will Not Save You from Thinking: Why Polymathy Is Becoming the Real Career Advantage
Learn why polymathy is crucial in an AI-driven career and how to develop it to stay ahead
Medium · AI
📰
The Apple Intelligence Compromise: Why China is Forcing Apple to Use Local AI Models
Apple must use local AI models in China, highlighting geopolitical tensions in tech
Medium · AI

Chapters (11)

0:49 Difference between knowledge graphs and property graphs
2:06 PropertyGraph Construction
3:15 Graph Extractors
3:27 ImplicitPathExtractor
5:15 SimpleLLMExtractor
6:14 SchemaLLMExtractor
7:30 Graph Retrievers
7:42 LLMSynonymRetriever
8:09 VectorContextRetriever
8:35 Text2CypherRetriever
8:54 CypherTemplateRetriever
Up next
How to Connect Claude to Any App: MCPs & Connectors Full Guide (2026)
Maksims Sics
Watch →