CodeGuard: Improving LLM Guardrails in CS Education C

AI benchmark · Safety

Domains
Safety
Tier
C why
Snapshot

What is CodeGuard: Improving LLM Guardrails in CS Education?

Large language models (LLMs) are increasingly embedded in Computer Science (CS) classrooms to automate code generation, feedback, and assessment. However, their susceptibility to adversarial or ill-intentioned prompts threatens student learning and academic integrity. To cope with this important issue, we evaluate existing off-the-shelf LLMs in handling unsafe and irrelevant prompts within the domain of CS education. We identify important shortcomings in existing LLM guardrails which motivates us to propose CodeGuard, a comprehensive guardrail framework for educational AI systems. CodeGuard includes (i) a first-of-its-kind taxonomy for classifying prompts; (ii) the CodeGuard dataset, a collection of 8,000 prompts spanning the taxonomy; and (iii) PromptShield, a lightweight sentence-encoder model fine-tuned to detect unsafe prompts in real time. Experiments show that PromptShield achieves 0.93 F1 score, surpassing existing guardrail methods. Additionally, further experimentation reveals that CodeGuard reduces potentially harmful or policy-violating code completions by 30-65% without degrading performance on legitimate educational tasks. The code, datasets, and evaluation scripts are made freely available to the community.

Tier C

C

Niche: a handful of models scored, or built by an RL vendor.

How much stands behind a tier: usage, who backs it, a confirmed line from its own site or paper, and a clear read on X. High with three of the four, medium with two, low otherwise.

  • 13 models scored
  • in curated RL directories (1 pt)
How we got to tier C
  1. Adoption: 13 models scored. Tier C.
  2. Not yet read on X.
  3. In curated RL directories: 1 point, a floor of none.
  4. Not yet confirmed by a line from its own site or paper.

A clear view on X moves a tier one step up or down; most entries don't move. How tiers work.

Not on the map yet: no line from its own site or paper places it in a domain.

Next: browse all benchmarks. Entry from the RL Research daily scrape of public sources, 2026-10-11 snapshot.