PalveronPalveronDocs

Neural Governance Engine

Run local ONNX inference for personal-data, injection, and intent detection, inside the gateway.

The Neural Governance Engine (NGE) is Palveron's local inference layer. Five ONNX models run inside the gateway; in nge_fallback mode only borderline cases escalate to an external LLM, and in nge_local mode the cloud LLM is never called.

Prompt → NGE pipeline (5 stages) → Decision
            1. Regex            fast, deterministic
            2. Aho-Corasick     multi-keyword matching
            3. ONNX NER         entity extraction
            4. NLI Contextual   semantic intent scoring
            5. LLM-Assist       escalate borderline only

What NGE detects

SignalSource stageUse case
Structured personal data (SSN, IBAN, credit card, email, phone)RegexStrict, low-false-positive masking
Brand-specific keywords, custom denylistsAho-CorasickInternal product names, blocked phrases
Named entities: PERSON, ORG, LOC, EMAIL, SECRET, INJECTIONONNX NER × 2Context-aware personal-data detection beyond regex
Intent classification: injection, off_topic, pii_densityNLI ContextualCatches paraphrased malicious intent
Edge casesLLM-AssistLast-resort cloud escalation for low-confidence local results

There is no toxicity scoring. The toxicity model is not part of the product and is never loaded, so there are no measured toxicity scores: the field nge_toxicity_score is 0 on every NGE trace and is not a measurement.

Engine modes

Configure under Settings → Security → Neural Governance Engine:

ModeBehaviorWhen to use
nge_localLocal models only; never calls the cloud LLMEU data residency, zero-egress; foundation for air-gapped deployment (on the roadmap)
nge_fallback (default)Local-first; borderline cases escalate to LLMMost customers: best balance
llm_onlySkip local, always call cloud LLMBenchmarking accuracy upper bound

In nge_fallback mode only a borderline case escalates to an external LLM; nge_local never calls a cloud LLM. The actual share of locally decided requests and the mean latency depend on your traffic and are computed per project from the recorded traces (NGE statistics in the dashboard).

Thresholds

The NGE stage thresholds are vendor-tuned and not configurable per project or per policy. Granularity comes from per-policy enforcement actions (BLOCK, APPROVAL, ANONYMIZE, FLAG).

Test mode

You find the switch Enable test mode under Settings → Analysis → Palveron Analyze (analysis mode nge_shadow). Test mode is a comparison mode, not a dry run without consequences:

  • Fixed rules and baseline protection enforce as in every other mode. What they block, mask or send for approval is blocked, masked or sent for approval in test mode too.
  • Unless fixed rules or baseline protection already block the request, an external AI model checks your rules in words. Its result can only make the outcome stricter, never milder. For this the request goes to an external AI model, provided an AI provider is set up. The model receives the text of the request, never the content of a file; a request with files only does not go to the model. Rules that only observe or only log are not sent to the model.
  • Without an AI provider set up, nothing goes to an external AI model. A request that is not already blocked can then end with the notice that the AI provider is not set up.
  • The local model evaluates the request alongside for comparison and decides nothing. In the Trace Explorer the trace shows whether the local and the external model reached the same decision.
  • What was not evaluated is recorded with its reason in the trace.

Use test mode to compare, before switching the analysis mode, how the local and the external model judge your rules in words. Switch it off in the same place; the analysis mode Balanced then applies.

Reading NGE results in traces

Open any trace in the Trace Explorer. NGE-driven traces include:

  • Engine badge: shows the recorded provenance of the analysis, not the configured project mode: Local only (nge_local), Local, model involved (nge_fallback), External (external_llm), or Not recorded (not_recorded)
  • Confidence bars: per NLI dimension (injection, off_topic, pii_density) with the active threshold line
  • Entity highlights: color-coded inline annotations on the prompt (PII, SECRET, INJECTION)
  • Latency: the total NGE-analysis runtime recorded on the trace

Where the NGE analysis surfaces

The verify response carries the decision and the (possibly masked) output. Per-model scores, detected entities, and match details are recorded on the trace, not in the HTTP response. Inspect them in the dashboard's Trace Explorer (NGE breakdown with confidence bars) or fetch the trace via the Traces API.

See api/verify for the full response schema.

Languages

NGE processes English and German prompts; the gateway's language detector determines a prompt's language automatically. There is no separate activation of individual language packs.

Self-hosted considerations

On self-hosted deployments, the NGE_MODELS_DIR environment variable sets the model directory (default ./models/nge):

NGE_MODELS_DIR=/app/models/nge

The ONNX models are distributed separately and mounted into this directory. Choose the analysis mode per project under Settings → Security → Neural Governance Engine, not through an environment variable.

NGE scores are assistance signals, not legal verdicts. They inform the policy engine; the policy engine still owns the final decision. Treat them like a smoke alarm: informative, but the firefighter (your policy) decides what to do.

On this page