Comments (7)
There is no such thing as "all suggestions"
-
Ask GPT-4 for 100 suggestions, you might get 100 suggestions. But most of them will probably be bad\repetative\simplistic. Without a cap, again you might get bad\repetative\simplistic suggestions
-
In addition, there is a limit on the number of output tokens, so even without a cap, you won't get "all suggestions".
-
Limiting the number of output suggestions is the right way to go, as we try to encourage the model to focus on the most important ones. We can still use a relatively high cap (~7-8). Reviewing each suggestion still takes time from a human.
I recommend reviewing the prompt. Try to remove lines 8 and 24, and you will see you still don't get "all suggestions", as there is no such thing.
from pr-agent.
How about all the most important ones? Setting an arbitrary limit doesn't make sense either. The two options seem to be ditch to ditch. How do we find the happy medium?
from pr-agent.
the prompt says " up to {{ num_code_suggestions }}
". It can provide less
More generally, It's always a challenge to prompt LLM, especially when the input is large and complicated like we have in PRs code. No prompt will give you 100% success, 100% of the time.
I recommend not relying on PR-Agent suggestions (or any other AI tool) to find every possible problem. The code suggestions are ... suggestions.
Use them as an extra reviewer to inspect and improve the code, but not as a replacement for baseline human inspection.
from pr-agent.
We are not relying on them for anything, we are using them as an extra tool. The point I'm trying to make is that for a very large PR it makes sense to get more suggestions, and for a very small PR it makes sense to get less suggestions. There ought to be a way to navigate this.
from pr-agent.
see #221 (comment), i am thinking about a tool to address this
from pr-agent.
I agree with @esauser, and also wanted to add that I tested num_code_suggestions
configuration with large values (50) just to see what it does, and in moderate PRs (100-ish lines) it doesn't "explode" - it just gives me a few code suggestions, but it's usually capped at around 10 and doesn't actually reach 50 (as you would expect in a PR of that size). That is it say - it looks like the "up to" part of the prompt is really taken into account (at least in these cases).
from pr-agent.
@esauser
this tool ("/improve --extend"):
#229
Should address all the issues you raised.
It allows for:
- no compression of diff files
- generates code suggestions for each group of diff files, and aggregates these suggestions. (hence number of code suggestions will increase for larger PRs)
- rank and sort suggestions based on their importance
- clip the least important suggestions.
from pr-agent.
Related Issues (20)
- Unable to run PR Agent with GPT 3 Key HOT 2
- Suggestions match existing code HOT 4
- Failed to publish inline comments HOT 1
- AttributeError when calling get_git_provider_with_context() HOT 3
- pr_agent:walkthrough command is running twice HOT 1
- Missing support for private certificate authorities HOT 1
- Manual execution not possible with workflow_dispatch HOT 1
- Bitbucket pipeline fails HOT 1
- TypeError: catching classes that do not inherit from BaseException is not allowed HOT 5
- [Feature Request] Convert logging configuration to use loguru-config HOT 2
- [HELP] Error: name 'GithubProvider' is not defined HOT 2
- The docker build target must be gitlab_webhook for local gitlab install HOT 1
- Avoid circular code suggestions. HOT 2
- GitHub Actions fail when using Azure OpenAI's gpt-4 HOT 13
- Gitea Support HOT 3
- Do not hard code `github.com` checking HOT 2
- /improve tool fails for Azure DevOps integration HOT 6
- Pin Docker Image Versions in GitHub Actions HOT 11
- Self-host Github App is not working with Github Enterprise Server HOT 1
- Use `instructor` for Parsing and Validation HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pr-agent.