Sending your users' personal data to a model abroad is a transfer under Law 18-07. See what the law asks, what counts as personal data, and how to mask it before a request leaves.
Your app takes a user's message and sends it to a model. The model answers, the user is happy. And the message has just left the country.
If that message holds personal data, Law 18-07 has something to say. This article shows what, and how to build with it in mind.
Law 18-07 of 10 June 2018 protects people when their personal data is processed. Collecting it, storing it and sending it all count as processing.
Personal data is any information that identifies a person, directly or not: a name, a phone number, a medical detail. Its role in the law is to mark what is protected.
Sending that data to a server in another country is a transfer abroad. The law allows it only under conditions, among them the authorisation of the national authority for the protection of personal data, the ANPDP.
The law does not look at the size of your company. A freelancer with one app and an agency with fifty clients answer to the same rules.
Most apps do not mean to send personal data. It arrives inside what users type.
My app only sends the user's question. Is that really personal data?
Often, yes. A question carries a name, a phone number, an address or a symptom more often than you think. The model receives the whole message, so it receives those too.
[User's message] ──> [Your app] ──> [OpenDunes, in Algeria] ──(personal data masked)──> [The model's provider]Never send a national ID number, a phone number or a health detail to a model unless the answer truly needs it.
OpenDunes receives your request in Algeria, before any model sees it. In your privacy settings, you choose what happens when a message contains personal data.
You have three modes: Warn logs the detection and still sends, Redact replaces the personal data before sending, Block rejects the request.
Let's see right away what Redact changes.
Your user writes his name, his phone number, then "my parcel has not arrived". With Redact on, the model receives the sentence with the name and the number replaced, and it can still answer about the parcel.
The same settings let you refuse providers that train on your requests, and limit routing to providers that do not keep request data.
Send raw user messages to a model abroad and hope nothing personal is inside.
Turn Redact on in your privacy settings, turn off training on your data, and keep only the fields the answer needs.
Your code does not change for any of this. You point it at OpenDunes once:
from openai import OpenAI
client = OpenAI(
base_url="https://opendunes.com/v1",
api_key="your-opendunes-key",
)Some professions carry a stricter duty than the law itself, as the professions with a stricter duty still explains.
Context: your app has a contact form with five fields: name, phone, city, order number and message.
Task: mark which fields are personal data, then choose Warn, Redact or Block for the messages your app sends to a model.
Name and phone are personal data. City and order number can identify a person once combined with the rest, so treat them with care. Redact suits the free message: it keeps the question and removes the personal data. Block suits an app that should never send personal data at all.
Yes. The law does not depend on company size: anyone who processes the personal data of people in Algeria answers to it.
The model has to read the text to answer, so it receives it in clear. Masking removes the personal data from the text itself, which encryption does not do.
No. It explains how the law meets an AI app. For a decision about your own data, ask a lawyer who practises Algerian data protection law.
You now know where personal data hides and how to mask it. In the next article, we look at doctors and lawyers, whose duty of secrecy goes further. See you there!