Add more examples for few-shot learning #16
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR enhances the few-shot learning capabilities of our project by adding more example outputs and implementing a parsing mechanism for these examples.
Key changes:
sum_diff/examples/001.md
,002.md
, and003.md
)parse_pr_example
function insum_diff/utils.py
to process example PR outputsmain
function insum_diff/__init__.py
to incorporate example outputs into the user promptparse_pr_example
function intests/test_utils.py
pyproject.toml
to include pytest configuration and dev dependenciesThe new examples provide a diverse set of PR formats, including different styles and complexities. This will help improve the quality and variety of generated PR titles and descriptions.
The
parse_pr_example
function extracts the title and description from the Markdown-formatted example files, handling HTML comments and multiple headings. This parsed data is then incorporated into the user prompt, allowing for more effective few-shot learning.Example usage of the new
parse_pr_example
function:These changes will enhance the AI model's ability to generate more accurate and contextually appropriate PR titles and descriptions based on the provided examples.