CaSKG: 확장 가능한 에이전트 스킬 검색을 위한 반사실적-인과 스킬 그래프
CaSKG: Counterfactual-Causal Skill Graphs for Scalable Agent Skill Retrieval
August 26, 2026
저자: Zhiyuan Li, Linyuan Gao, Xuechun Ding, Hongwei Chen, Yuan Wu, Yi Chang
cs.AI
초록
재사용 가능한 스킬 라이브러리는 대규모 언어 모델(LLM) 에이전트가 여러 작업에 걸쳐 절차적 지식을 재사용할 수 있게 해 주지만, 동시에 메모리 접근을 까다로운 검색 문제로 만든다. 전체 라이브러리 프롬프팅은 높은 컨텍스트 비용을 치르면서 적용 범위를 보존하는 반면, 벡터 검색은 컴팩트한 이웃을 반환하지만 스킬을 독립적인 텍스트로 취급하며, 그래프 기반 검색은 관련성을 전달하는 엣지가 신뢰할 수 있을 때만 워크플로우 맥락을 복구할 수 있다. 우리는 검색 전에 절차적 관계를 보정하는 반사실적-인과적 스킬 그래프 프레임워크인 CaSKG를 제안한다. CaSKG는 먼저 의미적, 어휘적, 입출력 및 구조적 증거로부터 높은 재현율의 방향성 후보 그래프를 구축하며, 수리 증거와 선택적 LLM 판정자가 후보 점수를 추가로 정제한다. 그런 다음 방향 조건부 텍스트 반사실적 프로브를 적용하여 스킬 쌍을 제거, 대체 및 재배열하고, 베이지안 평활화를 통해 증거를 집계한 후, 작업 조건부 확장을 위한 상태 필터링된 가중 그래프를 산출한다. 이 그래프는 오프라인으로 구축되며 다운스트림 에이전트 정책이나 작업 인터페이스를 변경하지 않고 사용된다. ALFWorld ID-140 및 ScienceWorld U211에서 여섯 개의 LLM 백본에 걸쳐, CaSKG는 모델과 벤치마크의 12가지 조합 모두에서 최고 작업 점수를 달성한다. Graph-of-Skills(GoS)와 비교하여, 여섯 개 모델에 대한 매크로 평균 ScienceWorld 점수를 72.62에서 80.50으로, ALFWorld 성공률을 80.01\%에서 86.79\%로 개선하며, 두 벤치마크 모두에서 평균 환경 스텝 수를 줄인다. 또한 정성적 및 절제 분석은 보정된 엣지가 검색에서 전제 조건, 상태 변경 행동, 검증 루틴 및 최종 완료 단계를 보존하는 데 도움이 된다는 것을 보여준다. 이러한 결과는 엣지 신뢰도 보정을 대규모에서 컴팩트하고 실행 가능한 스킬 검색을 위한 효과적인 경로로 자리매김한다. 코드는 https://github.com/ZhiyuanLi218/Caskg 에서 확인할 수 있다.
English
Reusable skill libraries allow large language model (LLM) agents to reuse procedural knowledge across tasks, but they also turn memory access into a challenging retrieval problem. Full-library prompting preserves coverage at high context cost, vector retrieval returns compact neighborhoods but treats skills as independent text, and graph-based retrieval can recover workflow context only when the edges that carry relevance are reliable. We propose CaSKG, a counterfactual-causal skill graph framework that calibrates procedural relations before retrieval. CaSKG first builds a high-recall directed candidate graph from semantic, lexical, input/output, and structural evidence, with repair evidence and an optional LLM judge further refining candidate scores. It then applies direction-conditioned textual counterfactual probes that remove, substitute, and reorder skill pairs, aggregates the evidence with Bayesian smoothing, and publishes a state-filtered weighted graph for task-conditioned expansion. The graph is constructed offline and used without changing the downstream agent policy or task interface. Across six LLM backbones on ALFWorld ID-140 and ScienceWorld U211, CaSKG achieves the highest task score in all twelve combinations of model and benchmark. Relative to Graph-of-Skills (GoS), it improves the six-model macro-average ScienceWorld score from 72.62 to 80.50 and ALFWorld success from 80.01\% to 86.79\%, while reducing mean environment steps on both benchmarks. Qualitative and ablation analyses further show that calibrated edges help retrieval preserve prerequisites, state-changing actions, verification routines, and final completion steps. These results position edge-confidence calibration as an effective route to compact and executable skill retrieval at scaleCode is available at: https://github.com/ZhiyuanLi218/Caskg .