Graph RAG

Vector search finds similar text. Graph RAG finds connections.

Hebbrix's knowledge graph automatically extracts entities and relationships from every memory. When your agent searches, it doesn't just match embeddings. It traverses the graph to find answers that flat retrieval would miss entirely.

graph-rag-example.py
from hebbrix import Hebbrix

hebbrix = Hebbrix()

# Store a memory. Entities and relationships
# are extracted and graphed automatically.
hebbrix.memories.create(
    content="Sarah joined the product team and reports to Jordan. "
            "She's leading the mobile redesign project with Alex."
)

# Later: ask about Jordan's team
results = hebbrix.search("Who is on Jordan's team?")
# Returns Sarah (via reports_to relationship)
# even though Jordan and Sarah were never
# mentioned in the same search query before.

# Query the knowledge graph directly
entities = hebbrix.graph.search("Jordan")
# Returns: Jordan -> manages -> Sarah
#          Sarah -> leads -> mobile redesign
#          Sarah -> works_with -> Alex
Memory stored
Natural language
Entities extracted
People, concepts, events
Relationships mapped
Automatic graph building
Graph traversal
Multi-hop reasoning

Why vector search alone isn't enough

Vector similarity finds text that sounds like your query. But real understanding requires knowing how things connect.

Vector search

Query: "Who is on Jordan's team?"

Returns memories that mention "Jordan" and "team" together. If Sarah and Jordan were never mentioned in the same sentence, vector search won't connect them.

Misses indirect relationships
Graph RAG

Query: "Who is on Jordan's team?"

Traverses: Jordan ← reports_to ← Sarah. Also finds Sarah ← works_with ← Alex, and Sarah ← leads ← mobile redesign. Returns the full team picture through relationship traversal.

Multi-hop reasoning

What makes Hebbrix's Graph RAG different

Zero configuration

You don't define a schema or write extraction rules. Store a memory in natural language and Hebbrix automatically identifies entities (people, concepts, projects, tools) and maps their relationships. The graph builds itself.

Combined with 5-layer search

Graph traversal is one of five search layers. It works alongside semantic vectors, BM25 keywords, importance scoring, and recency boosting. You get the structured reasoning of graphs plus the fuzzy matching of embeddings, all in one query.

Graph grows with every memory

Every new memory enriches the graph. Mention a new team member? They're added. Reference a new project? It's linked. The knowledge graph becomes more valuable the more your agent learns, without you managing it.

Sub-50ms retrieval

Graph traversal happens alongside vector search, not instead of it. The entire 5-layer search, including graph hops, completes in under 50 milliseconds. Production-ready performance, not a research prototype.

Where Graph RAG shines

Org chart reasoning

Map reporting structures, team membership, and authority chains from natural conversation.

Research connections

Link findings across papers, datasets, and experiments. Surface connections researchers would miss.

Customer relationships

Map stakeholders, influencers, and decision-makers across deal cycles automatically.

Incident analysis

Connect symptoms, root causes, and fixes across support tickets. Find patterns in the graph.

Compliance tracking

Map regulations to policies to implementations. Know exactly what's covered and what's not.

Product knowledge

Connect features, dependencies, and user feedback into a structured product knowledge base.

Add Graph RAG to your agent today

No schema definition. No extraction rules. Just store memories and let the graph build itself.