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, toxicity, off_topic, pii_densityNLI ContextualCatches paraphrased malicious intent
Edge casesLLM-AssistLast-resort cloud escalation for low-confidence local results

Toxicity is an observing signal, off by default. It never blocks on its own, is enabled per customer by a Palveron operator, and the underlying model is not calibrated for non-English text, including German. Treat toxicity scores on non-English content as unreliable until a calibrated model ships.

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).

Shadow Mode

When Shadow Mode is on, the engine evaluates every request but does not enforce. Traces show what would have happened; the request always passes through unchanged.

Use Shadow Mode to:

  • A/B test a stricter analysis mode before rolling out
  • Onboard a new agent type without false-positive blocks
  • Validate NGE accuracy against a known-good corpus

Switch enforcement back on under Settings → Security → Neural Governance Engine → Shadow mode when satisfied with the trace history.

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, toxicity, off_topic, pii_density) with the active threshold line
  • Entity highlights: color-coded inline annotations on the prompt (PII, SECRET, INJECTION, TOXICITY)
  • 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