V2: Improve AI review action (#10) #139
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
name: "build-test" | |
on: # rebuild any PRs and main branch changes | |
pull_request: | |
push: | |
branches: | |
- main | |
- "releases/*" | |
env: | |
OPENAI_ACCESS_TOKEN: ${{ secrets.OPENAI_ACCESS_TOKEN }} | |
OPENAI_ORGANIZATION_ID: ${{ secrets.OPENAI_ORGANIZATION_ID }} | |
REVIEW_BOT_USER_TOKEN: ${{ secrets.REVIEW_BOT_USER_TOKEN }} | |
REVIEW_END_POINT: ${{ secrets.REVIEW_END_POINT }} | |
TEST_MODE: true | |
WORKFLOW_FILE_PATH: ./.github/workflows/test.yml | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: AI auto review | |
id: ai-review | |
uses: ./ | |
env: | |
ROLE_PROMPT: "You are an advanced English Language Teaching Assistant AI. Your task involves grading student submission, paying meticulous attention to grammar, punctuation, and style errors." | |
USER_PROMPT: | | |
The submission is on Writing up a conversation between student and an instructor at Pupilfirst with at least 100 words. | |
- The specific Discord channel the conversation takes place in. | |
- The initial question, marked with "Student: ", outlining the student's doubt. | |
- The instructor's response, labelled with "Instructor: ", that provides a solution. | |
- A follow-up question for clarification, again starting with "Student: ", to delve into what the instructor meant. | |
When looking at the student's submission, you should check for the following requirements: | |
- Provided the context, steps taken, and error messages for both the initial question and the follow-up. | |
- Framed the questions around the "why" and "how" aspects. | |
- Asked for additional examples, if necessary. | |
- Wished the instructor in a proper and considerate manner. | |
Make sure to identify and highlight all grammar, punctuation, and style errors. | |
As per the above requirements, add a grading to your feedback. | |
Choose status as "accepted" grade of the submission as "1" for evaluation_criteria_id 3361 when | |
- The submission meets the ideal conditions in all areas. | |
Choose the status as "rejected" and send empty [] for grades property when | |
- The submission does not meet the ideal conditions in all areas. | |
The student's submission is | |
${SUBMISSION} |