TLDR: GLM is a novel multi-agent framework that significantly improves Graph Chain-of-Thought (Graph-CoT) reasoning for Large Language Models (LLMs) over graph-structured data. It addresses limitations of existing single-agent systems by decomposing reasoning into specialized agents (classification, reasoning, action) and integrating an optimized LLM serving architecture. Key innovations include code generation for efficient multi-step tasks, a vertex-centric KV cache reuse model, priority-based KV cache eviction, and a pipelined execution strategy. These lead to substantial gains in accuracy (up to 38%), token cost reduction (up to 95.7%), lower latency (up to 90.3%), and higher throughput (up to 15.1x) compared to previous Graph-CoT methods.
Large Language Models (LLMs) have shown incredible potential in understanding and generating human-like text, but they often struggle with complex reasoning, especially when dealing with structured information like graphs. This is where a technique called Graph Chain-of-Thought (Graph-CoT) comes in, allowing LLMs to break down problems and reason step-by-step over graph-structured knowledge.
However, existing Graph-CoT systems face significant hurdles. They often suffer from low accuracy, use too many computational resources (tokens), are slow to respond (high latency), and can’t handle many requests at once (low throughput). These issues stem from using a single, large prompt for all reasoning, repeatedly processing the same information, and inefficient ways of serving the LLMs.
Introducing GLM: A Smarter Approach to Graph Reasoning
A new research paper introduces GLM, a groundbreaking system designed to overcome these limitations. GLM is the first multi-agent Graph-CoT system that’s specifically built alongside an optimized LLM serving architecture. Think of it as a team of specialized experts working together, rather than one generalist trying to do everything.
GLM breaks down complex reasoning tasks into smaller, manageable parts, each handled by a specialized agent. These agents include a Classification Agent, a Reasoning Agent, and an Action Agent, along with a Graph RAG retriever. This modular design allows for more focused processing, reducing the amount of information each agent needs to handle at any given time. For instance, a Classification Agent might first determine if a question can be answered directly or requires deeper reasoning. If it’s a complex question, the Reasoning Agent figures out what information is missing, and the Action Agent then generates executable code to retrieve that specific data from the graph.
This multi-agent approach significantly shortens the prompts given to the LLM and reduces the number of back-and-forth interactions needed to solve a problem. Instead of lengthy, repetitive reasoning chains, GLM can often complete complex tasks in fewer, more efficient steps, leading to better accuracy and much lower token consumption.
Smart Code Generation for Efficiency
One of GLM’s clever innovations is its ability to generate executable Python code snippets. Unlike previous systems that might only select from a fixed set of predefined operations, GLM’s Action Agent can create full code that combines multiple functions, uses basic programming logic (like if-else statements), and processes data locally. This means that a single piece of generated code can perform several graph operations and computations, replacing what would have been many separate reasoning steps in older systems. This dramatically cuts down on token usage and response time.
Optimized LLM Serving for Speed and Scale
Beyond its multi-agent design, GLM also introduces several system-level optimizations to make LLM inference more efficient:
- Vertex-Centric KV Cache Reuse: Traditional systems struggle to reuse cached information effectively with graph data. GLM addresses this by defining a ‘vertex chunk’ – a central node and its immediate neighbors – as a reusable unit. By caching these chunks, GLM can reuse pre-computed information across different reasoning steps and even different queries, reducing redundant calculations.
- Priority-Based KV Cache Eviction: When memory is limited, GLM intelligently decides what cached information to keep and what to discard. It assigns different priority levels to cached data based on how likely it is to be reused. For example, core shared instructions are always kept, while less frequently used information is evicted first, ensuring that valuable data remains accessible.
- Pipelined Execution Strategy: Retrieving information from a graph can be slow. GLM uses a pipelining technique that overlaps the process of fetching graph data with the LLM’s ongoing text generation. This means that while the system is waiting for data to be retrieved, the LLM can continue working on other parts of the response, effectively hiding much of the retrieval latency and speeding up the overall process.
Also Read:
- GraphChain: A New Approach for Large Language Models to Analyze Complex Graph Data
- Language Models Powering Smarter Multi-Agent Collaboration
Impressive Performance Gains
The results of GLM are quite remarkable. Experiments show that GLM improves answer accuracy by up to 38% compared to state-of-the-art Graph-CoT baselines. Even more impressively, it reduces token costs by up to 95.7%, lowers inference latency by 90.3%, and achieves up to 15.1 times higher throughput. These significant improvements make complex, real-world graph reasoning with LLMs not just possible, but also economically and practically feasible at scale.
GLM represents a significant step forward in making LLMs more effective and efficient for tasks involving structured data. By combining a smart multi-agent framework with deep system-level optimizations, it paves the way for more accurate, faster, and more scalable AI reasoning. You can read more about this innovative approach in the full research paper: Scaling Graph Chain-of-Thought Reasoning: A Multi-Agent Framework with Efficient LLM Serving.


