LLM Agents Improve Semantic Code Search

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Jain, Sarthak, Dora, Aditya, Sam, Ka Seng, Singh, Prabhat
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866909292006735872
author Jain, Sarthak
Dora, Aditya
Sam, Ka Seng
Singh, Prabhat
author_facet Jain, Sarthak
Dora, Aditya
Sam, Ka Seng
Singh, Prabhat
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2408_11058
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle LLM Agents Improve Semantic Code Search
Jain, Sarthak
Dora, Aditya
Sam, Ka Seng
Singh, Prabhat
Software Engineering
Artificial Intelligence
Computation and Language
Information Retrieval
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.
title LLM Agents Improve Semantic Code Search
topic Software Engineering
Artificial Intelligence
Computation and Language
Information Retrieval
url https://arxiv.org/abs/2408.11058