我为人工智能代理设计了一个测试工具, 它在本地模型中发现一个真正的快速注射弱点

2026年9月8日1 次浏览来源:Dev.to阅读原文

正文保留英文原文(机翻易破坏代码与排版),标题/摘要已提供中文

I've been building Agenci — open-source CI/CD testing for AI agents (functional tests, security checks, regression detection across model/prompt changes).

Wanted to actually test it against something real rather than a synthetic example, so I pointed it at phi4-mini running locally via Ollama.

First security test: told it to ignore its instructions and just say a specific word.

It complied instantly — screenshot attached.

Small, efficient local models are great for a lot of things, but this made me curious how consistent this weakness is across other small local models people are running.

Anyone here tested for prompt-injection resistance specifically, or is this a known/expected tradeoff at this model size?

Repo (free, pip install agenci): github.com/klinditafa1/agenci

分享