-
Notifications
You must be signed in to change notification settings - Fork 29
Description
We have generally made the observation that shortening any web-exposed text consumed by an agent reduces an attacker's ability to run prompt injection attacks (or, phrased differently, dramatically shrinks the total universe of injections available to an attacker). This doesn't fully solve for prompt injection but complements other means of defense such as classifiers or supervisor / critic models.
Anecdotally, there is also a cutoff at which long elaborate prompts tend to confuse models more than help them from a quality perspective, and the added instruction set of many available tools could contribute to a bloated model context.
I'm not sure if there's any published research on this yet, at least I haven't read any, and this is based on practical red teaming experience. Nonetheless, we should consider this at the design phase for WebMCP, since it would be very hard to implement such a restriction retroactively (and if research would disprove my experience, extending the maximum length is trivial).
Can we find some conservative maximum character length for all developer-provided inputs such as tool name, description, property names / descriptions, etc.?