← Latest papers
💬 NLP

CaSKG: Counterfactual-Causal Skill Graphs for Scalable Agent Skill Retrieval

CaSKG is a counterfactual-causal framework that enhances scalable LLM agent skill retrieval by constructing and calibrating a directed skill graph through offline evidence aggregation and textual counterfactual probes, thereby significantly improving task success rates and efficiency across diverse benchmarks compared to existing methods.

Original authors: Zhiyuan Li, Linyuan Gao, Xuechun Ding, Hongwei Chen, Yuan Wu, Yi Chang

Published 2026-08-27
📖 5 min read🧠 Deep dive

Original authors: Zhiyuan Li, Linyuan Gao, Xuechun Ding, Hongwei Chen, Yuan Wu, Yi Chang

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine a computer program that can talk, reason, and act in the real world, much like a human assistant. These programs, known as large language model agents, are becoming increasingly capable of solving complex problems by combining their ability to generate text with access to external tools and environments. They can learn to use APIs, interact with simulated rooms, or follow scientific procedures. However, as these agents accumulate vast libraries of reusable skills—procedures for everything from cooking a meal to testing a chemical—the challenge shifts from simply having the tools to knowing which ones to use. If an agent tries to remember every possible action at once, it becomes overwhelmed by noise. If it looks only for words that match the current task, it might miss a crucial step that doesn't sound similar but is logically necessary. The core problem is how to retrieve the right sequence of actions from a massive library without getting lost in irrelevant details or missing hidden dependencies.

Researchers at Jilin University and Ant Group have developed a new method called CaSKG to solve this retrieval problem. Instead of treating skills as isolated pieces of text or simply connecting them based on how similar they sound, the team built a system that tests the reliability of the connections between skills before the agent ever uses them. They constructed a directed graph, a network where skills are nodes and the arrows between them represent the order in which actions should happen. The innovation lies in how they decided which arrows to keep. Before publishing the final map, the system subjected potential connections to a series of rigorous tests. It asked the artificial intelligence to imagine scenarios where a skill was removed, replaced with a different one, or performed in the wrong order. By observing how the task failed or became confused in these hypothetical situations, the system could determine if a connection was a true dependency or just a coincidence.

The researchers tested this approach on two distinct benchmarks: a set of household tasks involving finding and moving objects, and a collection of science experiments requiring specific sequences of observation and manipulation. They ran these tests using six different large language models, ranging from smaller, more efficient models to massive, powerful ones. The results showed that the new method consistently outperformed existing approaches. In every combination of model and task type, CaSKG achieved the highest success rate. For the science tasks, the average score across all models jumped from roughly 72.6 to 80.5, and for the household tasks, the success rate rose from 80.01% to 86.79%. Perhaps more importantly, the agents using this method reached their goals in fewer steps, suggesting they were not wasting time trying random actions or correcting mistakes caused by bad advice.

The key to this success was the ability of the system to filter out weak links. Previous methods often relied on graphs where connections were based on how often skills appeared together or how similar their descriptions were. The new study found that these methods often led the agent astray, causing it to follow irrelevant paths or miss critical prerequisites. By using counterfactual reasoning—essentially asking "what if this step didn't happen?"—the system could calibrate the confidence of each connection. It kept the strong, necessary links that formed a coherent workflow, such as the need to turn on a power source before testing a circuit, while discarding the weak associations that merely looked related. This allowed the agent to retrieve a compact, executable bundle of skills that preserved the logical order of operations, ensuring that preparation, action, verification, and completion steps were all present and in the right sequence.

The study also explored how this method held up as the library of skills grew larger. When the number of available skills increased from a few hundred to two thousand, the advantage of the new method remained stable, and in some cases, grew stronger. This suggests that as agents accumulate more knowledge, the need for a reliable way to navigate that knowledge becomes even more critical. The researchers found that the system worked best when it could draw on multiple types of evidence, such as the input and output requirements of a skill or its position in a workflow, rather than just the text description. They also discovered that while the method helped most tasks significantly, it was less critical for simple, direct searches where the answer was obvious, confirming that the value of the system lies in handling complex, multi-step procedures.

Ultimately, this work demonstrates that the quality of the connections between pieces of knowledge is just as important as the knowledge itself. By treating the retrieval process as a problem of verifying causal relationships rather than just matching words, the researchers created a framework that allows agents to access their memory more effectively. The method does not change how the agent acts or what tools it can use; it simply ensures that the right instructions are available at the right time. This approach offers a scalable path forward for building agents that can handle increasingly complex tasks, proving that a well-calibrated map of skills is more valuable than a larger, unorganized library.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →