LARQL: treating an LLM as a graph database

Review
Graph RAG
Tools
LARQL decompiles a transformer’s weights into a queryable graph with a SQL-like language, treating the LLM itself as the database.
Published

July 17, 2026

Illustration: LARQL: treating an LLM as a graph database

This one is an outlier but I find it genuinely intriguing. Plus it’s weekend and a good time for playing with ideas and outliers 😊

We treat LLMs and knowledge graphs as two separate things we wire together: the model generates, the graph grounds it via RAG. This little Github project turns things upside down. LARQL (Lazarus Query Language) throws that split out. It decompiles a transformer’s weights into a queryable graph (a vindex) where gate vectors become a KNN index, embeddings become token lookups and down-projections become edge labels. The model is the database. Viewing a LLM as a graph database is such a wonderful, innovative idea.

You get a query language (LQL) that looks like SQL: DESCRIBE “France”; -> capital -> Paris (probe, L27) → language -> French (probe, L24)

But wait, it’s not read-only. You can INSERT/UPDATE/DELETE facts straight into the weight space. No fine-tuning, no GPU processing. New facts are captured as small, shareable, reversible patch files (~10KB per fact vs. an 8GB model).

From a knowledge graph angle there are a few things to remark here. You get ontology mining for free. Relation and entity clusters get discovered directly from a model’s internals, no corpus required. Next, you get git-for-facts: patches are diffable, stackable, versioned, provenance tracking for what a model “knows.” It’s a real alternative to RAG for grounding. Instead of retrieving context at inference time, you edit the model’s internal graph directly.

Yes, of course, It’s an early-stage research tool, but it’s a serious hint at where neuro-symbolic systems could be heading. Treating a model’s latent knowledge as an explicit, editable graph rather than a black box you only prompt. It’s a wonderful intersection of graphs and LLMs.

LARQL: https://github.com/chrishayuk/larql