CodeNav: Beyond tool-use to using real-world codebases with LLM agents

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Gupta, Tanmay, Weihs, Luca, Kembhavi, Aniruddha
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866911921982144512
author Gupta, Tanmay
Weihs, Luca
Kembhavi, Aniruddha
author_facet Gupta, Tanmay
Weihs, Luca
Kembhavi, Aniruddha
contents We present CodeNav, an LLM agent that navigates and leverages previously unseen code repositories to solve user queries. In contrast to tool-use LLM agents that require ``registration'' of all relevant tools via manual descriptions within the LLM context, CodeNav automatically indexes and searches over code blocks in the target codebase, finds relevant code snippets, imports them, and uses them to iteratively generate a solution with execution feedback. To highlight the core-capabilities of CodeNav, we first showcase three case studies where we use CodeNav for solving complex user queries using three diverse codebases. Next, on three benchmarks, we quantitatively compare the effectiveness of code-use (which only has access to the target codebase) to tool-use (which has privileged access to all tool names and descriptions). Finally, we study the effect of varying kinds of tool and library descriptions on code-use performance, as well as investigate the advantage of the agent seeing source code as opposed to natural descriptions of code. All code will be made open source under a permissive license.
format Preprint
id arxiv_https___arxiv_org_abs_2406_12276
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle CodeNav: Beyond tool-use to using real-world codebases with LLM agents
Gupta, Tanmay
Weihs, Luca
Kembhavi, Aniruddha
Artificial Intelligence
Computation and Language
Software Engineering
We present CodeNav, an LLM agent that navigates and leverages previously unseen code repositories to solve user queries. In contrast to tool-use LLM agents that require ``registration'' of all relevant tools via manual descriptions within the LLM context, CodeNav automatically indexes and searches over code blocks in the target codebase, finds relevant code snippets, imports them, and uses them to iteratively generate a solution with execution feedback. To highlight the core-capabilities of CodeNav, we first showcase three case studies where we use CodeNav for solving complex user queries using three diverse codebases. Next, on three benchmarks, we quantitatively compare the effectiveness of code-use (which only has access to the target codebase) to tool-use (which has privileged access to all tool names and descriptions). Finally, we study the effect of varying kinds of tool and library descriptions on code-use performance, as well as investigate the advantage of the agent seeing source code as opposed to natural descriptions of code. All code will be made open source under a permissive license.
title CodeNav: Beyond tool-use to using real-world codebases with LLM agents
topic Artificial Intelligence
Computation and Language
Software Engineering
url https://arxiv.org/abs/2406.12276