Talk like a graph: Encoding graphs for large language models
60% accuracy boost. That's what the right graph encoding does for LLMs solving complex reasoning tasks.

Why it matters
Google Research reveals how to translate graph structures into text that LLMs can actually understand—with encoding choices that can swing accuracy from 5% to over 60%. Critical for enterprises building knowledge graph applications.
The key facts
8 to knowRight encoding techniques can improve LLM accuracy on graph tasks by up to 60%
GraphQA benchmark created to evaluate LLM performance on graph reasoning across diverse graph types
Incident encoding method outperformed alternatives for most graph tasks
Model size matters for graph reasoning—bigger models (PaLM 2-L) generally outperformed smaller variants
Graph structure significantly impacts LLM performance (tested Erdős-Rényi, Barabási-Albert, Stochastic Block Model, Scale-Free Networks)
LLMs still struggle with cycle detection compared to baseline solutions
Edge existence task showed minimal correlation with model size
Five prompting strategies tested: Zero-shot, Few-shot, Chain-of-Thought, Zero-CoT, and BAG
Go to the source
Google Research Blogblog.research.google
Publisher excerpt: Posted by Bahare Fatemi and Bryan Perozzi, Research Scientists, Google Research Imagine all the things around you — your friends, tools in your kitchen, or even the parts of your bike. They are all connected in different ways. In computer science, the term graph is used to describe connections…