LLM Agents Improve Semantic Code Search

Sarthak Jain, Aditya Dora, Ka Seng Sam, Prabhat Singh
8/5/2024
cs.SEcs.AIcs.CL

No confident code implementation found for this paper. 8 possible matches can be shown below.

Abstract

Code Search is a key task that many programmers often have to perform while developing solutions to problems. Current methodologies suffer from an inability to perform accurately on prompts that contain some ambiguity or ones that require additional context relative to a code-base. We introduce the approach of using Retrieval Augmented Generation (RAG) powered agents to inject information into user prompts allowing for better inputs into embedding models. By utilizing RAG, agents enhance user queries with relevant details from GitHub repositories, making them more informative and contextually aligned. Additionally, we introduce a multi-stream ensemble approach which when paired with agentic workflow can obtain improved retrieval accuracy, which we deploy on application called repo-rift.com. Experimental results on the CodeSearchNet dataset demonstrate that RepoRift significantly outperforms existing methods, achieving an 78.2% success rate at Success@10 and a 34.6% success rate at Success@1. This research presents a substantial advancement in semantic code search, highlighting the potential of agentic LLMs and RAG to enhance code retrieval systems.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 8 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{jain2024agents,
  title  = {LLM Agents Improve Semantic Code Search},
  author = {Sarthak Jain and Aditya Dora and Ka Seng Sam and Prabhat Singh},
  year   = {2024},
  eprint = {2408.11058},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2408.11058v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2408.11058.svg)](https://codeofpaper.com/paper/2408.11058)

Discussion