Skip to main content

Semantic Configuration

The Semantic section configures Synentra's optional semantic intent analysis engine.

Unlike deterministic policy evaluation, semantic analysis uses machine learning to understand the intent behind free-form prompts and requests. This enables Synentra to identify malicious, unsafe, or out-of-scope requests even when they do not match explicit policy rules.

Semantic analysis can use either:

  • the built-in ONNX/BERT model (recommended for offline deployments), or
  • an external Large Language Model (LLM) such as OpenAI, Azure AI, Google Gemini, or Ollama.

When disabled, only deterministic policy evaluation is performed.


Properties

PropertyTypeDefaultDescription
Enabledbool?falseEnables or disables semantic intent analysis.
ConfidenceThresholddouble?0.7Minimum confidence score (0–1) required before Synentra trusts the classification result.
AllowLowConfidencebool?falseWhether requests with confidence below ConfidenceThreshold are allowed.
DefaultProviderstring"Internal"Active provider. Supported values: Internal, OpenAi, AzureAi, Gemini, Ollama.

Providers

The provider selected by DefaultProvider determines which model performs semantic analysis.

{
"Semantic": {
"Enabled": true,
"DefaultProvider": "Internal"
}
}

Internal (ONNX)

The Internal provider performs semantic classification completely offline using a bundled ONNX BERT model.

No external network calls are made, making it suitable for air-gapped and privacy-sensitive deployments.

Properties

PropertyTypeDefaultDescription
ModelTypestring"Community"Model package type. Supported values: Community or Pro.
PackagePathstring?nullAbsolute path to the ONNX model package ZIP. If omitted, Synentra uses the bundled model.
LicensePathstring?nullAbsolute path to the Pro license file. Required only when ModelType is Pro.
MaxLengthint?128Maximum number of tokens processed from the input text.

Example

{
"Semantic": {
"Enabled": true,
"DefaultProvider": "Internal",
"Providers": {
"Internal": {
"ModelType": "Community",
"PackagePath": "models/community-model.zip",
"MaxLength": 128
}
}
}
}

Pro Model Example

{
"Semantic": {
"Enabled": true,
"DefaultProvider": "Internal",
"Providers": {
"Internal": {
"ModelType": "Pro",
"PackagePath": "models/pro-model.zip",
"LicensePath": "/opt/synentra/licenses/license.json"
}
}
}
}

OpenAI

Uses an OpenAI chat model to perform semantic classification.

Properties

PropertyTypeDefaultDescription
ApiKeystring""OpenAI API key.
Modelstring"gpt-4o-mini"OpenAI model identifier.
Temperaturedouble?0.0Sampling temperature. Lower values produce more deterministic classifications.
MaxTokensint?256Maximum number of output tokens generated by the model.

Example

{
"Semantic": {
"Enabled": true,
"DefaultProvider": "OpenAi",
"Providers": {
"OpenAi": {
"ApiKey": "sk-...",
"Model": "gpt-4o-mini",
"Temperature": 0,
"MaxTokens": 256
}
}
}
}

Azure AI

Uses an Azure OpenAI deployment.

Properties

PropertyTypeDefaultDescription
Endpointstring""Azure OpenAI endpoint.
ApiKeystring""Azure API key.
Modelstring"gpt-4o-mini"Azure deployment/model name.
Temperaturedouble?0.0Sampling temperature.
MaxTokensint?256Maximum generated tokens.

Example

{
"Semantic": {
"Enabled": true,
"DefaultProvider": "AzureAi",
"Providers": {
"AzureAi": {
"Endpoint": "https://my-resource.openai.azure.com/",
"ApiKey": "...",
"Model": "gpt-4o-mini",
"Temperature": 0,
"MaxTokens": 256
}
}
}
}

Google Gemini

Uses Google's Gemini models for semantic classification.

Properties

PropertyTypeDefaultDescription
ApiKeystring""Gemini API key.
Modelstring"gemini-2.0-flash"Gemini model identifier.
Temperaturedouble?0.0Sampling temperature.
MaxTokensint?256Maximum generated tokens.

Example

{
"Semantic": {
"Enabled": true,
"DefaultProvider": "Gemini",
"Providers": {
"Gemini": {
"ApiKey": "...",
"Model": "gemini-2.0-flash",
"Temperature": 0,
"MaxTokens": 256
}
}
}
}

Ollama

Uses a locally hosted Ollama server.

Properties

PropertyTypeDefaultDescription
Endpointstring"http://localhost:11434"Ollama server endpoint.
Modelstring"llama3.2"Local model name available in Ollama.

Example

{
"Semantic": {
"Enabled": true,
"DefaultProvider": "Ollama",
"Providers": {
"Ollama": {
"Endpoint": "http://localhost:11434",
"Model": "llama3.2"
}
}
}
}

Confidence Threshold

Every semantic provider returns:

  • a classification
  • a confidence score between 0 and 1

Synentra compares the returned confidence against ConfidenceThreshold.

ConfidenceResult
≥ thresholdThe semantic verdict is trusted.
< threshold + AllowLowConfidence = trueThe request continues despite low confidence.
< threshold + AllowLowConfidence = falseThe request is rejected or escalated according to the configured enforcement pipeline.

Evaluation Pipeline

When semantic analysis is enabled, Synentra performs the following steps:

  1. Receives the proxied request.
  2. Extracts relevant text from the request.
  3. Sends the text to the configured semantic provider.
  4. Receives the predicted intent and confidence score.
  5. Compares the confidence against ConfidenceThreshold.
  6. Combines the semantic result with deterministic policy evaluation.
  7. Allows, denies, or escalates the request (for example, to Human-in-the-Loop) depending on the final policy decision.

Recommendations

ScenarioRecommended Provider
Offline / air-gapped deploymentsInternal
Lowest latencyInternal
Maximum privacyInternal
Highest reasoning capabilityOpenAI or Azure AI
Google AI ecosystemGemini
Self-hosted LLMsOllama

Example Configuration

{
"Semantic": {
"Enabled": true,
"ConfidenceThreshold": 0.8,
"AllowLowConfidence": false,
"DefaultProvider": "Internal",
"Providers": {
"Internal": {
"ModelType": "Community",
"PackagePath": "models/community-model.zip",
"MaxLength": 128
}
}
}
}

Was this helpful?