Skip to content

V2: Improve AI review action #129

V2: Improve AI review action

V2: Improve AI review action #129

Workflow file for this run

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: # make sure the action works on a clean machine without building
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 reviewing and providing feedback on student submissions, paying meticulous attention to grammar, punctuation, and style errors."
USER_PROMPT: |
The student submission for conversation should include the following:
- 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.
Ensure that the student applies the lessons they learned in the current level:
- Provide context, steps taken, and error messages for both the initial question and the follow-up.
- Frame questions around the "why" and "how" aspects.
- Ask for additional examples, if necessary.
- Thank the instructor in a proper and considerate manner.
Accept the submission with max grade if the student's submission meets the ideal conditions in all areas. Otherwise reject the submission with status rejected. Include feedback in both cases according to the feedback guidelines.
The feedback for student submission should focus on the following areas (with the ideal condition in brackets):
1. Providing Context & Background (The student delivers clear and detailed context, steps taken, and error messages).
2. Clarity (The conversation is clear and easy to understand throughout).
3. Expressing Thanks (The student thanks the instructor genuinely and appropriately).
4. Appropriate Tone & Etiquette (The student maintains a professional and respectful tone throughout the conversation).
Make sure to identify and highlight all grammar, punctuation, and style errors.
Call the create_grading function call.
The following is the student submission:
${SUBMISSION}