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
| Property | Type | Default | Description |
|---|---|---|---|
Enabled | bool? | false | Enables or disables semantic intent analysis. |
ConfidenceThreshold | double? | 0.7 | Minimum confidence score (0–1) required before Synentra trusts the classification result. |
AllowLowConfidence | bool? | false | Whether requests with confidence below ConfidenceThreshold are allowed. |
DefaultProvider | string | "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
| Property | Type | Default | Description |
|---|---|---|---|
ModelType | string | "Community" | Model package type. Supported values: Community or Pro. |
PackagePath | string? | null | Absolute path to the ONNX model package ZIP. If omitted, Synentra uses the bundled model. |
LicensePath | string? | null | Absolute path to the Pro license file. Required only when ModelType is Pro. |
MaxLength | int? | 128 | Maximum 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
| Property | Type | Default | Description |
|---|---|---|---|
ApiKey | string | "" | OpenAI API key. |
Model | string | "gpt-4o-mini" | OpenAI model identifier. |
Temperature | double? | 0.0 | Sampling temperature. Lower values produce more deterministic classifications. |
MaxTokens | int? | 256 | Maximum 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
| Property | Type | Default | Description |
|---|---|---|---|
Endpoint | string | "" | Azure OpenAI endpoint. |
ApiKey | string | "" | Azure API key. |
Model | string | "gpt-4o-mini" | Azure deployment/model name. |
Temperature | double? | 0.0 | Sampling temperature. |
MaxTokens | int? | 256 | Maximum 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
| Property | Type | Default | Description |
|---|---|---|---|
ApiKey | string | "" | Gemini API key. |
Model | string | "gemini-2.0-flash" | Gemini model identifier. |
Temperature | double? | 0.0 | Sampling temperature. |
MaxTokens | int? | 256 | Maximum 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
| Property | Type | Default | Description |
|---|---|---|---|
Endpoint | string | "http://localhost:11434" | Ollama server endpoint. |
Model | string | "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.
| Confidence | Result |
|---|---|
| ≥ threshold | The semantic verdict is trusted. |
< threshold + AllowLowConfidence = true | The request continues despite low confidence. |
< threshold + AllowLowConfidence = false | The request is rejected or escalated according to the configured enforcement pipeline. |
Evaluation Pipeline
When semantic analysis is enabled, Synentra performs the following steps:
- Receives the proxied request.
- Extracts relevant text from the request.
- Sends the text to the configured semantic provider.
- Receives the predicted intent and confidence score.
- Compares the confidence against
ConfidenceThreshold. - Combines the semantic result with deterministic policy evaluation.
- Allows, denies, or escalates the request (for example, to Human-in-the-Loop) depending on the final policy decision.
Recommendations
| Scenario | Recommended Provider |
|---|---|
| Offline / air-gapped deployments | Internal |
| Lowest latency | Internal |
| Maximum privacy | Internal |
| Highest reasoning capability | OpenAI or Azure AI |
| Google AI ecosystem | Gemini |
| Self-hosted LLMs | Ollama |
Example Configuration
{
"Semantic": {
"Enabled": true,
"ConfidenceThreshold": 0.8,
"AllowLowConfidence": false,
"DefaultProvider": "Internal",
"Providers": {
"Internal": {
"ModelType": "Community",
"PackagePath": "models/community-model.zip",
"MaxLength": 128
}
}
}
}