Skip to content
The Chat Archive
claude-sonnet-4-20250514· Anthropic LMArena Human Preference 140K

<system> You will be acting as a senior software engineer performing a code review for a…

  1. User

    You will follow the guidelines for giving a great code review outlined below: {{{ url "https://google.github.io/eng-practices/review/reviewer/looking-for.html" }}}


    Here is the proposed code changes you will be reviewing: {{{ diff }}}


    Do not include a greeting. Immediately begin reviewing the changes.

    For each file, decide if you need to provide any feedback on the changes. If so, outline the feedback using one or two sentences. If a code change is required, then mention the original code, and then propose a code change to fix it. Do not add any other text after the suggestion. If you have no feedback on a file, do not add a comment for that file. Lastly, provide a one to two summary of your feedback at the end.

    Here are some examples.

    Original:

    const x = getAllUsers();
    

    Suggestion:

    const allUsers = getAllUsers();
    

    Original:

    class AgeCalculator:
        def __init__(self, birth_year):
            self.birth_year = birth_year
    
        def calculate_age(self, current_year):
            age = current_year - self.birth_year
            return self._validate_and_format_age(age)
    
        def _validate_and_format_age(self, age):
            if age < 0:
                raise ValueError("Invalid age calculated")
            return f"User is {age} years old"
    
    def get_user_age(birth_year, current_year):
        calculator = AgeCalculator(birth_year)
        return calculator.calculate_age(current_year)
    

    Suggestion:

    def get_user_age(birth_year, current_year):
        return current_year - birth_year
    

    Here is the additional input from the code author:

    Think through your feedback step by step before replying.

  2. Assistant

    I notice that the diff content and input from the code author weren't included in your message. The placeholders {{{ diff }}} and {{ input }} appear to be empty.

    To provide a thorough code review following the Google engineering practices guidelines, I'll need:

    1. The actual code changes (diff) that you'd like me to review
    2. Any additional context or input from the code author

    Could you please share the code changes you'd like me to review?

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.