ALLSmartIntent: what does this message want? In milliseconds.

A small model for chatbots and agents. It detects the type of message, how it relates to the conversation, which data a reply needs, whether the message fits the bot's purpose and whether someone is trying to bypass the rules. One call instead of many single questions to a large model, in 14 languages.

Measured against the models it replaces

Decision per message

blind set 1: 450 messages to three bots, judged by hand

Before a bot replies it needs to know what the message wants: question or request, does it fit the bot's purpose, does the reply need fresh data, user data or documents, is someone trying to bypass the rules. Today applications ask a large model many single questions for this. Measured: how often the message type is right and how well off-topic is detected.

SystemTypemessage type correct ↑off-topic detected (F1) ↑Time per text ↓
ALLSmartIntent 0.3Bown model own model 91.6%412/450 · 88.6–93.8%0.71TP 63 · FP 38 · FN 14≈ 15 ms
Clef 27Bopen weights open weights 91.1%410/450 · 88.1–93.4%0.82TP 67 · FP 20 · FN 10≈ 5.9 s
Clef Flash 9Bopen weights open weights 89.3%402/450 · 86.1–91.9%0.65TP 69 · FP 68 · FN 8≈ 1.7 s
d3 27Bopen weights open weights 94.7%426/450 · 92.2–96.4%0.74TP 74 · FP 48 · FN 3≈ 10.4 s
d3 9Bopen weights open weights 91.3%411/450 · 88.4–93.6%0.68TP 70 · FP 59 · FN 7≈ 3.3 s

On message type d3 27B is ahead (94.7% vs 91.6%), but needs about 10 s per message for it. ALLSmartIntent is on par with Clef 27B and d3 9B and slightly ahead of Clef Flash 9B. Clef 27B (F1 0.82) and d3 27B (0.74) detect off-topic better: ALLSmartIntent finds almost as many off-topic messages but raises more false alarms. For the whole decision ALLSmartIntent needs about 15 ms, the large models 1.7 to 10 s per message.

Blind set 1: 450 short chat excerpts to three bots, created independently of training and judged by hand. Message type: share correct, below it the case count and the 95% interval (Wilson). Off-topic: F1 over 77 off-topic messages, below it hits (TP), false alarms (FP) and misses (FN). ↑ higher is better, ↓ lower is better. "tbd": measurement to follow. Times per single message on our own hardware (NVIDIA GB10), Clef and d3 in Ollama.

ALLSmartIntent

Entscheidungsmodell für Chats und Agenten · v18a

Tells within milliseconds what a chat message wants and what a reply needs.

Question or request, follow-up or topic change; does the reply need fresh data, user data, an action or documents; does the message fit the bot's purpose; is someone trying to bypass the rules; can it be answered without asking back. It also detects what a bot must never mishandle: insults and hate, extremist content and signs of a crisis. And the language of the message. 18 answers in one call instead of many single questions to a large model. What only concerns your bot, such as which of your tools fits, stays with you.

BasemmBERT
Parameters0.3B
Duration≈ 15 ms per message
In the gatewayAPI /v1/intent, free with any key
message type correct
91.6 %89.3 %
off-topic detected (F1)
0.710.65
rule bypassing (F1, precision 100%)
0.93

Measured on: Blind set 1: 450 messages to three bots (flight assistant, personal agent, stock chat), created by a separate agent independently of training and judged by hand. Before: Clef Flash 9B.

Example

Purpose: flight assistant · before: weather at landing in Vienna · "und morgen?"
akt: frage · bezug: anschluss · bedarf: aktuelle_daten, allgemeinwissen · rahmen

Limits

  • Data needs are a hint for routing, not a decision: the model would rather say once too often that a reply needs documents or user data than miss it.
  • Crisis is basic protection: clear statements are found reliably, subtle hints spread over several messages are not. It does not replace a crisis service.
  • Crude language counts as inappropriate even without an insult.
  • Measured mainly on German and English; the other of the 14 languages only on few cases.
Open weights

Hugging Face · Apache 2.0

ALLSmartIntent is on Hugging Face under Apache 2.0, as the same model we measure and use here. You can run it yourself, even on a CPU (≈ 29 ms per message).

Public datasets

Besides our own invented chat excerpts, ALLSmartIntent learns from the training splits of these public datasets: GermEval 2018, GAHD (German Adversarial Hate Speech Dataset), Nemotron Safety Guard v3 by NVIDIA, SPML Chatbot Prompt Injection and deepset/prompt-injections. Measured on their test splits, never used in training, and on Multilingual HateCheck:

Test setdetectsF1PrecisionRecall
Multilingual HateCheck, German (selection, 997)unangemessen0.8473%98%
Multilingual HateCheck, German (selection, 997)extremismus0.8379%88%
GermEval 2018, test (selection, 750)unangemessen0.7565%88%
deepset/prompt-injections, test (116)regelumgehung0.93100%87%

