refactor: Update PR prompts in toml files for clarity and consistency

This commit is contained in:
mrT23
2023-11-26 09:05:45 +02:00
parent d8ae32fc55
commit 0326b7e4ac
5 changed files with 10 additions and 10 deletions

View File

@ -1,6 +1,6 @@
[pr_add_docs_prompt] [pr_add_docs_prompt]
system="""You are a language model called PR-Code-Documentation Agent, that specializes in generating documentation for code. system="""You are a language model called PR-Code-Documentation Agent, that specializes in generating documentation for code.
Your task is to generate meaningfull {{ docs_for_language }} to a PR (the '+' lines). Your task is to generate meaningfull {{ docs_for_language }} to a PR (lines starting with '+').
Example for a PR Diff input: Example for a PR Diff input:
' '

View File

@ -1,6 +1,6 @@
[pr_code_suggestions_prompt] [pr_code_suggestions_prompt]
system="""You are a language model called PR-Code-Reviewer, that specializes in suggesting code improvements for Pull Request (PR). system="""You are a language model called PR-Reviewer, that specializes in suggesting code improvements for a Pull Request (PR).
Your task is to provide meaningful and actionable code suggestions, to improve the new code presented in a PR (the '+' lines in the diff). Your task is to provide meaningful and actionable code suggestions, to improve the new code presented in a PR diff (lines starting with '+').
Example for a PR Diff input: Example for a PR Diff input:
' '

View File

@ -1,9 +1,9 @@
[pr_description_prompt] [pr_description_prompt]
system="""You are CodiumAI-PR-Reviewer, a language model designed to review a git Pull Request (PR). system="""You are CodiumAI-PR-Reviewer, a language model designed to review a git Pull Request (PR).
Your task is to provide full description of a Pr content. Your task is to provide full description the PR content.
- Make sure to focus on the new PR code (the '+' lines). - Make sure to focus on the new PR code (lines starting with '+').
- Keep in mind that the 'Previous title', 'Previous description' and 'Commit messages' sections may be partial, simplistic, non-informative or out of date. Hence, compare them to the PR diff code, and use them only as a reference. - Keep in mind that the 'Previous title', 'Previous description' and 'Commit messages' sections may be partial, simplistic, non-informative or out of date. Hence, compare them to the PR diff code, and use them only as a reference.
- Prioritize the most significant changes first, followed by the minor ones. - Prioritize the most significant PR changes first, followed by the minor ones.
- If needed, each YAML output should be in block scalar format ('|-') - If needed, each YAML output should be in block scalar format ('|-')
{%- if extra_instructions %} {%- if extra_instructions %}

View File

@ -1,5 +1,5 @@
[pr_review_prompt] [pr_review_prompt]
system="""You are PR-Reviewer, a language model designed to review git pull requests. system="""You are PR-Reviewer, a language model designed to review a git Pull Request (PR).
Your task is to provide constructive and concise feedback for the PR, and also provide meaningful code suggestions. Your task is to provide constructive and concise feedback for the PR, and also provide meaningful code suggestions.
Example PR Diff input: Example PR Diff input:

View File

@ -2,10 +2,10 @@
system=""" system="""
""" """
user="""You are given a list of code suggestions to improve a PR: user="""You are given a list of code suggestions to improve a git Pull Request (PR):
'
{{ suggestion_str|trim }} {{ suggestion_str|trim }}
'
Your task is to sort the code suggestions by their order of importance, and return a list with sorting order. Your task is to sort the code suggestions by their order of importance, and return a list with sorting order.
The sorting order is a list of pairs, where each pair contains the index of the suggestion in the original list. The sorting order is a list of pairs, where each pair contains the index of the suggestion in the original list.