Summary
This paper proposes an execution-free, test-aware, LLM-based metric for evaluating code edits. Essentially, the authors prompt an LLM (claude-3-opus) with a candidate patch and an individual test in the test suite, and then the LLM will predict whether or not that patch will pass the given test. Then, they aggregate predictions across all tests in the test suit to assign a final build label. For experiments, the authors rely on SWE-Bench Lite, and trajectories form factory-code-droid, sweagent-gpt4, Gru, and code-story-aide-mixed. At the macro-level, their best approach achieves 71.4% accuracy (72.1 precision, 95.4 recall) with respect to predicting the build status outcome.
Strengths
- The motivation for this work is quite nice and very important. An execution-free metric is definitely useful for fast iteration and in scenarios in which a test environment is not available.
- The finding that aggregating individual test results works better than having a holistic evaluation across all tests is quite interesting. This could possibly extend to other types of LLM-based evaluations as well (e.g., rather than evaluating across multiple dimensions in a single call, evaluate across each dimension independently and then aggregate results).
- The analysis with the model's self-reported confidence and test complexity is interesting.
Weaknesses
- I believe an execution-free metric is most useful in situations in which you do not have a test suite at all or when the existing test suite has low coverage. However, this work requires having a high-quality test suite. The only dataset that the authors evaluate on is SWE-Bench, which comes with Docker images corresponding to the test environments, and so it seems like it is rather straightforward to just execute the tests in the test suite. Therefore, it seems that the impact of this work will be fairly limited.
- Additionally, from Table 2, the best accuracy that is attained is 71.4% (which is incorrectly claimed as 82.1% in the abstract). From the paper alone, I am not convinced that we can simply replace the execution-based metric with this. Perhaps if the authors had demonstrated that the rankings of the top ~10 models on the SWE-Bench leaderboard remained identical when using the LLM-based metric, it would have been more convincing. Currently, the best approach nearly matches the random baseline in terms of precision (i.e., the LLM-based approach will often say the patch passes tests when it actually does not). And if it is possible to obtain the execution-based score, then this LLM-based metric will likely not be needed at all since it serves to approximate the execution-based metric.
- A lot of details seem to be missing, misleading, inconsistent, and sometimes incorrect. This makes it difficult to follow and at times even assess the paper:
1. In the abstract, the authors claim an accuracy of 91.6% at the micro-level and 82.1% at the macro-level. However, these are F1 scores, and not accuracy, based on Tables 1 and 2.
2. For the majority of the first half of the paper, it seems that the authors use the gold code patch which resolves the issue (L017-018, L080-081, L137-141). However, it becomes clear later that the authors only consider the gold *test* patch and the gold code patch is not used in their approach and only in their baselines.
3. The prompts that the authors use are not given. Additionally, not a single example is provided.
4. The notion of "function-level" is in multiple tables but this is never explained. This also seems to be the best performing, so it is not clear what the best-performing method is actually. Namely, Table 1 has only two rows for "Isolated, Test-Aware", one corresponding to "post-commit functions" and one augmenting that method with "function-level." However, the two methods that are introduced in the main text are "context enhancement" and "source code" (which is also referred to as post-commit functions). In L259, it says "We can see that the LLM critic with context-enhanced patches performs the best, outperforming other baselines by 7.4% and 12.7%". But "context-enhanced" is not in Table 1 and there is only 1 baseline.
5. In the abstract, the authors motivate this work as an "intermediate/step-level" evaluation methodology. This suggests that the intermediate steps in the LLM-based agentic framework could be evaluated. However, this does not seem to be demonstrated in the paper. It is not obvious, but if Figure 4 (right) was intended to demonstrate this, it is not clear. Additionally, it is not clear why this was presented as a plot rather than an aggregate spearman's ranking coefficient. It looks like there is a decent chunk of the density in the negative range here too.
Questions
- Please consider addressing the points raised above.
- Have you considered using both the gold test patch and gold code patch together?
- Did you consider a baseline which just uses the candidate code patch, with no tests at all?