fahmek

The model understands the message. Never the person.

fahmek replaces Moroccan identifiers with labels before a prompt leaves your network, in Darija, Arabic and French, then puts them back in the answer. It runs on your own servers.

Move the glass across the message. Under it, each identifier becomes the label the model receives.Drag the glass across the message. Under it, each identifier becomes the label the model receives.Example. The employee writes: Salam, bghit nbdl RIB dyali 999001123456789012345691 w CIN AB123456. Rappelez-moi au 06 61 23 45 67, شكرا. The model receives: Salam, bghit nbdl RIB dyali «MA_RIB_1» w CIN «MA_CIN_1». Rappelez-moi au «MA_PHONE_1», شكرا.

One round trip, four steps

The model never sees the RIB, and your employee never sees a label.

  1. Your employee writes

    bghit nbdl RIB dyali 999001123456789012345691

  2. fahmek masks it, on your server

    bghit nbdl RIB dyali «MA_RIB_1»

  3. The model answers with the label

    D'accord, le RIB «MA_RIB_1» sera mis à jour.

  4. fahmek puts the value back

    D'accord, le RIB 999001123456789012345691 sera mis à jour.

The label map lives in memory only, for two minutes under the bank-pilot policy, then it is gone.

What it recognizes

Nine kinds of identifiers, each with its own rule. A checksum where one exists; shape and context words where none is public.

LabelIdentifierHow it is checked
MA_RIBBank account number (RIB), 24 digitsRIB key verified (mod 97)
MA_IBANMoroccan IBAN, MA and 26 digitsIBAN check digits verified
PANPayment card number, 13 to 19 digitsLuhn checksum
MA_PHONEMoroccan phone number, 0 or +212National numbering structure
EMAILEmail addressMailbox syntax
MA_CINNational identity card (CIN)Shape and nearby words; no public checksum exists
MA_CNSSCNSS social security numberShape and nearby words
MA_CNSS_AFFILIATIONCNSS employer affiliation numberShape and nearby words
MA_ICECompany identifier (ICE)Reported, not masked by default

Every rule is tested in five registers: Modern Standard Arabic, Darija in Arabic script, Darija in Latin letters, French, and French and Arabic mixed in one sentence. Arabic-Indic digits, tatweel and hidden direction characters are normalized first.

Full detection catalogue (in French)

Built to stay inside the bank

Every rule below is checked by the service itself or by its tests, not left to a deployment note.

No network calls while inspecting
No telemetry, no license server, no model download. It runs on an air-gapped network.
Nothing detected is written down
Values are never logged or saved to disk. Redis keeps the label map in memory only, and fahmek refuses to start under a strict policy if Redis can save to disk.
Fails closed
Under the bank-pilot policy, a message fahmek cannot inspect is refused. It is never sent unmasked.
Under 15 ms at the 99th percentile
Normalization, detection and masking of a message up to 8,192 characters, measured in CI for each register. The network hop comes on top.
An offline license
A signed file checked against a key built into the image. Nothing phones home.
A shared secret on every call
Logs hold a route, a status and a duration: never message text, never the key.

Fits the gateway you already run

fahmek sits beside LiteLLM, between your applications and every model provider.

Optional: auto-gad corrects French and English spelling before the model reads the message. It never changes Darija, Arabic script, names or the labels.

What it does not do

Try it on your own messages

A pilot runs on one of your machines, offline, with your gateway and your policy.

fahmek (فاهمك) is Darija for “I understand you”.