Search arXiv⌕ Search

arXiv subjects

Zhishuo Yang

Publications and source records attributed to Zhishuo Yang.

2 recordsLinked to original sources

ReConMem: A Graph-Based Dual Memory System for Repository-Oriented Conversations

LLM-based code assistants are increasingly used in iterative repository-level development, where effective assistance requires jointly leveraging evolving conversational history and repository context. Existing memory systems, however, are primarily designed for general-purpose conversations and do not sufficiently coordinate conversational information with the structured code entities to which it refers. We propose ReConMem, a graph-based dual memory system for repository-oriented conversations. ReConMem organizes distilled conversational memories and conversation-relevant code entities into interconnected semantic and structural memory graphs, while maintaining their cross-graph associations as interactions evolve. For memory recall, ReConMem combines natural-language and code-aligned retrieval through code-draft-based query grounding, expands retrieved information over intra- and inter-graph relations, and compresses retrieved code according to its structural granularity. We evaluate ReConMem on two repository-oriented conversational benchmarks spanning long-horizon context management and realistic project-grounded multi-turn assistance. On LoCoEval, ReConMem improves Pass@1 over the strongest baseline by 7.917 and 7.292 percentage points on single-hop and multi-hop subsets, respectively, with comparable context compression. On CodeAssistBench, it achieves 27.61% Correct and 44.03% Partially Correct, exceeding Full History by 4.10 and 7.09 percentage points, respectively, while improving interaction quality. These results demonstrate that aligning conversational memory with repository structure improves context management for repository-oriented multi-turn interactions.

cs.SE↗

RepoScope: Leveraging Call Chain-Aware Multi-View Context for Repository-Level Code Generation

Repository-level code generation aims to generate code within the context of a specified repository. Existing approaches typically employ retrieval-augmented generation (RAG) techniques to provide LLMs with relevant contextual information extracted from the repository. However, these approaches often struggle with effectively identifying truly relevant contexts that capture the rich semantics of the repository, and their contextual perspectives remains narrow. Moreover, most approaches fail to account for the structural relationships in the retrieved code during prompt construction, hindering the LLM's ability to accurately interpret the context. To address these issues, we propose RepoScope, which leverages call chain-aware multi-view context for repository-level code generation. RepoScope constructs a Repository Structural Semantic Graph (RSSG) and retrieves a comprehensive four-view context, integrating both structural and similarity-based contexts. We propose a novel call chain prediction method that utilizes the repository's structural semantics to improve the identification of callees in the target function. Additionally, we present a structure-preserving serialization algorithm for prompt construction, ensuring the coherence of the context for the LLM. Notably, RepoScope relies solely on static analysis, eliminating the need for additional training or multiple LLM queries, thus ensuring both efficiency and generalizability. Evaluation on widely-used repository-level code generation benchmarks (CoderEval and DevEval) demonstrates that RepoScope outperforms state-of-the-art methods, achieving up to a 36.35% relative improvement in pass@1 scores. Further experiments emphasize RepoScope's potential to improve code generation across different tasks and its ability to integrate effectively with existing approaches.

cs.SE↗