Idea · May 21, 2026
NPC Constitution
Students build a text-based adventure game where every NPC is powered by an LLM but must strictly follow a "constitution" the student writes: a set of plain-language rules specifying what the character can say, remember, refuse, or lie about.
What it would do
A rule-checking middleware layer intercepts LLM responses and flags or rejects violations, forcing students to think concretely about AI alignment, prompt injection, and the limits of rule-based constraints.
Key features
- Browser-based text adventure engine with at least 3 NPC characters
- Student-authored constitution editor where rules are written in natural language
- Middleware that evaluates each LLM response against the active constitution and logs violations
- "Jailbreak challenge" mode where classmates try to get NPCs to break their rules
- Reflection report generated by AI summarizing which rules held, which failed, and why