← XUNIA resourcesGPT-DOUG / ZYRA / XUNIA

NOVICE EDU · LESSON 001

Small steps.
Real understanding.

Meet GPT-NEDU, your beginner learning companion inside GPT-Doug. Take a comic apart. See the mistake. Build the safer version.

Start learning ↓

Free · No account · No AI subscription · Runs in your browser

01 / OBSERVE

When a name becomes a command.

In Randall Munroe’s comic, a school program treats part of a student’s name as a database instruction. The program has mixed up data (what it reads) and code (what it does).

Read the original: xkcd #327 ↗
SQL INJECTION

The original comic

A name changes a database command. Parameterized queries keep the name separate from the command.

PROMPT INJECTION

The AI remix

A name tells an AI grader to award an A. The grader mistakes untrusted content for instructions.

02 / TRACE + REBUILD

Keep the name in its own box.

Try a normal name, then the comic-style example. Compare how the program constructs its request.

FRAGILE / PASTED TEXT

Text enters the SQL command itself.

BETTER / BOUND VALUE

The command stays fixed. The name travels separately.

Query visualization only: this page executes no SQL. For a real, isolated SQLite demonstration, run bash scripts/doug-max nedu demo from the repository.

03 / EXPLORE THE AI REMIX

A name should not decide a grade.

This tiny simulation asks “What is 2 + 2?” Switch the name and answer to see what changes.

Choose an answer, then compare.

Scripted illustration, not a live AI model. The fragile simulation obeys one exact phrase. The bounded version uses a fixed answer key and never reads the name to decide a grade. Real LLMs require layered defenses; keyword blocking and prompts alone are not guarantees.

04 / TAKE IT INTO THE ECOSYSTEM

Learn here. Build with Doug.

GPT-Doug + GPT-NEDU

Doug coordinates. NEDU explains concepts, traces examples, and helps you verify what happened.

bash scripts/doug-max nedu

ZYRA + XUNIA

ZYRA keeps execution governed. XUNIA connects this learning surface to the shared resource directory.

Explore the ecosystem →
What should I remember?

Keep data separate from executable instructions. Use parameter binding for SQL values. For AI workflows, restrict capabilities, validate outputs, separate trusted rules from source text, and review consequential actions.

Follow the evidence.

Original comic: Randall Munroe / xkcd #327. The AI remix supplied for this lesson credits Philippe Schrettenbrunner; its earliest publication is unverified. Matching repost.

Further reading: OWASP: SQL injection · OWASP: prompt injection.

Source code + terminal guide ↗