In code search, the Generation-Augmented Retrieval (GAR) framework, which generates exemplar code snippets to augment queries, has emerged as a promising strategy to address the principal challenge of modality misalignment between code snippets and natural language queries, particularly with the demonstrated code generation capabilities of Large Language Models (LLMs). Nevertheless, our preliminary investigations indicate that the improvements conferred by such an LLM-augmented framework are somewhat constrained. This limitation could potentially be ascribed to the fact that the generated codes, albeit functionally accurate, frequently display a pronounced stylistic deviation from the ground truth code in the codebase. In this paper, we extend the foundational GAR framework and propose a simple yet effective method that additionally Rewrites the Code (ReCo) within the codebase for style normalization. Experimental results demonstrate that ReCo significantly boosts retrieval accuracy across sparse (up to 35.7%), zero-shot dense (up to 27.6%), and fine-tuned dense (up to 23.6%) retrieval settings in diverse search scenarios. To further elucidate the advantages of ReCo and stimulate research in code style normalization, we introduce Code Style Similarity, the first metric tailored to quantify stylistic similarities in code. Notably, our empirical findings reveal the inadequacy of existing metrics in capturing stylistic nuances. The source code and data are available at \url{https://github.com/Alex-HaochenLi/ReCo}.
MaFeRw: Query Rewriting with Multi-Aspect Feedbacks for Retrieval-Augmented Large Language Models
Beijing Advanced Innovation Center for Future Blockchain and Privacy Computing(北京未来区块链与隐私计算高精尖创新中心);Institute of Artificial Intelligence, Beihang University(北京航空航天大学人工智能研究院);Beijing Academy of Blockchain and Edge Computing(北京区块链与边缘计算研究院);Institute of Computing Technology, Chinese Academy of Sciences(中国科学院计算技术研究所)
ConvGQR: Generative Query Reformulation for Conversational Search
University of Montreal(蒙特利尔大学);Gaoling School of Artificial Intelligence, Renmin University of China(中国人民大学高瓴人工智能学院);Institute for AI Industry Research, Tsinghua University(清华大学人工智能产业研究院)
Southeast University(东南大学);Key Laboratory of New Generation Artificial Intelligence Technology and Its Interdisciplinary Applications (Southeast University) Ministry of Education(新一代人工智能技术及其交叉应用国家重点实验室);China Mobile Research Institute(中国移动研究院);Monash University(墨尔本大学);University of Manchester(曼彻斯特大学);University of Edinburgh(爱丁堡大学)
HYPER: Hypothesis-Guided Planning for Evidence-Seeking Retrieval
Graduate School of AI, KAIST, Republic of Korea(韩国科学技术院人工智能研究生院);School of Electrical Engineering, KAIST, Republic of Korea(韩国科学技术院电气工程学院);Department of Industrial Engineering, Yonsei University, Republic of Korea(延世大学工业工程系)
SafeLLM: Extraction as a Hallucination-Resistant Alternative to Rewriting in Safety-Critical Settings
Institute of Health Informatics, University College London(伦敦大学学院健康信息学研究所);National Hospital for Neurology and Neurosurgery(国家神经内科与神经外科医院);Somerset NHS Foundation Trust(萨默塞特NHS基金会信托);King's College Hospital(国王学院医院);King's College London(伦敦国王学院)
School of Computer Science, University of Sydney(悉尼大学计算机科学学院);City University of Hong Kong(香港城市大学);Shanghai Jiao Tong University(上海交通大学);University of Oxford, Department of Engineering Science(牛津大学工程科学系);Department of Engineering Science, University of Oxford(牛津大学工程科学系)
MIT Computer Science and Artificial Intelligence Lab(麻省理工学院计算机科学与人工智能实验室);CUHK Centre for Perceptual and Interactive Intelligence(香港中文大学感知与交互智能中心);MIT Linguistics(麻省理工学院语言学系)
Search-Induced Issues in Web-Augmented LLM Code Generation: Detecting and Repairing Error-Inducing Pages
Peking University(北京大学);Institute of Software, Chinese Academy of Sciences(中国科学院软件研究所);Singapore Management University(新加坡管理大学);Fuzhou University(福州大学)