We’re excited to launch a huge feature making
@llama_index the framework for building knowledge graphs with LLMs: The Property Graph Index 💫
(There’s a lot of stuff to unpack here, let’s start from the top)
You now have a sophisticated set of tools to construct and query a knowledge graph with LLMs:
1. You can extract out a knowledge graph according to a set of extractors. These extractors include defining a pre-defined schema of entities/relationships/properties, defining a set of node relationship with
@llama_index constructs, or implicitly figuring out the schema using an LLM.
2. You can now query a knowledge graph with a huge host of different retrievers that can be combined: keywords, vector search, text-to-cypher, and more.
3. You can include the text along with the entities/relationships during retrieval
4. You can perform joint vector search/graph search even if your graph store doesn’t support vectors! We’ve created robust abstractions to plug in both a graph store as well as a separate vector store.
5. You have full customizability: We’ve made it easy/intuitive for you to define your own extractors and retrievers.
Labelled Property Graph: a KG representation with nodes relationships. Each node/relationship has a label and an arbitrary set of properties.
Why you care: This is a robust representation of knowledge graphs that extends way beyond just triplets - allows you to treat KGs as a superset of vector search. Each text node can be represented by a vector representation similar to a vector db, but also link to other nodes through relationships.
Our initial launch was done in collaboration with our partners from
@neo4j. Huge shoutout to @tb_tomaz for creating a detailed integration guide as well as extensive guidance on how to refactor our abstractions.
Our blog post:
llamaindex.ai/blog/introduci…
Full guide in the docs:
docs.llamaindex.ai/en/stable…
Usage guide:
docs.llamaindex.ai/en/stable…
Basic notebook:
docs.llamaindex.ai/en/stable…
Advanced notebook (shows extraction according to a schema):
docs.llamaindex.ai/en/stable…
Using Neo4j with our property graphs:
docs.llamaindex.ai/en/stable…