Prompt Heist: I Built an Ancient-Kingdom Game That Teaches AI Security
说明与用途
Prompt Heist 是一款交互式 2D 游戏,通过让用户安全地练习提示注入和越狱攻击来教授 AI 安全,并提供将游戏机制与真实安全措施相连接的回顾。
问题
Prompt injection and jailbreaks are hard to grasp from slides.
结果
Prompt Heist provides an interactive, low‑risk environment for learning about prompt injection and jailbreaks, linking gameplay to concrete security lessons.
工作流
- Build a 2D game with React, Vite, and React Router.
- Create original art with inline SVG and CSS animation.
- Implement walk cycle with requestAnimationFrame along spline paths.
- Add a small API layer for a Python FastAPI backend and an open‑weight Gemma model via Ollama.
- Use a mock server with keyword rules to decide victory.
- Deploy locally with npm run dev and access at http://localhost:5173.
- Iterate by connecting a real FastAPI and Gemma backend, replacing emoji icons with SVG seals, and enabling adaptive boss learning from win history.
证据
Prompt injection and jailbreaks are hard to grasp from slides.
I built Prompt Heist for the Hacktoberfest Hack Day (Coimbatore x Init Club and Idea Club). It is a playable 2D ancient-fantasy adventure that teaches AI security by letting you try it, safely, against fictional guardians.
After every level, a short debrief explains why it worked and how a real system should defend against it.
React, Vite and React Router in plain JavaScript.
A small API layer is ready for a Python FastAPI backend and an open-weight Gemma model served through Ollama.
Victory is meant to be decided by the backend, never by the guard's own text. The prototype uses a mock server with simple keyword rules as a stand-in.
- 记录日期: 2026-10-08T10:40:56.080Z