All guides
Guide2026-07-16

How to build a KVKK-compliant AI system in Türkiye

The decisive question in a KVKK-compliant AI system is not model quality — it is where the personal data goes. Every prompt sent to an LLM API hosted abroad is a cross-border transfer under Article 9 of Law No. 6698, and since the amendment that took effect on 1 June 2024 it needs a lawful basis of its own. Running the model on your own servers removes most of the problem before it starts.

This is a technical compliance framework, not legal advice. The statute and the Board’s practice evolve; have your setup verified by your own legal counsel.

Three questions, in this order

Most teams jump straight to the third question and then look for solutions in the wrong place.

  1. Is there personal data in this flow? The definition in Article 3 is broad: any information relating to an identified or identifiable natural person. Support tickets, CVs, call-centre transcripts, purchase histories — even without a name, if the content makes someone identifiable, you are in scope. Health, biometric and membership data fall under the special-category regime of Article 6, where the bar is higher.
  2. What is the lawful basis? Article 5 lists seven grounds besides explicit consent; performance of a contract, legal obligation and legitimate interest are the ones that usually carry weight. AI is a new purpose for processing — if you collected the data for something else, that original basis does not automatically stretch to cover the model.
  3. Where does the data travel? That is where Article 9 arrives.

Cross-border transfer: the map after 2024

The old Article 9 relied on a list of “countries with adequate protection” that was never published, which pushed everyone into consent or ad-hoc undertakings. The structure introduced by Law No. 7499 moved noticeably closer to the European mechanisms:

RouteWhat it requiresBoard approvalReality in an LLM project
Adequacy decisionA Board decision covering a country, sector or international organisationThe decision is the Board’s ownThe cleanest route; scope is narrow, so it rarely covers today’s providers
Standard contractSigning the text published by the BoardNo prior permission; notification to the Authority within five business days of signingThe most used route — but the provider has to be willing to sign
Binding corporate rulesApproved internal rules across a corporate groupBoard approvalIntra-group only; no help with an external vendor
UndertakingA bespoke commitment with the providerBoard permissionSlow, low predictability
Incidental transferMust not be regular, plus one of the listed groundsA chatbot shipping every message abroad is not incidental

That last row matters. Incidental means exactly what it says: not routine. A production assistant sending thousands of prompts a day is by definition continuous — which is why “we added a consent checkbox” is a weaker foundation than it looks.

Why explicit consent is thin ice

Explicit consent, as defined in Article 3, must relate to a specific subject, be informed, and be given freely. Three practical consequences: it cannot be a condition of service, it can always be withdrawn, and in an employment context the power imbalance makes “freely given” arguable.

The real engineering question is what happens when consent is withdrawn. Which log lines, which vector index entries, which fine-tuning set still hold that person’s data? If you cannot answer within minutes, your consent mechanism exists only on paper. That is why we treat consent as a last resort, not a first choice.

Data minimisation is an architectural decision

The Article 4 principle — relevant, limited and proportionate to the purpose — is a direct technical constraint for teams building RAG. The common mistake is feeding the entire document pool into the embedding pipeline and leaving access control at the UI layer. If the vector index carries no permissions, the index itself is the leak.

What we build instead:

  • Field-level projection: the object sent to the model is a subset of the source record, not the record.
  • Pseudonymisation: identifiers replaced by tokens, with the reversal map stored separately and encrypted.
  • Permission-aware retrieval: every chunk carries its ACL label; filtering happens at query time.
  • A routing gate: prompts containing personal data go to the local model, the rest to the vendor API.
# LLM gateway — conceptual rule set
routes:
  - when: { contains_personal_data: true }
    target: on_prem_model      # no cross-border transfer
  - when: { contains_personal_data: false }
    target: vendor_api
redaction:
  patterns: [national_id, iban, phone, email]
logging:
  prompt: hash_only
  retention_days: 30
  purge_on_consent_withdrawal: true

A caveat worth stating plainly: pattern-based gatekeepers are not deterministic and will never catch personal data in free text with full reliability. Build them as one layer, never as the only one.

Data sovereignty: cutting the risk at the source

Run the model on the organisation’s own infrastructure and the Article 9 debate leaves the table — no transfer, no transfer law. The security duty under Article 12 and the principles of Article 4 still apply, of course, but the compliance surface shrinks to a machine you control.

SetupArticle 9 statusWhat it costs you
Overseas SaaS APITransfer occurs; needs a lawful routeContracts, notification, vendor diligence, sub-processor tracking
Cloud in Türkiye, closed modelDepends on the provider’s processing chainVerifying the data genuinely stays in country
Open-weight model on your serversNo transferHardware, model maintenance, versioning, evaluation

The progress of open-weight models over the past two years has made this choice realistic for most enterprise workloads. We describe what we do on the sovereignty and RAG side on our services page.

The disclosure duty stands on its own

The Article 10 duty to inform applies whether or not you rely on consent. What AI adds to the text: where the model runs, the recipient groups and country if data is transferred, which decisions are made automatically, and where human review enters. Article 11(g) gives individuals the right to object to an adverse outcome produced solely by automated analysis — so that objection needs a person and a process behind it. “The model said so” is not an answer.

Logs and retention

Record typeRiskOur approach
Raw prompts and responsesHighest — free text can contain anythingOff by default; if enabled, masked and short-lived
Evaluation datasetsThey tend to become permanentPseudonymised copy, versioned, separately access-controlled
Access and audit trailLow but necessaryKept long-term; metadata, not content
Vector indexSilent accumulationDeleting the source record deletes the index entry; with pgvector in the same Postgres instance that is one transaction, with a separate store it is guaranteed through an outbox

Retention periods come from your retention and destruction policy, not from “as long as we need it”, and deletion runs on a schedule rather than on someone remembering.

The short path, step by step

  1. Inventory the data: which fields reach the LLM, and from where.
  2. Write down the Article 5 or 6 ground for each flow.
  3. Flag every flow that leaves the country and pick an Article 9 route for it.
  4. Move the flows that make transfer unnecessary onto a local model.
  5. Bake projection, pseudonymisation and permission-aware retrieval into the architecture.
  6. Update the disclosure text and any consent flow.
  7. Write the logging and retention policy; automate the deletion.
  8. Align your VERBİS registration (Article 16) with the new processing activity, and have counsel verify the whole picture.

How Albatros helps

We apply this in production as well: LEGAPALAS, which we build end to end, is a legal AI running on KVKK-compliant, ISO 27001-certified infrastructure — a concrete example of compliance requirements built into the architecture rather than bolted on.

We build AI systems that run on the client’s own infrastructure: open-weight or closed models hosted on your servers, with RAG and semantic search layers wired into your own documents and governed by your own permissions. The legal assessment belongs with your counsel; our job is building the architecture that assessment calls for. If that sounds like your problem, get in touch.

Sources

All guidesLet's talk