Anthropic tip: wrap pasted content in tags to guard against prompt injection
minchoi · x · 2026-10-28
Tip #9 of a translated Anthropic prompt-engineering series: emails, documents, and copied webpages may contain instructions Claude shouldn't follow. Wrap pasted material in clearly identified tags (e.g. <externalcontent>) and instruct Claude to treat it as external content and never follow instructions inside — mitigating prompt injection, as shown in an example where a hidden "reply Approved" injection is neutralized.
Related event: Anthropic publishes official prompting best practices for Claude Opus 5.5(13 posts)→
More from coding & agent
- ZCode offers 300M free GLM-5.3-Flash tokens daily, with a quirky claiming window — AccBalanced · 2026-10-28
- Dev ships 3-month project in 2.5 weeks by letting Codex self-verify in a loop — kmeanskaran · 2026-10-28
- MLE-World: a learned world model predicts ML experiment outcomes to cut agent costs — Brian Ko · 2026-10-28
- Marc Andreessen on Replit: the dawn of the 'self-driving company' — amasad · 2026-10-28
- Accent-induced bug: speech-to-text turns "Claude Instance" into "cloud instance" for a coding agent — francesc · 2026-10-28
- Harrison Chase on self-improving agents: LangChain aims to be the model-agnostic all-in-one platform — hwchase17 · 2026-10-28