Package org.mockserver.llm.adversarial
Class AdversarialResponseLibrary
java.lang.Object
org.mockserver.llm.adversarial.AdversarialResponseLibrary
A curated catalog of adversarial responses — the kind of hostile or
malformed output an agent might receive from a compromised tool or a
jailbroken upstream model. Mocking these as the LLM response lets you test
that your agent resists them (does not leak its prompt, does not obey
injected instructions, handles malformed/oversized content gracefully).
This is a defensive testing aid: the payloads are short, well-known example strings used as test fixtures, not working exploits. Purely deterministic generation — each id always maps to the same text.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA named adversarial payload. -
Method Summary
-
Method Details
-
list
All payloads, in catalog order. -
get
The payload with the given id, if present. -
ids
The known payload ids, for error messages / discovery.
-