readme updates

This commit is contained in:
mrT23
2023-10-02 18:18:15 +03:00
parent abb633db0f
commit eaf7cfbcf2
2 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,4 @@
# Git Patch Logic # PR Compression Strategy
There are two scenarios: There are two scenarios:
1. The PR is small enough to fit in a single prompt (including system and user prompt) 1. The PR is small enough to fit in a single prompt (including system and user prompt)
2. The PR is too large to fit in a single prompt (including system and user prompt) 2. The PR is too large to fit in a single prompt (including system and user prompt)
@ -16,7 +16,7 @@ We prioritize the languages of the repo based on the following criteria:
## Small PR ## Small PR
In this case, we can fit the entire PR in a single prompt: In this case, we can fit the entire PR in a single prompt:
1. Exclude binary files and non code files (e.g. images, pdfs, etc) 1. Exclude binary files and non code files (e.g. images, pdfs, etc)
2. We Expand the surrounding context of each patch to 6 lines above and below the patch 2. We Expand the surrounding context of each patch to 3 lines above and below the patch
## Large PR ## Large PR
### Motivation ### Motivation
@ -25,7 +25,7 @@ We want to be able to pack as much information as possible in a single LMM promp
#### PR compression strategy #### Compression strategy
We prioritize additions over deletions: We prioritize additions over deletions:
- Combine all deleted files into a single list (`deleted files`) - Combine all deleted files into a single list (`deleted files`)
- File patches are a list of hunks, remove all hunks of type deletion-only from the hunks in the file patch - File patches are a list of hunks, remove all hunks of type deletion-only from the hunks in the file patch

View File

@ -248,9 +248,9 @@ This mode provide a very good speed-quality-cost tradeoff, and can handle most P
When the PR is above the token limit, it employs a [PR Compression strategy](./PR_COMPRESSION.md). When the PR is above the token limit, it employs a [PR Compression strategy](./PR_COMPRESSION.md).
However, for very large PRs, or in case you want to emphasize quality over speed and cost, there are 2 possible solutions: However, for very large PRs, or in case you want to emphasize quality over speed and cost, there are 2 possible solutions:
1) [use a model](#changing-a-model) with larger context, like GPT-32K, or claude-100K. This solution will be applicable for all the tools 1) [Use a model](#changing-a-model) with larger context, like GPT-32K, or claude-100K. This solution will be applicable for all the tools.
2) For the `/improve` tool, there is an ['extended' mode](./docs/IMPROVE.md) (`/improve --extended`), 2) For the `/improve` tool, there is an ['extended' mode](./docs/IMPROVE.md) (`/improve --extended`),
which divides the PR to chunks, and process each chunk separately, so regardless of the model, no compression will be done (but for large PRs, multiple calls may occur) which divides the PR to chunks, and process each chunk separately. With this mode, regardless of the model, no compression will be done (but for large PRs, multiple model calls may occur)
### Appendix - additional configurations walkthrough ### Appendix - additional configurations walkthrough