Control
Prompt injection protection
BaseLLM looks for instructions aimed at steering the model in the messages it sends on: ignoring earlier instructions, leaking the system prompt, switching roles and the like. Protection is turned on per project; your applications need no changes.
Three modes
| Mode | What happens to the request |
|---|---|
| Off | No scan. This is the default for a new project. |
| Report | The request goes through unchanged; an event is recorded. |
| Block | If the verdict is an attack, the request is rejected with 403 injection_blocked and never reaches the model. |
How the scan works
User and tool messages are scanned; the system prompt is not. Text is cleaned before the scan: invisible characters are removed, Cyrillic letters standing in for Latin ones are fixed, and base64-hidden text is decoded. Then three stages run:
- Rule filter
stage 1: Seven pattern groups: override, leak, persona switch, exfiltration, stealth, obfuscation and English patterns. - Classifier models
stage 2: Two models running on the server: one for Turkish and one multilingual. Without the models installed, the rule filter decides alone. - Local LLM
stage 3: Gives a third opinion on a suspicion only one signal raised. Runs when your own verification model is configured.
A block needs two signals to agree: a rule and a model, or both models. A single signal is only recorded. There are two exceptions: when the models cannot answer, a rule decides alone; on English text, the multilingual model's flag is enough.
| Local LLM setting | What happens |
|---|---|
| Off | Single-signal suspicions are only recorded. |
| Background (default) | The request does not wait; the LLM labels the event afterwards. |
| Wait (strict) | In Block mode, suspicions that could become a block wait for the LLM; an "attack" verdict rejects the request. |
Chat, Decisions and embeddings requests are scanned, as are document chunks and search queries sent to the Knowledge Catalogue.
Records, reports and SIEM
- Message text is not stored; only the matched phrase (up to 120 characters), the rule group, model scores and counters are kept.
- Reported and blocked events are also written to the audit log.
- Events are kept for 90 days by default. Change this with INJECTION_EVENT_RETENTION_DAYS in Settings; 0 keeps them forever.
- Events are exported to SIEM on the injection channel and have their own section in the Project Report.
- The try box on the screen runs a sample text through the rule filter; the test is not sent anywhere and not recorded.
| Case | HTTP | Error code | Message |
|---|---|---|---|
| Attack in Block mode | 403 | injection_blocked | Request blocked: the message contains instructions aimed at the model (prompt injection). |