SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
⤢ Open full site

Use [CODECHECK_N] to AI-grade your reader's code

Add a single block to your rules.vr file and an LLM will grade pasted code against your reference solution — better than exact-match, kinder than no validation at all.

Overview

🎓 intermediate 15 min. IntermediateSAP Business Technology Platform

You will learn

  • What the [CODECHECK_N] directive does
  • How to write the rules.vr block
  • What good ###Goal text and ###Hints look like
  • How to enable AI code-check on your tutorial
Thomas Jung T Thomas Jung June 19, 2026
Created by June 18, 2026
Contributors

Prerequisites

Prerequisites

  • A tutorial repo under sap-tutorials with a matching *-Contribution sibling
  • Edit access to the contribution repo
  • An admin who can flip ChatSettings.codeCheckEnabled if it’s off

Steps

Step 1 What the [CODECHECK_N] directive does

When you tag a step with [CODECHECK_N], the platform renders a paste-code text area at the bottom of that step. The reader writes their attempted solution, hits Submit, and an LLM grades the answer against a reference solution you supply. The grader returns inline feedback — what the reader got right, what’s missing, and which hints to consider — without ever revealing the reference solution itself.

This sits between two extremes. Exact-string matching is too strict for real code (whitespace, variable names, equivalent constructs all vary). Skipping validation entirely teaches nothing. AI grading lands in the middle: the reader gets feedback shaped by your intent, not your literal characters.

The feature is gated by ChatSettings.codeCheckEnabled. If your platform admin has it off, the step renders normally and the paste area never appears. Readers see no broken UI; the directive is simply a no-op until enabled.

Step 2 The rules.vr block format
+
Step 3 A worked example
+
Step 4 Try it yourself
+
Step 5 Enabling code-check on your tutorial
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 5
1. What the [CODECHECK_N] directive does 2. The rules.vr block format 3. A worked example 4. Try it yourself 5. Enabling code-check on your tutorial

Learn more →