Skip to content
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

feat(autofix): Reproduction in root causes #1067

Merged
merged 7 commits into from
Sep 10, 2024

Conversation

jennmueng
Copy link
Member

@jennmueng jennmueng commented Aug 21, 2024

  1. Introduces reproduction step in root cause output.
  2. Uses gpt4o w/ structured output for the root cause for increased reliability
  3. (Tacking on) Adds claude agent back into the plan+code agent

Screenshot 2024-09-10 at 10 45 47 AM

Eval results:

(Before is above, after is below)
Screenshot 2024-09-10 at 10 48 23 AM

@jennmueng jennmueng marked this pull request as ready for review September 10, 2024 18:07
Copy link
Member

@roaga roaga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some thoughts on code organization/cleanliness

Comment on lines +141 to +153
def clean_tool_call_assistant_messages(self, messages: list[Message]) -> list[Message]:
new_messages = []
for message in messages:
if message.role == "assistant" and message.tool_calls:
new_messages.append(
Message(role="assistant", content=message.content, tool_calls=[])
)
elif message.role == "tool":
new_messages.append(Message(role="user", content=message.content, tool_calls=[]))
else:
new_messages.append(message)
return new_messages

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On this I meant not just as a helper function, but if any messages passed into the client for any completion can be cleaned behind-the-scenes to prevent the errors. That way external code doesn't have to choose whether or not to clean.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that's a good idea, given that openai can expect a tool call and its response to be used in a specific way for the LLM input. We should only use this workaround sparingly, in this case, only for the formatter.

@jennmueng jennmueng merged commit c20a95e into main Sep 10, 2024
11 checks passed
@jennmueng jennmueng deleted the jenn/autofix/root-cause-repro branch September 10, 2024 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants