Asking an AI to trace a single code base request
cost 200 ,000 tokens. Then by giving the AI a
simple map first, that cost dropped to 80 ,000
tokens. Yeah, that is a massive drop and wasted
computational effort. I mean, we're literally
changing the starting line here. Welcome to the
Deep Dive. I'm really glad you are joining us
today. We have a pretty fascinating shift to
talk about. We really do. You know, I still wrestle
with prompt drift myself, especially when I ask
an AI to analyze a massive project and it just
gets hopelessly lost. Oh, absolutely. It's incredibly
frustrating when it just spins its wheels. Exactly.
So today we are exploring Graphify. It's an open
source tool that basically gives cloud code a
reusable memory. Which is something developers
have been desperately asking for. Right. We'll
cover how it builds a map of your repository.
We'll look at the three -pass system it uses
to understand your files. And we'll see how it
fundamentally changes the way AI interacts with
code bases. Okay, let's unpack this. We know
AI gets lost in big projects. Why does that actually
happen? Well, mainly because it totally lacks
inherent structure when it begins. Right. Normally,
cloud code searches file by file. It spawns these
little explore agents, opens folders and just,
you know, builds context from zero. It's kind
of like trying to navigate a new city by walking
down every random alleyway to see where it goes.
Yeah, exactly. It's chaos. Versus just looking
at a subway map before you leave the house. Right.
And GraphDefy fixes this by turning the repo
into a knowledge graph first. It builds that
subway map. Why does crawling a repository manually
eat up so many tokens? Because the AI is wasting
context windows just trying to figure out the
shape of the project before it even begins to
answer the actual prompt. So it builds a map
first, saving the AI from wandering blindly.
Yes, exactly. And the way it accomplishes that
is really methodical. It uses a three -pass approach,
right? How does it start? Pass 1 focuses purely
on the code. It uses a tool called TreeSitter
to read the code structure locally. Classes,
functions, imports. And this pass is completely
deterministic. Wait, let me stop you right there.
What does deterministic mean here? It follows
strict logical rules without any AI guessing
involved. Got it. So it just reads the actual
mathematical connections. Right. No LLM hallucination
yet. Beat. Then pass to handles audio and video.
It uses faster whisper to transcribe media files.
Like internal demo videos or meeting clips. Yeah,
exactly. Those transcripts are added directly
to the map. Wow, that is incredibly useful for
capturing raw institutional knowledge. It's a
total game changer. Then we hit Pass 3. This
is where the large language model steps in for
documents and images. Like PDFs and markdown
files. What's fascinating here is how it blends
rigid logic with AI interpretation. It understands
the business logic in a design PDF and connects
it back to the code from Pass 1. If Pass 1 is
free and local, why do we even need the LLM in
Pass 3? Code is rigid and easy to map, but human
context, like design PDFs, requires AI to interpret
the meaning. It reads code rules, exactly, then
uses AI for the messy human stuff. Exactly. It
creates a complete picture. So once that map
is built... What does this web of data actually
look like in practice? Right. It breaks down
into three core parts. Nodes, edges, and communities.
Let's define those for everyone. Nodes are the
distinct entities, a file, a function, or a document.
Okay, isolated pieces of information. Mm -hmm.
Edges are the lines connecting those individual
nodes, the actual functional relationship. On
communities. Communities are organic clusters
of highly related nodes, like neighborhoods in
our subway map. The developers ran a really great
demo of this. on the Open Design Repository.
Yeah, it's a huge open source code base. Perfect
stress test. Graphify scanned 203 files in about
six minutes. And it created 197 distinct nodes
plus over 3 ,400 edges. That is a massive web
of dependencies. Yeah. And it found 109 communities,
right? Yeah. It highlights surprising connections.
It even identifies these things called God nodes.
Ah, the highly connected critical parts of the
repo. Whoa. Yeah. Beat. Imagine scaling that.
Imagine seeing God nodes in a code base you've
worked on for years but never truly understood.
Beat. It completely exposes the hidden, fragile
architecture of your project. What practical
value does knowing the communities give to the
AI? It allows clawed code to isolate the specific
neighborhood of code it needs to solve a problem,
ignoring irrelevant files entirely. Nodes are
things, edges are connections, communities are
specific code neighborhoods. That perfectly summarizes
it. It's why it beats traditional search. Since
we're talking about memory, listeners are probably
wondering how this differs from GraphArea. They
do sound similar, but the core difference is
that Graphify does not use embeddings. Let's
clarify that. What are embeddings? Translating
text into numbers so AI can find similar underlying
meanings. Here's where it gets really interesting.
Graphify maps actual existing structural relationships.
GraphArea searches giant unstructured document
collections. Exactly. GraphRag finds things that
sound related. Graphify reads exact, deterministic
relationships that already exist, like code imports.
It's basically RG Lite for repositories. Yeah,
mapping reality, not probability. So if I have
10 ,000 messy policy PDFs, I shouldn't use Graphify.
Correct. GraphRag is for massive, unstructured
text. Graphify is for structured systems where
you want to know exactly how A connects to B.
Graphify map structured systems. GraphRag searches
giant piles of loose documents. Spot on. You
have to choose the right tool for the job. Let's
get back to the practical payoff. Time, money,
and keeping this map alive. The token savings
are very real here. In that test, asking Claude
to trace a design request, the standard run cost
200 ,000 tokens. And 150 ,000 of those were wasted
just on explore agents. The AI was just frantically
bumping into walls. Right. But the Graphify run
took only 80 ,000 tokens total. That is about
40 % of the original cost. Now, I do want to
warn listeners not to expect the massive 70 times
token savings hype you might see online. Yeah,
the internet loves to exaggerate. Always. But
40 % is still massive for big projects. And setup
is incredibly easy. You just ask Cloud Code to
install it. You just run slash graphify dot.
And there's this really cool dash dash obsidian
flag. Which turns the map into an obsidian vault
for personal notes. It's so fun to visually explore
your code base that way. But code changes daily.
How do we keep this a living repo? You run Graphify
hook install. It rebuilds the map automatically
on every single commit. If my team pushes 50
commits a day, won't updating this map get incredibly
expensive? No, because the structural code updates
don't use the LLM API. They just use the local
free parsing tool. The hook updates the map locally
and for free on every commit. It's completely
sustainable. So what does this all mean? Graphify
isn't just a cost -saving trick. No, not at all.
If we connect this to the bigger picture, it's
a fundamental shift in how we work with these
tools. We are moving from treating an AI like
a search engine that has to rediscover your project
every morning to giving it a permanent living
memory. This raises an important question about
the future of development. It gives the AI genuine
situational awareness. Think about the obsidian
export feature. If Graphify can instantly map
the complex logic of a massive software project
and turn it into a visual vault, actually wait.
What happens when we start pointing these deterministic
mapping tools at our own personal hard drives,
our personal notes, or our scattered thoughts?
Two -sex islands. That is a pretty wild concept
to think about. Try pointing Graphify at your
messiest project this week just to see the map
it generates. Thanks for joining us on this deep
dive.