This repository was archived by the owner on Jan 2, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 595
Additional chunks based on references and definitions in code and proc tools #1180
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
symbol tool add metadata to code tool chunks showing metadata add github to repo filter empty symbols fixing some bugs, dedup fmt adding aliases add code to symbol tool new prompt add chunk to exchanges adding symbol ids save work now working adding filter save work saving work remove function call get ref def outside of exchange impl agent refdef to chunks clean chunk generation filter_chunks filter_chunks in new file fix repo_ref add to proc delete symbol tool warnings adding constants relative_path field revert to text user query simplified repo_ref to accept github and local remove filter action, make a function for llm call better naming and adding comments fmt adding some error handling
9fe3efc to
f820752
Compare
rmuller-ml
commented
Dec 19, 2023
ggordonhall
suggested changes
Dec 19, 2023
Contributor
ggordonhall
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a detailed description of the approach in a comment in symbol.rs?
oppiliappan
reviewed
Dec 20, 2023
ggordonhall
approved these changes
Jan 8, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some queries benefit from basic navigation (go to ref, go to def). Since adding a new tool to the agent makes the agent too complicated, we expand chunks retrieved by code search and proc with chunks containing definitions and references to symbols in the original chunks. To decide which symbol to add def/refs, we list all of the symbols in the original chunks, filter by some heuristics and use a basic LLM classifier to select a single symbol.
Pipeline
code search retrieves 10 chunks
we call
get_related_chunksto get 3 additional chunksextract_symbolsextract_symbolsfilter_stmbolsto select a symbol to expandexpand_symbol_into_chunkssame things is done in proc
Implementation
agent/symbol.rsis the main file with the changeshoverable endpoint is used to collect all symbols from a file
token-info endpoint is used to get refs/defs for a given symbol
Remaining things to do