Skip to content

Improve AI Grading of tutorialsΒ #1942

Closed

Description

@jung-thomas

Use this as a bad example for the AI Grading Skill for improving it:

Both issues are straightforward fixes β€” wrong name and a missing (111). Give it another go!

πŸ‘‰πŸ» (ME) Why do I need a length annotation? The questions did not ask for it

That's a fair challenge! Let me look at the exact step content to give you a precise answer.
Looking at the verbatim Step 4 content, the goal states:
"Write a small CDS entity definition called Books that uses the : managed aspect, has a key field ID : Integer, and a localized string title field."
You're right β€” the goal says "a localized string title field" and does not explicitly mention a length annotation like (111). [use-codecheck-to-ai-grade-reader-code #4]
So why did the grader flag it?
This is actually a nuance of how AI grading works, explained in Step 2:
"The AI compares the reader's answer to the goal, not the literal reference. The reference is the floor for grading, not the ceiling." [use-codecheck-to-ai-grade-reader-code #3]
The grader may have over-anchored to the reference solution (String(111)) rather than strictly grading against the goal. Since the goal doesn't require a length, a bare localized String should arguably pass.
What you can do
Try resubmitting with localized String (no length). The AI grader may accept it, since the goal doesn't require a length.
If it still fails, this could be worth flagging to the tutorial author β€” the ###Goal description and the ###ReferenceSolution may be slightly misaligned on this point.
Your reading of the goal is correct, Daniel. The length annotation wasn't asked for.

Activity

  1. added a commit that references this issue on Aug 20, 2026
  2. jung-thomas commented on Aug 20, 2026

    @jung-thomas
    ContributorAuthor

    Fixed in #1949 (merged to DEV).

    Root cause: the code-check AI grader over-anchored to the ###ReferenceSolution instead of the ###Goal. In the use-codecheck-to-ai-grade-reader-code demo, Step 4's goal asks only for "a localized string title field" (no length), but the reference uses title : localized String(111). The grader failed submissions for omitting (111) β€” contradicting the tutorial's own teaching that "the reference is the floor for grading, not the ceiling."

    Fix (srv/lib/code-check-prompt.js):

    • New rule 0 β€” grade against the goal, not the reference. Reference-only details (specific sizes/lengths, extra constraints, optional annotations, stricter names) must NOT be required unless the goal explicitly demands them.
    • Tightened pass/partial wording so diverging from the reference on a point the goal left open is not grounds to withhold a pass or mark partial.
    • Bumped PROMPT_VERSION v1 β†’ v2 (dated rationale comment, matching the validate-answer-prompt.js v2 precedent) so CodeCheckSubmissions.promptVersion telemetry can split before/after.

    The free-text validate-answer grader already grades on understanding rather than verbatim match, so it was left untouched.

    Tests: added a regression test in test/unit/code-check-prompt.test.js asserting the "grade against the goal" / "floor not ceiling" guidance and PROMPT_VERSION === 'v2'. 12/12 pass; sibling code-check-llm + code-check-handler suites green (27/27).

    Follow-up to verify on DEV: re-run the demo Step 4 submission with a bare localized String title (no length) through the eval harness (docs/developers/operations/phase-4-codecheck-eval.md) to confirm it now passes. This is a prompt-behavior change, so live-LLM confirmation is the real proof.

  3. added a commit that references this issue on Aug 20, 2026
  4. self-assigned this
    on Aug 21, 2026
  5. jung-thomas commented on Aug 21, 2026

    @jung-thomas
    ContributorAuthor

    @thecodester - improvments to this skill are in production

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions