Skip to content

Commit

Permalink
fix prompts
Browse files Browse the repository at this point in the history
  • Loading branch information
alex28sh committed Dec 10, 2024
1 parent 5cbde09 commit 9ada366
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Rewrite the following Nagini code. It does not contain any preconditions, postconditions, invariants, assertions or helper functions (annotated with @Pure). Rewrite the program to add those in a way that makes it verify.
Do not change the code, only add invariants, assertions and conditions.
Rewrite the following Nagini code. It does not contain any preconditions, postconditions, invariants, or assertions. Rewrite the program to add those in a way that makes it verify.
Do not change the code, only add invariants, assertions and conditions. Don't remove any helper functions, they are there to help you.
Ensure that the invariants are as comprehensive as they can be.
Even if you think some invariant is not totally necessary, better add it than not.
Don't add any additional text comments, your response must contain only program with invariants.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Using text description you should add implementations and relevant pre/postcondi
Use helper functions only in invariants, assertions and conditions (in `if` or `while` conditions). Don't use helpers in the plain code.
Ensure that the invariants are as comprehensive as they can be.
Even if you think some invariant is not totally necessary, better add it than not.
Don't add any additional text comments, your response must contain only program with invariants.
Don't add any additional text comments, your response must contain only program with invariants, helpers and pre/postconditions.
Do not provide ANY explanations. Don't include markdown backticks. Respond only in Python code, nothing else.


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Generally, you should use helper functions (marked with @Pure annotation) only in invariants, asserts and conditions (in `if` or `while` conditions), not in the plain code.
But, the following helper functions you can use anywhere: {helpers}.
2 changes: 2 additions & 0 deletions prompts/humaneval-nagini-without-impls-few-shot/helpers.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Generally, you should use helper functions (marked with @Pure annotation) only in invariants, asserts and conditions (in `if` or `while` conditions), not in the plain code.
But, the following helper functions you can use anywhere: {helpers}.

0 comments on commit 9ada366

Please sign in to comment.