Building Property Graphs With LlamaIndex
Key Takeaways
This video demonstrates building Property Graphs with LlamaIndex, including setup, construction, visualization, querying, and storage using Chroma VectorStore. It covers the use of LLMs, embeddings, and default extractors and retrievers.
Full Transcript
hello Ravi here from llama index welcome to another video in this tutorial series on uh property graphs so in this video we'll demonstrate the property graph uh index uh in Lama index uh so we'll start with implementing property graph using uh default extractors and retrievers and then on your given document and then once the construction is done we'll uh start quering with default retrievers so we'll use M uh llm and embeddings for this uh notebook so let's get started with it so before going forward you need to install these packages Lama index core package and then for llm Mr llm you need to install Lama index llm Mr and then Lama index Tings Mr uh I have already installed it so you don't so I'll not be running through this cell um and then next you need to set up the API key M AP key right and we'll use Mr Large latest llm and then embedding model as well and then you need to download the data right so yeah um once you download the data you load it using simple directory reader and then we'll start creating the property graph index so we pass the documents llm embedding model and create it so this uses the default implicit path extractor and then uh simple LM extractor to uh build a property graph if you don't customize it we'll see in the next video or notebook how you can customize the extractor as well as retriever but for this part we'll go with the simple implementation of using the default ones so uh this creates the index and then uh basically it passes the documents into noes and once you have the notes you send it to llm with a prompt which we'll uh see in the next video how the prompts look like and how you can customize it to generate uh these parts like these part parts are like um knowledge graphs triplets right so once uh you have the triplets you have uh implicit you can extract the implicit Parts as well uh which is by using node relationships which you have seen in the previous video on the introduction to property graphs and then generate the embeddings so here we create embeddings for both text nodes as well as uh nodes that's the reason you see uh the generating embeddings two times okay okay yeah and then once uh this is done you can save the index and you can actually view it so let me open it so this will take I think yeah it's getting loaded so this is the graph Total Property graph and then you can actually look into it like your different noes right the speaker author then right you can actually polygram so you can explore uh the YC explore this uh uh graph um once you save it right so once you have it you basically set the llm and embedding model here and uh during uh once uh uh property graph is constructed you get into quering Stage right so the default one uh uses two uh types of retrieval which is synonym or keyword extraction from uh from the query using llm and then Vector retrieval once these notes are retrieved yeah um you can actually just use the tripat retrieved or you can use both tripletes and the source text as well uh for to the to send it to M and get an answer from it so you can actually include this parameter include text equal to false or true based on um whether you want to just retrieve the text or whether you just want to retrieve triplets sorry just retrieve triplets or whether you want to retrieve both triplets and text Source text so let's uh run through an example here what happened at inter leaf and web web so these are the triplets that have been uh retrieved for the the given uh query right so you can experiment different queries and then uh for the query engine uh you can have uh create this Square engine index. as Square engine that used we used to do with rack pipeline as well so and as an experiment we'll include the text along with the source text along with the uh triplets so then we can get a response accordingly and yeah so interl Pam has done some things and uh here we have received response for other stuff as well so yeah so this is how you build uh uh property graph and then start querying as a retriever as a query engine and get uh answers accordingly and then uh we can save the uh what our index we have created and load the index and uh uh create a query engine and run the same query again so here is it so it uh saves loads and then uh creates a query engine on top of it yeah uh we got the same answer again right so this is how we can build index and save load and uh create the same index again right so then we'll see how you can use use a vector store for uh storing these embeddings right so here uh we are using chroma Vector store you need to install Alex Vector stores chroma and then um yeah create a collection out of it and so while building property graph you s documents llm embedding model what is a property graph store which is simple property graph store and then chroma Vector store right and then say purchase it locally so this will create a extract the parts implicit parts and then generate embeddings right and then create the uh index property graph index once you have the index created and saved you can load it back and uh create uh air engine and get a response for it yeah it's almost done uh embedding generation is the last part so yeah this is done so let's uh load the index create query engine and what did other do at YC is the query yeah so the other was heavily involved in YC and where other tasks he did at YC so this is how uh you can create a property graph uh construct a property graph and uh retrieve and Quire it and then store it and load it again and quy it again and even you can use a vector store as well to uh while creating property graph index and load it back again and start querying so that's all I have for this video uh see you in the next video with different tutorial thank you
Original Description
In this video, we will explore building Property Graphs with LlamaIndex.
OUTLINE:
00:00 - Introduction
00:32 - Setup
01:15 - PropertyGraphIndex Construction
02:45 - Visualize PropertyGraph
03:33 - Querying Stage
04:02 - Retriever
04:35 - QueryEngine
05:21 - Storage
05:59 - Using Chroma VectorStore
cookbook - https://github.com/mistralai/cookbook/blob/main/third_party/LlamaIndex/propertygraphs/property_graph.ipynb
#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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
LlamaIndex Virtual Meetup (May 4th, 2023)
LlamaIndex
LlamaIndex + MongoDB Workshop/Fireside Chat
LlamaIndex
Discover LlamaIndex: Ask Complex Queries over Multiple Documents
LlamaIndex
Discover LlamaIndex: Document Management
LlamaIndex
Discover LlamaIndex: Joint Text to SQL and Semantic Search
LlamaIndex
Discover LlamaIndex: JSON Query Engine
LlamaIndex
LlamaIndex Webinar: Active Retrieval Augmented Generation
LlamaIndex
LlamaIndex Webinar: Demonstrate-Search-Predict (DSP) with Omar Khattab
LlamaIndex
LlamaIndex Sessions: Practical challenges of building a Legal Chatbot over your PDFs
LlamaIndex
LlamaIndex Webinar: Graph Databases, Knowledge Graphs, and RAG with Wey (NebulaGraph)
LlamaIndex
LlamaIndex Webinar: Community Project Showcase (07/07/2023)
LlamaIndex
LlamaIndex Webinar: LLMs for Investment Research (with Didier Lopes, co-founder/CEO at OpenBB)
LlamaIndex
Discover LlamaIndex: Bottoms-Up Development With LLMs (Part 1, LLMs and Prompts)
LlamaIndex
Discover LlamaIndex: Bottoms-Up Development With LLMs (Part 2, Documents and Metadata)
LlamaIndex
Discover LlamaIndex: Key Components to build QA Systems
LlamaIndex
Discover LlamaIndex: Bottoms-Up Development with LLMs (Part 3, Evaluation)
LlamaIndex
LlamaIndex Webinar: From Prompt to Schema Engineering with Pydantic (with @jxnlco)
LlamaIndex
Discover LlamaIndex: Bottoms-Up Development with LLMs (Part 4, Embeddings)
LlamaIndex
Discover LlamaIndex: Custom Retrievers + Hybrid Search
LlamaIndex
LlamaIndex Webinar: Document Metadata and Local Models for Better, Faster Retrieval
LlamaIndex
LlamaIndex Webinar: Build Personalized AI Characters with RealChar
LlamaIndex
LlamaIndex Webinar: Make RAG Production-Ready
LlamaIndex
LlamaIndex Workshop: Building RAG with Knowledge Graphs
LlamaIndex
Discover LlamaIndex: Introduction to Data Agents for Developers
LlamaIndex
LlamaIndex Webinar: Finetuning + RAG
LlamaIndex
Discover LlamaIndex: SEC Insights, End-to-End Guide
LlamaIndex
Discover LlamaIndex: Custom Tools for Data Agents
LlamaIndex
LlamaIndex Sessions: Building a Lending Criteria Chatbot in Production
LlamaIndex
Discover LlamaIndex: Bottoms-Up Development with LLMs (Part 5, Retrievers + Node Postprocessors)
LlamaIndex
LlamaIndex Webinar: How to Win a LLM Hackathon
LlamaIndex
LlamaIndex Webinar: LLM Challenges in Production (w/ Mayo Oshin, AI Jason, Dylan from Starmorph)
LlamaIndex
LlamaIndex Webinar: Agents Showcase!
LlamaIndex
LlamaIndex Webinar: Learn about DSPy
LlamaIndex
LlamaIndex Webinar: Time-based retrieval for RAG (with Timescale)
LlamaIndex
LlamaIndex Webinar: Build/Break/Test LLM Apps Showcase (co-hosted with TrueEra, Pinecone)
LlamaIndex
LlamaIndex Workshop: Evaluation-Driven Development (EDD)
LlamaIndex
LlamaIndex Webinar: Building LLM Apps for Production, Part 1 (co-hosted with Anyscale)
LlamaIndex
LlamaIndex Webinar: Learn about Fine-tuning + RAG (w/ Victoria Lin, author of RA-DIT)
LlamaIndex
LlamaIndex Webinar: What's next for AI after OpenAI Dev Day?
LlamaIndex
Introducing create-llama
LlamaIndex
LlamaIndex Webinar: PrivateGPT - Production RAG with Local Models
LlamaIndex
Multi-modal Retrieval Augmented Generation with LlamaIndex
LlamaIndex
LlamaIndex Webinar: LLaVa Deep Dive
LlamaIndex
A deep dive into Retrieval-Augmented Generation with Llamaindex
LlamaIndex
LlamaIndex Workshop: Multimodal + Advanced RAG Workhop with Gemini
LlamaIndex
LlamaIndex Webinar: Efficient Parallel Function Calling Agents with LLMCompiler
LlamaIndex
Introduction to Query Pipelines (Building Advanced RAG, Part 1)
LlamaIndex
LLMs for Advanced Question-Answering over Tabular/CSV/SQL Data (Building Advanced RAG, Part 2)
LlamaIndex
LlamaIndex Webinar: Advanced Tabular Data Understanding with LLMs
LlamaIndex
Ollama X LlamaIndex Multi-Modal
LlamaIndex
Build Agents from Scratch (Building Advanced RAG, Part 3)
LlamaIndex
LlamaIndex Webinar: Build No-Code RAG with Flowise
LlamaIndex
LlamaIndex Sessions: Practical Tips and Tricks for Productionizing RAG (feat. Sisil @ Jasper)
LlamaIndex
Introduction to LlamaIndex v0.10
LlamaIndex
Build SELF-DISCOVER from Scratch with LlamaIndex
LlamaIndex
Introducing LlamaCloud (and LlamaParse)
LlamaIndex
LlamaIndex Sessions: 12 RAG Pain Points and Solutions
LlamaIndex
LlamaIndex Webinar: RAG Beyond Basic Chatbots
LlamaIndex
A Comprehensive Cookbook for Claude 3
LlamaIndex
LlamaIndex Webinar: RAPTOR - Tree-Structured Indexing and Retrieval
LlamaIndex
More on: LLM Foundations
View skill →Related Reads
📰
📰
📰
📰
When Claude starts hallucinating, kill the session
Dev.to · Alex Tong
Why LLM-Era AI Systems Break Every Rule You Learned About ML in Production
Medium · Machine Learning
Why LLM-Era AI Systems Break Every Rule You Learned About ML in Production
Medium · LLM
Why LLM-Era AI Systems Break Every Rule You Learned About ML in Production
Medium · ChatGPT
Chapters (9)
Introduction
0:32
Setup
1:15
PropertyGraphIndex Construction
2:45
Visualize PropertyGraph
3:33
Querying Stage
4:02
Retriever
4:35
QueryEngine
5:21
Storage
5:59
Using Chroma VectorStore
🎓
Tutor Explanation
DeepCamp AI