|
1 | 1 | # refactor-bot
|
2 | 2 |
|
| 3 | +## 0.0.4 |
| 4 | + |
| 5 | +### Patch Changes |
| 6 | + |
| 7 | +- [#16](https://github.com/zaripych/gpt-refactor-bot/pull/16) [`54d866e`](https://github.com/zaripych/gpt-refactor-bot/commit/54d866e2a215f75a0c65c4002fe9e191b4f015cf) Thanks [@zaripych](https://github.com/zaripych)! - fix: if an identifier is not found, provide LLM with suggestion to reduce specificity |
| 8 | + |
| 9 | +- [#16](https://github.com/zaripych/gpt-refactor-bot/pull/16) [`54d866e`](https://github.com/zaripych/gpt-refactor-bot/commit/54d866e2a215f75a0c65c4002fe9e191b4f015cf) Thanks [@zaripych](https://github.com/zaripych)! - feat: improve benchmarking command |
| 10 | + |
| 11 | + Introduce changes to the report generated by the refactor bot so that we can get better benchmark stats. |
| 12 | + |
| 13 | + The benchmark command now outputs `promptTokens` and `completionTokens`. |
| 14 | + |
| 15 | + The report generated by the benchmark command has been improved to include difference comparison, outliers and a list of the refactors with lowest scores. |
| 16 | + |
| 17 | + Example: |
| 18 | + |
| 19 | + ```sh |
| 20 | + Benchmark results |
| 21 | + |
| 22 | + METRIC │ A │ B │ DIFF |
| 23 | + ────────────────────────┼───────────┼───────────┼────────── |
| 24 | + numberOfRuns │ 9.00 │ 10.00 │ |
| 25 | + score │ 0.83 │ 1.00 │ +17.28% |
| 26 | + acceptedRatio │ 0.81 │ 1.00 │ +18.52% |
| 27 | + totalTokens │ 44688.67 │ 50365.90 │ +12.70% |
| 28 | + totalPromptTokens │ 40015.44 │ 48283.30 │ +20.66% |
| 29 | + totalCompletionTokens │ 4673.22 │ 2082.60 │ -55.44% |
| 30 | + wastedTokensRatio │ 0.09 │ 0.00 │ -9.49% |
| 31 | + durationMs │ 286141.39 │ 171294.32 │ -40.14% |
| 32 | + ``` |
| 33 | + |
| 34 | +- [#16](https://github.com/zaripych/gpt-refactor-bot/pull/16) [`54d866e`](https://github.com/zaripych/gpt-refactor-bot/commit/54d866e2a215f75a0c65c4002fe9e191b4f015cf) Thanks [@zaripych](https://github.com/zaripych)! - fix: fail if eslint is not properly configured or installed instead of ignoring the errors |
| 35 | + |
| 36 | + If eslint is not properly configured or installed, the refactor bot would ignore the errors because it would fail to analyze `stderr` of the `eslint` command. |
| 37 | + |
| 38 | + It now properly fails with a message that explains the problem. |
| 39 | + |
| 40 | + This should lead to better outcomes when configuring the refactor bot for the first time. |
| 41 | + |
| 42 | +- [#18](https://github.com/zaripych/gpt-refactor-bot/pull/18) [`1d26b8c`](https://github.com/zaripych/gpt-refactor-bot/commit/1d26b8cfe7dc956c01d5a1418942fdbd7ffbdc47) Thanks [@zaripych](https://github.com/zaripych)! - feat: introducing experimental chunky edit strategy |
| 43 | + |
| 44 | + This strategy allows the LLM to perform edits via find-replace operations which reduce the total number of completion tokens. The completion tokens are typically priced at twice the cost of prompt tokens. In addition to the reduction of the price this strategy also significantly improves the performance of the refactoring. |
| 45 | + |
| 46 | + Here are benchmark results for the `chunky-edit` strategy: |
| 47 | + |
| 48 | + ```sh |
| 49 | + METRIC │ A │ B │ DIFF |
| 50 | + ────────────────────────┼───────────┼───────────┼────────── |
| 51 | + numberOfRuns │ 9.00 │ 10.00 │ |
| 52 | + score │ 0.83 │ 1.00 │ +17.28% |
| 53 | + acceptedRatio │ 0.81 │ 1.00 │ +18.52% |
| 54 | + totalTokens │ 44688.67 │ 50365.90 │ +12.70% |
| 55 | + totalPromptTokens │ 40015.44 │ 48283.30 │ +20.66% |
| 56 | + totalCompletionTokens │ 4673.22 │ 2082.60 │ -55.44% |
| 57 | + wastedTokensRatio │ 0.09 │ 0.00 │ -9.49% |
| 58 | + durationMs │ 286141.39 │ 171294.32 │ -40.14% |
| 59 | + ``` |
| 60 | + |
| 61 | + While it does seem to improve the score, this should just be considered as variance introduce by the randomness of the LLM. The main outcome of this strategy is the reduction of the number of completion tokens and the improvement of the performance. |
| 62 | + |
| 63 | + There might be some other side effects, probably depending on the type of the refactor. So, this strategy is still experimental and must be selectively opted-in via "--experiment-chunky-edit-strategy" cli option. |
| 64 | + |
3 | 65 | ## 0.0.3
|
4 | 66 |
|
5 | 67 | ### Patch Changes
|
|
0 commit comments