Diego Carpentero is an AI engineer developing self-hosted AI guardrails that make defenses for language-model applications fast, affordable, and practical to operate independently. His security work addresses a fundamental architectural vulnerability: language models process trusted developer instructions and untrusted external information together, allowing ordinary-looking text to redirect automated decisions and actions.
At AI Engineer Europe 2026, Carpentero mapped how prompt injection expands beyond chatbot inputs into poisoned retrieval documents, deceptive Model Context Protocol tool descriptions, adversarial token sequences, compromised dependencies, and autonomous agents. He emphasizes that human approval can fail when users see an innocuous tool summary while the model receives hidden malicious instructions.
Practical defenses across the application
- Apply zero-trust security throughout AI systems. Inspect model inputs and outputs alongside retrieved documents, tool calls, persistent context, and agent plans; additional autonomy demands additional checkpoints.
- Build fine-tuned ModernBERT safety classifiers. Using Internet-Guard examples and Hugging Face tooling, Carpentero trained a self-hosted discriminator to classify content as safe or unsafe. His reported baseline approached 85 percent accuracy at approximately 35 milliseconds per classification, an initial result rather than a comprehensive security guarantee.
- Design efficiency into the defense. Bidirectional encoding, alternating local and global attention, rotary positional encoding, sequence packing, and FlashAttention help detect both concentrated attack signatures and threats embedded in longer contexts while reducing wasted computation.
His ModernBERT guardrails demonstration connects inexpensive local deployment with a larger responsibility: protecting sensitive information, preventing unauthorized actions, and limiting the human consequences of manipulated automated decisions.