Make the grader parser robust - #118
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: be7978be60
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| matched_labels = { | ||
| label | ||
| for label, pattern in label_patterns.items() | ||
| if re.search(pattern, grading_response, flags=re.IGNORECASE) |
There was a problem hiding this comment.
Stop treating the article “a” as grade A
Because the entire response is searched case-insensitively, the bare-letter pattern for A also matches every standalone article “a”. A common verbose grader response such as This is a B therefore matches both A and B, causing the ambiguity fallback to return C and incorrectly record an explicit INCORRECT grade as NOT_ATTEMPTED. Restrict bare-letter recognition to an exact/structured answer position rather than scanning arbitrary prose.
Useful? React with 👍 / 👎.
No description provided.