Trellis
Knowledge graphs · Updated

Why every node and edge needs an LLM summary

Raw edges plus embeddings connect a graph. Citation-grade multi-hop agent answers still need LLM summaries on every node and relationship.

By Trellis

A coding agent gets a multi-hop question: why did this symbol change under that ticket, and what still calls the old path? The answer is a path — file to PR to work item to caller — that has to be both connected and explainable. Typed edges can join those entities. Embeddings can surface similar chunks. Neither by itself hands the model a readable unit on each hop that a human can audit and the agent can cite without dumping raw edge lists or reopening sources every turn.

What typed edges and embeddings already buy you

Structure and semantic entry are real.

Developer at a desk with architecture notes in afternoon light
Summaries make multi-hop paths citeable — readable units on nodes and edges a reviewer can still audit.

Typed relationships beat bags of chunks for multi-hop joins. Vector RAG returns nearest snippets. It does not, by itself, answer “which open tickets touch modules that import this broken util?” That answer lives in relationships — imports, PR file lists, work items — not cosine distance between paragraphs. Industry writeups on graph multi-hop reasoning make the same point: top-k similar chunks can duplicate one path and miss others; expansion from seed entities follows relationships so context stays connected and more explainable.

Condensed structure reduces noisy context. Extracting entities and relationships up front lets retrieval pass structured facts instead of entire documents, and graphs connect those facts across sources so the model need not stitch raw text at query time. That is the value of a map, even before any LLM prose lands on a node.

Hybrid search is how agents enter. Search by meaning over prose and code, plus search of code by name, is how an agent hits both a natural-language ask and an exact symbol — then expands from those seeds.

None of that says edges and embeddings are useless. Conceptual FAQ and pure structural hops can live on typed graph plus vectors. The decision for a dev team is narrower: are those enough for citation-grade multi-hop answers that stay explainable without re-reading sources each turn?

Where a multi-hop path goes silent without prose

Follow a realistic chain: symbol AuthMiddlewareV2 → CALLS / IMPLEMENTS edges → the PR that renamed it → the work item that approved the change → callers still on the old path. The graph can hold every hop as a typed link with properties.

What the agent actually sees on a bare edge walk is often labels and ids: IMPLEMENTS, linked_to, a PR number, a ticket key. That is enough for a human who already knows the domain. It is a poor citation unit for a model that must explain the hop — “this PR closed INV-1842 by swapping the middleware used by three handlers” — without pasting the edge table or reopening three files and a tracker page.

Citation-grade multi-hop needs a human-readable unit on each element: a short prose summary on the node and on the relationship, so the agent can quote the hop and a reviewer can check it. Raw structure joins. Readable summaries make the join speak.

The same multi-hop chain of nodes: left side edges with only type labels, right side each node and edge carrying a short prose card the agent can quote
Edges alone join the path. Summaries on nodes and relationships make each hop citeable.

What a summary on every node and relationship is for

A summary here is not a pretty label in a UI. It is a first-class retrieval surface.

Trellis is explicit about the shape: not a pile of embeddings, but a connected graph, so retrieval is both connected and semantic. The configured model summarizes code symbols, narrates tours through the call graph, and extracts decisions, their reasons, and how they connect. The stack stores material in a graph database and a vector store, then writes those summaries so agents get neighborhood structure and meaning. The graph layer is typed entities and typed edges; source, SQL, prose, and connectors (GitHub PRs, Jira work items, and the rest) become typed nodes joined by typed relationships. Summaries sit in the local stack with graph and vector store on your hardware — first-class, not an optional cloud side channel.

Agent memory, in that framing, is a queryable graph of code, docs, decisions, PRs, and work items — not only ranked chunks. Hybrid search seeds the walk; summaries of code and decisions are what you expand with after the seed hits.

The industry already treats element-level prose as a real retrieval unit. Microsoft GraphRAG-style pipelines commonly consolidate multi-mention entity and relationship descriptions into single summaries for local search alongside source chunks. Temporal agent-memory engines such as Graphiti store entity summaries and textual fact properties on edges as schema. Those designs prove the pattern: node and edge prose is load-bearing. What they usually skip is the coding-team decision — whether raw typed edges plus embeddings are enough, or you need that prose on every element for citeable hops.

Markdown, PDFs, and spreadsheets still keep their own path: chunked, embedded, and cited. Summaries on graph elements do not replace document citations; they cover the nodes and edges pure chunk RAG never had.

Community reports answer a different question

A large share of “GraphRAG” coverage is about community-level summaries. Microsoft’s GraphRAG indexes text into a knowledge graph, clusters with Leiden-style community detection, and generates an LLM report per community so global questions (“main themes in this corpus”) work where naive vector RAG only sees top-k chunks. Official docs and builder writeups (including Neo4j extraction post-processing) put community summaries in the same pipeline story.

That is a real job on narrative corpora: map-reduce over community reports for themes. It is not the same decision as putting short prose on each code symbol, work item, PR, and relationship so a coding agent can cite a multi-hop path.

Do not collapse the two. Community reports answer “what is this collection about?” Element summaries answer “what is this node, and why does this edge matter, in words I can quote?” A codebase agent memory can need the second without shipping a Leiden hierarchy or global theme search. Trellis’s summaries are per code symbol and per decision, on a dual graph-and-vector store — not community-report map-reduce as the product claim.

One large community-report cloud over a corpus contrasted with many small prose summaries attached to individual nodes and edges
Community reports serve global themes. Per-element summaries serve citeable hops on specific nodes and edges.

Summaries without provenance freeze guesses

Pro-summary is not “summarize everything blindly.” Prior Trellis writing on codebase knowledge graphs names the failure mode: over-eager AI summarization into the graph can freeze hallucinations as facts. Guardrails stay practical — provenance back to file, commit, or ticket; separate observed structure from inferred advice; treat the graph as memory, not authority when the repo disagrees.

Prose artifacts still need their own embed-and-cite path so the agent can open the source chunk, not only a derived blurb. Industry GraphRAG writeups are honest about cost: static LLM-generated summaries can force periodic reindexing when data moves, with substantial token cost versus pipelines that only re-embed new chunks. That is a real tradeoff for any “summarize at ingest” design. Exact prompts, refresh schedules, and per-node token budgets are operations detail — not the architecture decision.

Summaries earn their place when they stay tied to evidence and refresh when underlying nodes move. Ungrounded prose on edges is worse than raw labels; grounded prose is what makes hops speak.

When edges alone are enough — and when they are not

Edges and embeddings are enough when:

  • The ask is structural and local (“what imports this symbol?”).
  • A human will read the raw neighborhood and does not need the agent to narrate each hop.
  • Wrong-but-related context is cheap to discard and you are not shipping production edits from the answer alone.

Human-readable summaries on nodes and relationships earn their keep when:

  • The answer must be citation-grade multi-hop: change → PR → ticket → callers, with language a reviewer can audit.
  • You refuse to dump edge tables into the prompt or re-open every source file every turn.
  • Next session should start from durable, explainable memory — the same map that hybrid search enters, not a fresh similarity lottery over unsummarized structure.
A connected lattice of typed nodes with summarized edges under a semantic entry path, contrasted with a loose bag of embedding chips
Connected structure plus per-element summaries — not only a bag of embeddings.

Raw edges plus embeddings connect a graph. Citation-grade multi-hop agent answers still need LLM summaries on every node and relationship. Pick one painful path question you already ask in standup — and see whether your stack returns a hop path with readable cites, or only labels and almost-right chunks.

Want this for your team?

Trellis builds local-first knowledge graphs for coding agents, and the Free plan runs on your own machine.