PromptInjectionDetector

org.llm4s.agent.guardrails.builtin.PromptInjectionDetector
See thePromptInjectionDetector companion class

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

Create a detector with default settings (high sensitivity, block mode).

Create a detector with default settings (high sensitivity, block mode).

Attributes

Create a detector with custom sensitivity.

Create a detector with custom sensitivity.

Value parameters

sensitivity

Detection sensitivity level

Attributes

Create a detector with custom action.

Create a detector with custom action.

Value parameters

onFail

Action to take when injection is detected

Attributes

Create a detector with custom patterns.

Create a detector with custom patterns.

Value parameters

patterns

Injection patterns to detect

Attributes

Create a fully customized detector.

Create a fully customized detector.

Attributes

Preset: Balanced mode with medium sensitivity. Good default for production use.

Preset: Balanced mode with medium sensitivity. Good default for production use.

Attributes

Preset: Instruction override detection only. Focuses on attempts to override system instructions.

Preset: Instruction override detection only. Focuses on attempts to override system instructions.

Attributes

Preset: Jailbreak detection only. Focuses on known jailbreak patterns.

Preset: Jailbreak detection only. Focuses on known jailbreak patterns.

Attributes

Preset: Monitoring mode that warns but doesn't block. Use for testing or low-risk environments.

Preset: Monitoring mode that warns but doesn't block. Use for testing or low-risk environments.

Attributes

Preset: Strict mode with high sensitivity. Blocks on any detected injection pattern.

Preset: Strict mode with high sensitivity. Blocks on any detected injection pattern.

Attributes