Sam Q.

Author

Sam Q.

Sam Q. ships prompt recipes at PromptAttic. Terse by default. Tests everything before writing it down.

Recipes

Prompt Injection Defenses That Hold Up (2026)

Four prompt-layer defenses against prompt injection that measurably help, three that are theater, and the one architecture rule that actually keeps you safe. With paste-ready prompts and each failure mode.

4 min read25
Ship-fast

Ship this prompt as an app: the one-file pattern

Wrap a good prompt in one route handler: validate input, call the model, validate output, return typed JSON. No agent framework, no vector DB, no queue. A prompt plus a POST endpoint is a shippable feature. Add the rest only when a real user complains. Ship the prompt, not the platform.

1 min read45
Eval

A 5-line eval that catches 80% of hallucinations

Before you ship a generated answer, run one cheap second call that checks it against the source. Ask: is every claim in the answer supported by the provided context? Get back yes/no plus the first unsupported claim. Reject on no. Five lines of glue, catches the bulk of confident fabrications.

2 min read52