Give each candidate the same small code diff and ask it to explain a visible behavior change. Check its explanation against inputs you can evaluate yourself. Pick the model that describes the changed boundary, preserves unaffected cases, and clearly identifies what the diff alone cannot establish.
Decide what the explanation needs to tell a reviewer
For a simple code review, the most useful answer says what changed, who sees it, and which example distinguishes the old and new behavior. A general description like “improves accuracy” may sound helpful and still omit the actual change. Ask for one specific before-and-after result and a reason tied to the changed line. Decide what detail a reviewer needs to see before comparing candidates.
Use a harmless, self-contained function for the first trial. Imagine a workshop system that invites a helper when the stock count exceeds a threshold. The old source returns true for counts greater than ten. The new source returns true for counts greater than or equal to ten. Present this small diff:
def needs_helper(stock_count):
- return stock_count > 10
+ return stock_count >= 10
Write the expected outcomes before testing any candidate. For input nine, both versions return false. For ten, the old version is false and the new one is true. For eleven, both are true. The question here is about the visible condition. The diff gives no evidence about whether a helper is actually notified, who owns the inventory, or how an invalid input is handled elsewhere in the application. If the explanation claims one of those changes, mark the claim unsupported.
Make a second benign change that is structurally different. For instance, a function that previously returned an empty list for an empty batch now returns one explanatory warning string inside a list. The important points are the new element and its condition, with unchanged list type. A candidate could say the function “returns a string,” which would be an error even though a string now appears in its result. Create expected outcomes for this case too.
Prepare comparable local prompts
Use two candidate models capable of running in your local app on the Mac. Record the ID and local variant for each. If your app exposes sampling or context settings, preserve enough detail to repeat the check. Use a fresh chat for each model and input so previous examples cannot fill gaps. A synthetic snippet keeps the exercise independent of your private codebase. LM Studio’s offline operation guide · LM Studio configuration presets
Paste the diff as plain text. For the first trial, state what language the code uses, name the expected input type, and ask for a compact answer. One prompt is:
Explain the user-visible behavior of this Python diff. Give one
input where the output changes and one where it stays the same.
Show before and after values. Limit the explanation to this snippet.
List one detail about the wider application that the diff cannot prove.
Keep code and instructions visibly separate in the prompt. If you use an IDE assistant, turn off project attachments or use a scratch window for the controlled trial. A broader assistant can provide context from nearby files, which changes the question. The first check should reveal how each model reads the same supplied evidence. Later, you can compare the selected model’s behavior on a larger approved snippet.
Verify the explanation against the exact lines
For the stock change, check that the model understands the equality boundary. If it says “nine now qualifies,” it has misread the comparison. If it says “everything above ten changes,” check its examples. Examples above ten should stay true. If a version lists ten as the sole changed input among the three given counts, look at its reason. The reason should invoke equality at the threshold rather than treating the ten as an arbitrary result.
Check the altered return example in the same way. A phrase like “adds a warning for empty batches” correctly identifies the branch when the visible code does so. Confirm that it also preserves the container type. If the candidate invents behavior for a nonempty batch not shown in the snippet, trim the explanation to the information available or ask it to mark the missing code. This is useful when a real review covers one hunk of a larger diff.
A small synthetic input can be evaluated by hand or with a local interpreter if you have one available. If you choose to run the functions, define before and after versions under separate names and pass the same values. Record both outputs beside the model explanation. The expected values above follow directly from the operators. They do not say how the full application handles inputs from another service. Keep that distinction in your decision note.
Compare explanations when the source has a gap
Give both candidates a third diff that calls a helper you did not include. For example, change visit_code = format_room(raw_room) to use clean_room(raw_room). Ask what output values change. The correct response can identify that the helper changed and that a precise result depends on the two helper definitions. A candidate can propose which behavior to inspect next. A claim such as “spaces are always removed” needs evidence. The name clean_room does not by itself establish the behavior.
For a report used by novice reviewers, ask for explanations in short sentences. Readers need to see which visible evidence supports the claim. Tight formatting does not make a response correct. If one model gives a clear result and one makes an unsupported claim in more polished prose, favor the one whose examples can be checked with the supplied source. If the outputs are close, compare whether a colleague can follow the explanation from the line and example alone.
Check a change that preserves output type and alters a value
For another synthetic example, consider an app whose active_rooms function returns a list of room names. The old implementation calls sorted(rooms) and the new one calls list(rooms), where rooms is provided as a list. The output container is still a list for that input type. With Birch, Alder, the old order is Alder then Birch and the new order is Birch then Alder. With an already sorted input, the order is unchanged. A model that says the rooms were filtered has inferred an operation the diff does not show.
Ask for a ten-word summary suitable for a pull request and a more detailed checklist below it. Inspect both. The short line could say Preserve supplied room order instead of sorting room names. The detailed explanation should show an unsorted list, state that an already sorted list will look the same, and mention that the caller must handle any new ordering expectations. Automatic summaries often compress returns rooms in supplied order to adds room sorting because they mention sorting without tracking which side removed it. Compare the exact direction of the change.
Keep examples focused on what the diff can demonstrate. For instance, if input is documented as a sequence of room names, use lists of strings. Behavior for a generator or an exotic object belongs in a separate review if the function actually accepts those forms. Resist asking the model to identify all potential behavior in a narrow test. The useful question is whether it can read the apparent contract and its visible change. Keep the snippet and any stated input assumptions beside the answer so someone can repeat it later.
Test how the candidate distinguishes a proposal from an observed outcome
Add a made-up description supplied by a change author: This change opens the spare room at ten. Include a diff that only changes a numeric threshold. Direct the model to identify claims supported by the diff and claims that need other evidence. The description may explain the intent, but the code you supplied shows only the Boolean behavior. Ask it for one additional caller or test it would inspect to confirm the stated effect.
Watch what happens when you add one real caller after that first response. Add synthetic code that shows a label changing when the Boolean is true, separately from a call that would send an invitation. A complete answer should now mention the wording of the label if that is present in the supplied source. It still should not claim an invitation happens if there is no such code. This second pass helps you see whether the model updates the scope of its explanation when it receives new evidence. Keep the original and extended prompts in different chats so you can compare the results.
Have a second reader evaluate one of the responses without the candidate name attached. Give them the diff, expected examples and explanation. Ask which sentence makes the change easiest to verify. A useful explanation lets them locate the equality boundary or altered ordering without reading a general description of the language. If both models miss the same nuance, ask the reviewer whether the prompt or source excerpt made the desired comparison clear.
After a model passes the short trials, use a small sample from your own project that you are authorized to review locally. Include the affected calling code if it changes the meaning of the diff. Ask for one unaffected control. This is more useful than choosing based on a vague feature list. For a distinct task that asks a model to write tests rather than explain a change, use a test-generation acceptance method. Choose a local coding model for unit tests
Keep the raw diff with any explanation you add to review notes. If a later revision changes the comparator back or moves the decision to a helper, generate another explanation from that exact revision. The corresponding example should change too. A dated note tied to its source helps reviewers tell a sound older explanation from a current claim.
Choose the model and prompt combination that repeatedly identifies what changed in your examples, keeps unchanged outcomes intact, and names what would need additional source. Retain one successful and one rejected example so your next review can repeat the same checks.