一句话:提出 MemRes,以自演化记忆、错误模式知识库和置信级联实现智能体式 Python 依赖解析,LLM 仅作最后手段。
Python 代码片段常因导入名与包名不一致而无法直接运行,现有基于 LLM 的依赖解析方案成功率低且开销大。本文提出 MemRes,一个智能体式解析系统,采用多级置信级联,将 LLM 仅作为最后手段。系统包含四个组件:自演化记忆,通过 tips 与 shortcuts 积累可复用解析模式;含 200 余条人工整理 import-to-package 映射的错误模式知识库;语义导入分析器;以及针对最大失败类别的 Python 2 启发式检测器。在 HG2.9K 数据集上,使用 Gemma-2 9B(10 GB 显存),MemRes 在 10 次运行平均解析 2890 个片段中的 2503 个(86.6%),将会话内记忆与置信级联结合处理剩余案例,显著超过 PLLM 的 54.7% 总体成功率。
We present MemRes, an agentic system for Python dependency resolution that introduces a multi-level confidence cascade where the LLM serves as the last resort. Our system combines: (1) a Self-Evolving Memory that accumulates reusable resolution patterns via tips and shortcuts; (2) an Error Pattern Knowledge Base with 200+ curated import-to-package mappings; (3) a Semantic Import Analyzer; and (4) a Python 2 heuristic detector resolving the largest failure category. On HG2.9K using Gemma-2 9B (10 GB VRAM), MemRes resolves 2503 of 2890 (86.6%, 10-run average) snippets, combining intra-session memory with our confidence cascade for the remainder. This already exceeds PLLM's 54.7% overall success rate by a wide margin.
DOI 原文 · arXiv · PDF(开放获取) · DBLP
@inproceedings{abs-2604-16941,
title = {MEMRES: A Memory-Augmented Resolver with Confidence Cascade for Agentic Python Dependency Resolution},
author = {Tran Chi Nguyen and Dao Sy Duy Minh and Trung Kiet Huynh and Pham Phu Hoa and Nguyen Lam Phu Quy and Vu Nguyen},
booktitle = {FSE},
year = {2026},
doi = {10.1145/3803437.3808242}
}