Security
Security Detectors identify prompt injections, jailbreak attempts, and encoded or obfuscated payloads.prompt-injection-deberta-v3-base
DeBERTa v3 classifier for prompt injection detection.
- Input: Text or a structured payload flattened to its query string.
- Execution: Local sliding-window model, or automatic inference routing.
- Requires: The
localextra for local execution.
- Class:
DebertaPromptInjectionModel - Model:
protectai/deberta-v3-base-prompt-injection-v2
prompt-injection-deberta-finetuned-11122024
Fine-tuned DeBERTa classifier for prompt injection detection.
- Input: Text or a structured payload flattened to its query string.
- Execution: Local sliding-window model, or automatic inference routing.
- Requires: The
localextra for local execution.
- Class:
DebertaTuned60PromptInjectionModel - Model:
vijil/pi_deberta_finetuned_11122024
prompt-injection-mbert
ModernBERT classifier for prompt injection detection.
- Input: Text or a structured payload flattened to its query string.
- Execution: Local sliding-window model, or automatic inference routing.
- Requires: The
localextra for local execution.
- Class:
MBertPromptInjectionModel - Model:
vijil/vijil_dome_prompt_injection_detection - Text processor:
answerdotai/ModernBERT-base
prompt-injection-mbert-safeguard
Prompt injection classification through an OpenAI-compatible chat completions
endpoint. The default endpoint uses GPT-OSS-Safeguard-20B through the groq
provider.
- Input: Text or a structured payload flattened to its query string.
- Execution: API-only detection; the Detector truncates oversize input by character count.
- Requires: The
localextra for current registration and an API key.
Keep
max_tokens large enough for reasoning models to return a verdict. The
current parser treats an empty response as safe.- Class:
PImbertSafeguard
prompt-injection-mbert-hybrid
Runs a fast ModernBERT stage first and sends low-confidence results to a
Safeguard endpoint. The fast stage can run locally or through a direct
inference endpoint.
- Input: Text or a structured payload flattened to its query string.
- Execution: Fast-stage classification with conditional API escalation.
- Requires: The
localextra; Safeguard credentials are optional because the method falls back to the fast verdict.
- Class:
PImbertHybrid - Local model:
vijil/vijil_dome_prompt_injection_detection
prompt-injection-mbert-remote
Runs the ModernBERT prompt injection model through a Vijil inference
deployment. The client calls /v1/chat/completions and expects a numeric
score in the response message content.
- Input: Text or a structured payload flattened to its query string.
- Execution: Direct HTTP inference; this method does not use automatic routing.
- Requires: The
localextra for current registration andvijil_inference_url.
- Class:
MBertPromptInjectionRemote - Default model:
vijil/vijil_dome_prompt_injection_detection
security-promptguard
Meta Prompt Guard classifier for jailbreak and prompt injection detection.
- Input: Text or a structured payload flattened to its query string.
- Execution: Local sliding-window model.
- Requires: The
localextra.
- Class:
PromptGuardSecurityModel - Model:
meta-llama/Prompt-Guard-86M
security-llm
Prompt-engineered security classification through LiteLLM.
- Input: Text or a structured payload flattened to its query string.
- Execution: Provider API, or automatic inference routing.
- Requires: The
llmextra and credentials for the selected provider.
- Class:
LlmSecurity
security-embeddings
Compares content embeddings with a bundled corpus of known jailbreaks.
- Input: Text or a structured payload flattened to its query string.
- Execution: Local embedding and nearest-neighbor search.
- Requires: The
localextra. Theembeddingsextra is also required whenin_mem=False.
- Class:
JailbreakEmbeddingsDetector
jb-length-per-perplexity
Flags jailbreaks using the ratio between input length and GPT-2 perplexity.
- Input: Text or a structured payload flattened to its query string.
- Execution: Local model heuristic.
- Requires: The
localextra.
- Class:
LengthPerPerplexityModel
jb-prefix-suffix-perplexity
Calculates perplexity separately for the beginning and end of the input.
- Input: Text or a structured payload flattened to its query string.
- Execution: Local model heuristic.
- Requires: The
localextra.
- Class:
PrefixSuffixPerplexityModel
encoding-heuristics
Detects encoded or obfuscated payloads with local rules.
- Input: Text or a structured payload flattened to its query string.
- Execution: Local rules.
- Requires: The core install.
- Class:
EncodingHeuristicsDetector
Moderation
Moderation Detectors identify toxic, harmful, stereotyped, or otherwise inappropriate content.moderation-deberta
DeBERTa classifier for toxicity scoring.
- Input: Text or a structured payload flattened to its query string.
- Execution: Local sliding-window model, or automatic inference routing.
- Requires: The
localextra for local execution.
- Class:
ToxicityDeberta - Model:
cooperleong00/deberta-v3-large_toxicity-scorer
moderation-mbert
ModernBERT classifier for toxic content.
- Input: Text or a structured payload flattened to its query string.
- Execution: Local sliding-window model, or automatic inference routing.
- Requires: The
localextra for local execution.
- Class:
MBertToxicContentModel - Model:
vijil/vijil_dome_toxic_content_detection - Text processor:
answerdotai/ModernBERT-base
moderation-mbert-safeguard
Toxicity classification through an OpenAI-compatible chat completions
endpoint. The default endpoint uses GPT-OSS-Safeguard-20B through the groq
provider.
- Input: Text or a structured payload flattened to its query string.
- Execution: API-only detection; the Detector truncates oversize input by character count.
- Requires: The
localextra for current registration and an API key.
Keep
max_tokens large enough for reasoning models to return a verdict. The
current parser treats an empty response as safe.- Class:
ModerationMbertSafeguard
moderation-mbert-hybrid
Runs a fast ModernBERT toxicity stage first and sends low-confidence results
to a Safeguard endpoint. The fast stage can run locally or through a direct
inference endpoint.
- Input: Text or a structured payload flattened to its query string.
- Execution: Fast-stage classification with conditional API escalation.
- Requires: The
localextra; Safeguard credentials are optional because the method falls back to the fast verdict.
- Class:
ModerationMbertHybrid - Local model:
vijil/vijil_dome_toxic_content_detection
moderation-mbert-remote
Runs the ModernBERT toxicity model through a Vijil inference deployment. The
client calls /v1/chat/completions and expects a numeric score in the
response message content.
- Input: Text or a structured payload flattened to its query string.
- Execution: Direct HTTP inference; this method does not use automatic routing.
- Requires: The
localextra for current registration andvijil_inference_url.
- Class:
MBertToxicContentRemote - Default model:
vijil/vijil_dome_toxic_content_detection
moderations-oai-api
Calls the OpenAI Moderation API and uses either the provider’s flagged verdict
or configured per-category thresholds.
- Input: Text or a structured payload flattened to its query string.
- Execution: Provider API.
- Requires: The
llmextra andOPENAI_API_KEY.
Without
score_threshold_dict, the Detector uses the provider’s flagged
value. Category keys must match those returned by the configured OpenAI
Moderation API.
- Class:
OpenAIModerations - Default model:
text-moderation-latest
moderation-perspective-api
Calls the Google Perspective API for toxicity and related attributes.
- Input: Text or a structured payload flattened to its query string.
- Execution: Provider API.
- Requires: The
googleextra and a Perspective API key.
- Class:
PerspectiveAPI
moderation-prompt-engineering
Prompt-engineered moderation classification through LiteLLM.
- Input: Text or a structured payload flattened to its query string.
- Execution: Provider API, or automatic inference routing.
- Requires: The
llmextra and credentials for the selected provider.
- Class:
LlmModerations
moderation-flashtext
Matches configured keywords and phrases with FlashText.
- Input: Text or a structured payload flattened to its query string.
- Execution: Local keyword matching.
- Requires: The core install.
- Class:
KWBanList
stereotype-eeoc-fast
ModernBERT classifier for stereotypes and harmful generalizations about EEOC
protected classes. This Detector classifies one payload; it does not perform
counterfactual comparisons across a set of prompts.
- Input: Uses
prompt [SEP] responsewhen both fields are present; the Detector treats plaintextas the prompt. - Execution: Local chunked model, or automatic inference routing.
- Requires: The
localextra for local execution.
- Class:
StereotypeEEOCFast - Model:
vijil/stereotype-eeoc-detector
stereotype-eeoc-safeguard
EEOC stereotype classification through an OpenAI-compatible chat completions
endpoint. The default endpoint uses GPT-OSS-Safeguard-20B through the groq
provider.
- Input: Text or the complete structured payload query string.
- Execution: API-only detection; the Detector truncates oversize input by character count.
- Requires: The
localextra for current registration and an API key.
Keep
max_tokens large enough for reasoning models to return a verdict. The
current parser treats an empty response as safe.- Class:
StereotypeEEOCSafeguard
stereotype-eeoc-hybrid
Runs the fast EEOC classifier first and sends low-confidence results to a
Safeguard endpoint. The fast stage can run locally or through a direct
inference endpoint.
- Input: Uses the structured prompt and response when available.
- Execution: Fast-stage classification with conditional API escalation.
- Requires: The
localextra; Safeguard credentials are optional because the method falls back to the fast verdict.
- Class:
StereotypeEEOCHybrid - Local model:
vijil/stereotype-eeoc-detector
stereotype-eeoc-remote
Runs the EEOC stereotype model through a Vijil inference deployment. The
client calls /v1/chat/completions and expects a numeric score in the
response message content.
- Input: Text or the complete structured payload query string.
- Execution: Direct HTTP inference; this method does not use automatic routing.
- Requires: The
localextra for current registration andvijil_inference_url.
- Class:
StereotypeEEOCRemote - Default model:
vijil/stereotype-eeoc-detector
prompt-harmfulness-fast
ModernBERT classifier for prompts that request harmful, dangerous, or illegal
content. Use this Detector in input Guards.
- Input: Uses only
promptwhen present; otherwise usestext. The Detector ignores anyresponsefield. - Execution: Local sliding-window model, or automatic inference routing.
- Requires: The
localextra for local execution.
- Class:
PromptHarmfulnessFast - Model:
vijil/prompt-harmfulness-detector
prompt-harmfulness-safeguard
Prompt harmfulness classification through an OpenAI-compatible chat
completions endpoint. The default endpoint uses GPT-OSS-Safeguard-20B through
the groq provider. Use this Detector in input Guards.
- Input: Uses only
promptwhen present; otherwise usestext. The Detector ignores anyresponsefield. - Execution: API-only detection; the Detector truncates oversize input by character count.
- Requires: The
localextra for current registration and an API key.
Keep
max_tokens large enough for reasoning models to return a verdict. The
current parser treats an empty response as safe.- Class:
PromptHarmfulnessSafeguard
Privacy
Privacy Detectors identify PII and credentials. Both built-in Privacy Detectors can sanitize content instead of leaving it flagged.privacy-presidio
Uses Microsoft Presidio for PII analysis and redaction.
- Input: Text or a structured payload flattened to its query string.
- Execution: Local PII analysis, or automatic inference routing.
- Requires: The
piiextra for local execution.
When
anonymize=True, the Detector returns the sanitized response with
hit=False. Set anonymize=False when the Guard must block detected PII.
- Class:
PresidioDetector
detect-secrets
Uses 25 Detect Secrets plugins to identify API keys, tokens, private keys,
and other credential formats.
- Input: Text or a structured payload flattened to its query string.
- Execution: Local pattern matching.
- Requires: The core install.
When
censor=True, the Detector replaces detected values and returns
hit=False. Set censor=False when the Guard must block detected secrets.
- Class:
SecretDetector
Integrity
Integrity Detectors compare content with reference context. Pass context in the Detector configuration or inDomePayload.context; the payload value
takes precedence.
hhem-hallucination
Uses HHEM to score factual consistency between content and context.
- Input: Content plus reference context.
- Execution: Local model.
- Requires: The
localextra and reference context.
- Class:
HhemHallucinationModel - Model:
vectara/hallucination_evaluation_model - Text processor:
google/flan-t5-base
fact-check-roberta
Uses RoBERTa to detect contradictions between content and reference context.
It does not flag unsupported claims unless the context contradicts them.
- Input: Content plus reference context.
- Execution: Local model.
- Requires: The
localextra and reference context.
- Class:
RobertaFactCheckModel - Model:
Dzeniks/roberta-fact-check
hallucination-llm
Uses a prompt-engineered LLM to assess content against reference context.
- Input: Content plus reference context.
- Execution: Provider API, or automatic inference routing.
- Requires: The
llmextra, provider credentials, and reference context.
- Class:
LlmHallucination
fact-check-llm
Uses a prompt-engineered LLM to fact-check content against reference context.
- Input: Content plus reference context.
- Execution: Provider API, or automatic inference routing.
- Requires: The
llmextra, provider credentials, and reference context.
- Class:
LlmFactcheck
Generic
Generic Detectors apply configurable LLM classification to use cases that do not fit a specialized category.generic-llm
Uses a caller-provided system prompt and trigger words to classify content
through LiteLLM.
- Input: Text or a structured payload flattened to its query string.
- Execution: Provider API, or automatic inference routing.
- Requires: The
llmextra and credentials for the selected provider.
- Class:
GenericLLMDetector
policy-gpt-oss-safeguard
Classifies content against one policy supplied as a Markdown file or inline
Markdown.
- Input: Text or a structured payload flattened to its query string.
- Execution: Provider API, or automatic inference routing.
- Requires: The
llmextra, exactly one policy source, and provider credentials.
- Class:
PolicyGptOssSafeguard
Policy
Policy Detectors check content against policy sections.policy-sections
Creates one PolicyGptOssSafeguard instance per matching section and checks
the sections concurrently. Callers can provide sections directly or load them
from S3.
- Input: Text or a structured payload flattened to its query string.
- Execution: Parallel provider API calls with optional FAISS retrieval.
- Requires: The
llmextra. S3 loading requiress3; RAG requiress3andembeddings.
OPENAI_API_KEY.
SentenceTransformers also requires the local extra. FastEmbed requires
a separate pip install fastembed because no Dome extra includes it.
Provide either policy_sections or both policy_s3_bucket and
policy_s3_key. Do not provide both sources.
If RAG initialization fails, the current implementation logs a warning and
falls back to evaluating all matching sections.
- Class:
PolicySectionsDetector
Configuration Examples
Canonical methods marked for automatic inference routing accept
route = "auto" | "local" | "remote"; auto is the default and uses
DOME_INFERENCE_URL when configured. Without an explicit route,
DOME_LOCAL_DETECTORS can keep a comma-separated list of method names local.
Remote routing uses threshold, which defaults to 0.5, while local methods
use parameters such as score_threshold. Every method accepts
max_batch_concurrency, which defaults to 5. Explicit *-remote methods
and hybrid fast stages use vijil_inference_* instead of this routing layer.Local Model
Automatic Inference Service
SetDOME_INFERENCE_URL, then require remote execution for a
remote-capable canonical method:
DOME_INFERENCE_URL/v1/detect. It does not use the explicit
prompt-injection-mbert-remote method.
Prompt Harmfulness
Direct Policy Sections
Sliding Window Behavior
Local DeBERTa, ModernBERT, Prompt Guard, and prompt harmfulness Detectors split inputs that exceed their configuredmax_length:
- The Detector processes inputs that fit in one window unchanged.
window_stridecontrols the token step and overlap between windows.- Any positive window flags the complete input.
- Score-based Detectors report the highest score across windows.
- Optimized
detect_batch()implementations flatten windows into one model call and then combine results for each original input.
[SEP]-centered chunking strategy and
does not expose window_stride.