Reproduce “FastCode: Fast and Cost-Efficient Code Understanding and Reasoning” on OpenResearch
Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
Zhonghang Li, Zongwei Li, Yuxuan Chen, Han Shi, Jiawei Li, Jierun Chen, Haoli Bai, Chao Huang
Researchers from The University of Hong Kong and Huawei Noah’s Ark Lab developed FastCode, a framework that enables Large Language Models (LLMs) to understand and reason over large codebases by decoupling repository exploration from content consumption. This 'scouting-first' approach significantly reduces LLM token costs by over 50% while improving reasoning accuracy on software engineering tasks like question answering, file localization, and end-to-end bug fixing.
Key insights
- Decoupling codebase exploration from full-text ingestion through a 'scouting-first' strategy dramatically reduces LLM token costs for repository-scale reasoning tasks.
- Representing code with a semantic-structural graph using lightweight metadata allows LLMs to efficiently navigate complex codebases and identify relevant context with minimal computational overhead.
- Adaptive, cost-aware context management, guided by query complexity and information gain, can optimize the selection of code units to maximize reasoning confidence within a predefined token budget.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.