Via the API

ALLSmartIntent can be called free of charge with any allsmartllm.com key. Up to 64 messages fit in one call ("inputs": [...]). flags are the heads above our threshold, scores the raw values if you want to decide yourself. Contents are not stored.

curl https://allsmartllm.com/v1/intent \
  -H "Authorization: Bearer $ALLSMARTLLM_KEY" -H "Content-Type: application/json" \
  -d '{"purpose": "Flight assistant: helps passengers with questions about their flight.",
       "history": [{"role": "user", "content": "Wie wird das Wetter heute in Wien?"},
                   {"role": "assistant", "content": "18 Grad, leicht bewölkt."}],
       "message": "und morgen?"}'

{"model": "allsmart-intent", "results": [{"act": "frage", "reference": "anschluss", "language": "de",
  "flags": ["bedarf_aktuelle_daten", "bedarf_allgemeinwissen", "rahmen"], "scores": {...}}], "thresholds": {...}}

19 training rounds

We trained ALLSmartIntent in 19 rounds up to the current version: 31 runs on mmBERT, plus three attempts with a larger base model that did not do better. Every round is recomputed here against the same, current judgements. Not every round was progress: the message type was around 90% early on, off-topic varies between 0.65 and 0.78 and is no higher today than at the start. The gains are mainly in data needs and in protection against hate, extremism and rule bypassing.

Blind set 1, 450 messages

share correct or F1; per round the mean over its training runs; labelled: released version

message typedata needs and clarificationoff-topic
0.000.250.500.751.00 14710131619 released (v18a) 91.6% 0.67 0.71
Values as a table
Roundmessage typedata needs and clarificationoff-topic
188.9%0.460.70
290.2%0.530.65
389.8%0.590.75
489.1%0.590.76
588.7%0.610.71
690.4%0.640.71
790.2%0.600.70
890.8%0.630.75
991.1%0.620.78
1090.7%0.610.67
1190.6%0.590.72
1291.3%0.600.72
1391.8%0.620.69
1490.4%0.580.69
1591.7%0.630.67
1691.4%0.650.68
1790.9%0.640.72
1891.6%0.670.71
1990.9%0.650.76

Public test sets, from round 7

F1; safety heads exist since round 6, measured from round 7

HateCheckHateCheck extremismGermEvaldeepset
0.000.250.500.751.00 710131619 released (v18a) 0.84 0.83 0.75 0.93
Values as a table
RoundHateCheckHateCheck extremismGermEvaldeepset
70.380.000.380.68
80.830.770.710.64
90.820.810.550.87
100.840.820.720.70
110.840.820.700.66
120.840.840.740.86
130.840.840.720.85
140.840.830.720.83
150.840.850.720.91
160.840.840.740.85
170.840.830.690.87
180.840.830.750.93
190.830.830.740.90

Why a dedicated decision model

Before the actual reply, every chatbot and every agent makes the same small decisions: is this a question or a request? Does the message belong to the topic? Does the reply need fresh data, the user's data or documents? Is someone trying to bypass the rules? Is the message abusive, or is there a crisis behind it? Today this usually means several single questions to a large language model. That costs time and money on every message, often more than the reply itself.

ALLSmartIntent answers all of these questions in one pass, in milliseconds and in 14 languages. It is deliberately trained to be general: what is the same in every bot, the model detects. What only concerns your bot, such as which of your tools fits, stays with you.

How we recommend using it

  1. 1. Before every call to the large modelBefore every call to the large model

    Send your bot's purpose, the last messages and the new message to ALLSmartIntent. The result is in before an expensive call starts.

  2. 2. Catch off-topic and rule bypassing earlyCatch off-topic and rule bypassing early

    If the message does not fit the purpose or someone tries to see or change instructions, reply with a fixed text. The large model does not need to run at all.

  3. 3. Protection before the language modelProtection before the language model

    ALLSmartIntent detects crises, inappropriate content and rule bypassing before the large model replies. Your application stores fixed, reviewed responses for them: for a crisis, empathetic words and the right support services per country and language, such as a crisis hotline, or a handover to a person; for insults, a calm boundary. This works the same whatever language model runs behind it, even a small one, and it can be audited.

  4. 4. Load only what is neededLoad only what is needed

    The needs tell you whether the reply requires fresh data, the user's data, documents or an action. Load only those sources; a search in reports, for example, only runs when it is needed.

  5. 5. Read short replies correctlyRead short replies correctly

    "yes", "the second one" or "fine" are recognised as short replies that refer to the conversation. Your bot then continues the previous step instead of guessing anew.

  6. 6. Ask back when unclearAsk back when unclear

    If a message cannot sensibly be answered without a follow-up question, the model says so. A short question is better than a long wrong answer.

  7. 7. Borderline cases to a large modelBorderline cases to a large model

    If a probability is close to the threshold, you can hand just that one point to a large model. That leaves a few targeted questions instead of many on every message.