-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 Fixing up the symbol not found and dependency agents #655
🐛 Fixing up the symbol not found and dependency agents #655
Conversation
|
||
|
||
@dataclass | ||
class DependencyValidationError(ValidationError): |
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.
@fabianvf I don't see this used anywhere so I removed if I could get a second pair of eyes that would be great.
4977d3e
to
d5af502
Compare
@@ -26,6 +26,22 @@ class FQDNDependencySelectorRequest(AgentRequest): | |||
query: list[str] | |||
times: int | |||
|
|||
def from_selector_request( |
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.
This is needed to pass cache_path_resolver to the next run of execute.
@@ -42,22 +58,22 @@ class __llm_response: | |||
def __init__(self, model_provider: ModelProvider) -> None: | |||
self._model_provider = model_provider | |||
|
|||
message = Template( | |||
system_tmpl = Template( |
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.
Using a system template makes the context window smaller and the LLM behave better.
@@ -21,8 +21,6 @@ class MavenCompilerAgent(Agent): | |||
"""{{ background }} | |||
I will give you compiler errors and the offending line of code, and you will need to use the file to determine how to fix them. You should only use compiler errors to determine what to fix. | |||
|
|||
Make sure that the references to any changed types are kept. |
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.
This allows the LLM to revert certain things and, in my testing, gets slightly better results for specific situations.
It is imperfect, and if we need to add it back, we can.
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.
LGTM. Not specific to this PR, but there's some funkiness happening with how we handle Task
s and Agent
s
SymbolNotFoundError, | ||
PackageDoesNotExistError, | ||
) | ||
handled_type = (PackageDoesNotExistError,) |
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.
What happens when a symbolnotfound is actually caused because of a missing dep?
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.
A package not found error is also present and happens before that. There are then two scenarios because packages not found are handled first.
- We added the package, and this issue is resolved indirectly
- We were unable to add the package. This could be because it is a bad update (see the Jakarta.sql) example, in the case we need to back out the specific change, in other cases, it may be that the name of the thing has changed or something. In this case, it is not a package error; it is an error in that file that needs to be fixed.
* This makes it easier to determine what the path should be for each task, as tasks have more and more divergent data * Removes the cache overwrite for SymbolNotFound and PackageDoesNotExistErrors * Adds the depth to file tree to see effort level at work. * In the future we should consider enhancing this, so that tasks can add data to the trace to make debugging even easier Signed-off-by: Shawn Hurley <shawn@hurley.page>
* Make it so that the FQDN agent doesn't cause LLM to cycle on itself * Make it so the FQDN agent has a system prompt, that will help with context window issues * Make it so that the SymbolNotFound issues go to the maven compiler. This is because if the dependency is missing from the project both a symbol not found and a package does not exist are created. If just a symbol not found, then the issue is the Class changed. Signed-off-by: Shawn Hurley <shawn@hurley.page>
d5af502
to
f9b2b8b
Compare
context window issues
This is because if the dependency is missing from the project both a
symbol not found and a package does not exist are created. If just a
symbol not found, then the issue is the Class changed.
This is built on #653 to make debugging easier.
After this change, with openshift-ai, I can fix the DatabaseMigrationStartup.java file in around 6 minutes, where before it was taking upwards of 20-30.
fixes #650