-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modify context generation slightly (xrefs) #272
base: main
Are you sure you want to change the base?
Conversation
# If it was, truncate it. | ||
if line_index != -1: | ||
start = start if line_index <= 10 else line_index - 10 | ||
end = end if line_index >= end - 10 else line_index + 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: lines[1:2] will not include line index 2.
start = max(0, line_index - 10)
end = min(len(lines), line_index+10)
/gcbrun request_pr_exp.py -n dg-272 |
@trashvisor Could you please check if the report:
if not, I reckon this is ready to merge. |
/gcbrun request_pr_exp.py -n oc-272 |
A silly question: I noticed that it adds the function declaration, which is the same as the function signature added earlier. Related: oss-fuzz-gen/llm_toolkit/prompt_builder.py Line 165 in 39bebba
|
It was originally intended to solve:
Should this block be removed or some templating logic added? |
Ah, thanks for the explanation! I doubt this will help LLM get the correct header file, though:
But don't worry; AdaLogic will look into finding the correct header file in a more programmatic way.
In this case, maybe:
Would this sound reasonable? Thanks : ) |
Truncate xrefs, so that the source code of the entire function(s) xref'ing the function under test is not included.
Additionally, modify context generation so we talk about lines where the code is xref'd, as opposed to functions.