This repo contains notebooks, in parts, showing how to automatically create knowledge graphs from your data and perform graph RAG.
- The Cloud version notebooks involve signing up to ApertureDB Cloud and creating a managed DB instance there to which you can remotely connect.
- The local version notebooks involve using udocker (a library which allows running Docker images in constrained environments like Colab notebooks) to create DB instances locally which you can persist in Google Drive if you want - mitigating the need to sign up to ApertureD Cloud.
Besides the initial DB setup and connection, the notebooks - and thereby the core functionality - are exactly the same.
Use an LLM (Gemini 2.5 in this case) to intelligently extract entities from your data source, and ingest them into ApertureDB.
Use an LLM (Gemini 2.5 in this case) to intelligently extract relationships between entities and ingest them into ApertureDB, creating a complete knowledge graph.
Creating Descriptors (embeddings) of knowledge graph entities using Gemini embeddngs, ingesting them into a DescriptorSet (vector index), and connecting them with the knowledge graph in ApertureDB.
Implement graph RAG using our knowledge graph and compare it with vanilla RAG, using numerical + LLM-as-a-Judge evals through Gemini.
In case you don't have any sample PDF lying around, or do not want to use your own, you can use one the sample data PDFs from the repo to test out the notebooks.
- Cloud Computing Lecture Notes: My Cloud Computing course lecture notes PDF consisting of 42 pages - this is the data I have used to create these notebooks.
- Attention is All You Need Research Paper: A legendary research paper.
- Harry Potter Book 1 Chapter 1: Chapter 1 PDF of my favourite book series' first book - Harry Potter & The Philosopher's Stone.