Skip to content

feat: Prompt Judge with DeepSeek AI + token management + safety filter#28

Open
Zero-Tom-cmp wants to merge 1 commit into
hznuoj-dev:masterfrom
Zero-Tom-cmp:prompt-judge
Open

feat: Prompt Judge with DeepSeek AI + token management + safety filter#28
Zero-Tom-cmp wants to merge 1 commit into
hznuoj-dev:masterfrom
Zero-Tom-cmp:prompt-judge

Conversation

@Zero-Tom-cmp

Copy link
Copy Markdown

Summary

Adds Prompt Judge problem type enabling AI-powered code generation via DeepSeek API, plus token management and content safety features.

New Features

  • Prompt Judge: Students submit natural language prompts, DeepSeek generates Python 3 code, scored on correctness + conciseness
  • Token Management: Per-submission cap, cumulative quota, usage statistics dashboard
  • Content Safety: URL/code/spam detection, admin-configurable regex, AI output dangerous ops filter

Files Changed (23 files, +2472/-227)

  • New: prompt_judge.inc.php, deepseek_client.php, mini_judged, 30-mini-judged.sh
  • Modified: submit.php, admin pages, templates, Docker scripts, DB migrations

Database Migration

Execute new entries in scripts/db_change.sql (new columns on problem/more_settings, new prompt_submission table).

Configuration

Set via static.php or Docker env: DEEPSEEK_API_KEY, DEEPSEEK_MODEL

- New Prompt Judge problem type with DeepSeek API code generation
- Token usage management (per-submission cap, total quota, statistics)
- Prompt content validation (URL/code/spam detection, custom regex)
- AI output safety filter (dangerous ops detection, sensitive words)
- Bug fixes (transaction protection, score auto-update, quota race fix, data cleanup)
- Docker healthcheck covers judge daemon

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant