-
Notifications
You must be signed in to change notification settings - Fork 27
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
A few weird runtime errors #7
Comments
Is this on master or a release? |
This is from the release. |
Ah, actually I have seen these errors. I believe this is actually the AI not correctly formatting the tool call. It will often resolve itself, but often get into a doom loop. It's something we should study/gather more data on. For one, we have next to no logging, just the UI outputs. We should open a new issue/feature request to add a logging system which would essentially use standard Python logging facilities to output much more detailed logging to a log file. |
Makes sense. I'll give it a try. |
Something else I wanted to note about this: I briefly changed the default model temperature to 0 in order to have more deterministic behavior of the agent, but realized that was a mistake because temp 0 makes it impossible for the agent to have some randomness and work its way out of issues like this. I have seen cases where it makes the wrong function parameters 1-5 times but recovers. I think that having non zero temp is crucial for this recovery to be possible. My current working theory for this issue in general is that it may be part of the normal course of operations that some models will fail to properly make function calls some percentage of the time. It may therefore end up being an expected operating condition. If so, we could address this by having a better UI representation of what is going on, e.g. not make it look like a major error occurred and represent it more as "the agent made a bad function call and is trying to correct itself." |
Makes sense. Curious how aider handles this since I've not seen these during usage. It likely does happen but gets handled internally. |
Is aider using function calling? I'm not sure how it works internally. But I have seen models in aider fail to format the edit correctly and it retries multiple times. Aider has a default limit of 3 retries then it will abort. |
Is there a way to integrate it with with_structured_output? Also with_retry. I've used this in another langgraph system and it improved on the output I specified, haven't tried it for tool calls though. Maybe this helps: https://python.langchain.com/docs/concepts/tool_calling/#best-practices |
For reference here are some of the error messages I was getting:
|
Not sure how to set up a reproducible setup.
Here is the command I ran:
Here are the errors:
another similar error which unclear if they are related
The text was updated successfully, but these errors were encountered: