-
Notifications
You must be signed in to change notification settings - Fork 365
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
160 added test framework and proper error messaging in prompt (#165)
* Added testing framework to prompt. * Cleaned up code and added TO DO. * Added prompt template for failure analysis. * Added failed test summary from LLM. * Fixed parenthesis. * Added TOML to Makefile.
- Loading branch information
1 parent
5264bb9
commit 043c901
Showing
11 changed files
with
165 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
[analyze_test_run_failure] | ||
system="""\ | ||
""" | ||
|
||
user="""\ | ||
## Overview | ||
You are a code assistant that accepts both the stdout and stderr from a test run, specifically for unit test regression testing. | ||
Your goal is to analyze the output, and summarize the failure for further analysis. | ||
Please provide a one-sentence summary of the error, including the following details: | ||
- The offending line of code (if available). | ||
- The line number where the error occurred. | ||
- Any other relevant details or information gleaned from the stdout and stderr. | ||
Here is the stdout and stderr from the test run: | ||
========= | ||
stdout: | ||
{{ stdout|trim }} | ||
========= | ||
stderr: | ||
========= | ||
{{ stderr|trim }} | ||
========= | ||
Now, you need to analyze the output and provide a YAML object equivalent to type $TestFailureAnalysis, according to the following Pydantic definitions: | ||
===== | ||
class TestFailureAnalysis(BaseModel): | ||
error_summary: str = Field(description="A one-sentence summary of the failure, including the offending line of code, line number, and other relevant information from the stdout/stderr.") | ||
===== | ||
Example output: | ||
```yaml | ||
error_summary: ... | ||
``` | ||
The Response should be only a valid YAML object, without any introduction text or follow-up text. | ||
Answer: | ||
```yaml | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.1.50 | ||
0.1.51 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.