Skip to main content
Content‑security detectors are the LLM‑aware core of TrustGuard: they score prompts and model output for jailbreaks, toxicity, and off‑topic/disallowed content, and analyze documents and URLs. Several call the NeuralTrust Firewall; its credentials are configured globally (env) or overridden per‑detector under settings.credentials. All of these are detection‑only — the action (Monitor / Block) and evaluation phase (Input / Output) are set on the policy rule that references the detector.
DetectorSlugSidesProtocolsBackend
Prompt Guardprompt_guardinput, outputallNeuralTrust Firewall
Toxicitytoxicityinput, outputallNeuralTrust Firewall
Prompt Moderationprompt_moderationinput, outputallkeyword/regex + NeuralTrust topics
URL Analyzerurl_analyzerinputllm, mcpfetch + NeuralTrust Firewall
Document Analyzerdoc_analyzerinputllmextract/OCR + PII + Firewall
Multi‑turn Guardmultiturn_guardinputallStateful (per session)

Prompt Guard — prompt_guard

Scores input/output with the NeuralTrust Firewall jailbreak detector and reports a finding (signal.type: "jailbreak") above a threshold. Sensitivity 1–4 (default 2).
FieldTypeRequiredNotes
jailbreak.thresholdnumberScore in [0, 1] above which content is flagged.
credentials.{base_url,token,openai_api_key}stringOverride global firewall creds.

Toxicity — toxicity

Scores content with the NeuralTrust Firewall toxicity detector and reports a finding above threshold. The signal.type is the firewall category that scored highest (e.g. hate, violence, harassment, self_harm, sexual).
FieldTypeRequiredNotes
toxicity.thresholdnumberScore in [0, 1].
credentials.*objectOverride global firewall creds.

Prompt Moderation — prompt_moderation

Dual‑mode moderation — enable at least one mode.
FieldTypeDefaultNotes
keyreg_moderation.enabledbooleanfalseKeyword/regex matching (signal.type: "keyreg").
keyreg_moderation.keywordsarray<string>
keyreg_moderation.regexarray<string>Each must compile.
keyreg_moderation.similarity_thresholdnumber0.8
nt_topic_moderation.enabledbooleanfalseNeuralTrust topic probability (signal.type: "nt_topic").
nt_topic_moderation.topicsarray<string>
nt_topic_moderation.thresholdsmap<string, number>Per‑topic threshold.

URL Analyzer — url_analyzer

Extracts URLs from content, fetches each page (SSRF‑guarded, size/timeout‑bounded, up to 10 URLs per request), and screens the fetched text for jailbreaks and PII.
FieldTypeDefaultNotes
thresholdnumber0.7Jailbreak score threshold.
url.timeoutinteger20000Milliseconds.
url.max_content_sizeinteger1048576Bytes (1 MiB).
url.allowed_domains / url.blocked_domainsarray<string>Allow/deny lists.
pii.entitiesarray<enum>PII entities to check in fetched content.

Document Analyzer — doc_analyzer

Extracts text from uploaded documents (PDF, Office, images via OCR, plain text) sent as payload.attachments, then screens for PII and (optionally) jailbreaks.
FieldTypeDefaultNotes
max_file_sizeinteger52428800 (50 MiB)Bytes.
entitiesarray<enum>PII entities to detect.
firewall.enabledbooleanfalseJailbreak screening of extracted text.
firewall.thresholdnumber0.7
ocr.enabledbooleanfalseOCR for images/scans (requires the OCR build).
ocr.languagesarray<string>Tesseract language codes.

Multi‑turn Guard — multiturn_guard

Records conversation turns keyed on session_id and evaluates the incoming turn against accumulated history — catching jailbreaks that build up gradually across turns rather than in a single message (signal.type: "multiturn_attack"). Pass a stable session_id on the guard request.
FieldTypeDefaultNotes
session_ttlinteger3600Seconds to retain session state.
retention_periodintegerSeconds; malicious‑counter TTL.
thresholdnumber0.7Score in [0, 1].
multiturn_guard is functional but hidden from the catalog picker by default, and it depends on Redis and the session‑analysis worker. Contact NeuralTrust to enable it for your team.

When to use

  • prompt_guard is the baseline jailbreak defense; add multiturn_guard for chat where attacks unfold over turns.
  • url_analyzer / doc_analyzer for RAG and agent flows that ingest links/files.
  • toxicity on input and/or output for abuse and safety.
  • prompt_moderation for topic/scope control (“only answer about X”).