12 Tweets 2 reads Apr 05, 2024
Been talking lots about knowledge graphs and LLMs, specifically for autonomous agents, recently.
Organized some thought here if you want to dig in ๐Ÿ‘‡
KG ๐Ÿค LLM
๐Ÿงต (a thread)
For those not familiar, knowledge graphs are a type of data representation in the form of nodes (objects) and edges (relationships) and looks like this.
This structure allows for unique querying of relationship related data such as finding shortest path between two nodes, or further more complex reasoning.
I was introduced to KG (knowledge graphs) through the auto agent community here on X/Twitter.
And as I dug in, found a lot of promise in the opportunity to leverage KGs to build LLMs, which led me to building and open-sourcing Instagraph. x.com
Since then, I learned about previous efforts to convert human knowledge into a massive knowledge graph (e.g. large knowledge collider), and continued down this path to build and open source MindGraph, which dedupes nodes and edges as graphs get combined.
My hypothesis here is that in the long-run, it makes sense to structure input upon ingestion, then querying against the structured data VS simply storing raw data and querying against chunks of this.
This was validated recently with Microsoft's GraphRag research (unforuntately no code shared here)
While @neo4j kept being mentioned, we were delighted to meet new startups in the space as well.
On the embeddable graph DB front, there's @Nexus_database (public graph component), @falkordb (from the REDIS graph team), and @kuzudb (U Waterloo).
For building knowledge graphs (a la mindgraph), there's cognee.ai by @tricalt, whyhow.ai by @chiajy2000 and @tomsmoker, and @StructifyAI (first two are APIs, third is a service).
There's also @origin_trail for collaborating on web3 (decentralized graph!).
Beyond using graphs for knowledge, there's efforts around leveraging graphs to track and improve AI agent flow, such as with LangGraph which you can read more about here:
The idea is to track the flow of tasks, which can extend to testing various paths (Tree of Thought) and using this approach to continuously find better paths.
You can see some of my early experiments (newest auto agent approach) here:
Taking it one step further, I'm also turning the code base and dependencies between various functions/skills into a graph as well.
Here's what that looks like:
Combining the ideas above, you can imagine an autonomous agent run one one massive graph with many layers... x.com

Loading suggestions...