Build and operate AI with safeguards at each step
بناء خدمة ذكاء اصطناعي مسؤولة خطوة بخطوة
دليل عملي للمؤسسين يغطي المملكة المتحدة والاتحاد الأوروبي. اقرأ كل خطوة مع ضماناتها قبل استخدام بيانات حقيقية أو توسيع الصلاحيات.
English stays visible. The companion summaries explain the same UK and EU workflow; their language does not change the legal jurisdiction.
Choose reading language
01 · Choose what AI is allowed to do
حدّد المهمة والصلاحيات
اكتب المهمة والمدخلات والجمهور والقرار، وقارن الخدمة اليدوية وواجهة جاهزة والاسترجاع والتدريب. حدّد المسؤول وطريقاً إلى شخص، وأوقف التجربة إذا بقي استخدام محظور أو إجراء مؤثر بلا ضوابط.
When Pre-seed, seed, change · Lead Founder and product lead
Do this
Describe one task, input, audience, location and consequence. Compare a manual process, bought API, retrieval from approved documents, fine-tuning and training from scratch. Choose the smallest option that meets the need.
Safeguards to apply
Set forbidden uses, limits on autonomous action and a route to a person. Identify controller/processor roles for each purpose and EU AI Act roles and scope. Screen prohibited use, significant decisions and sector rules.
Evidence and a useful test
Draw one input-to-deletion map. Ask a colleague to describe exactly what the AI may do and who can stop it. Keep the version and decision record.
Pause or reopen if
Unresolved prohibition, unclear responsible organisation or no safe fallback. Reopen when a draft suggestion becomes a payment, rejection or other consequential action.
Working documents and sources
GDPR · UKGDPR · AIA2 · AIA5 · AIA25 · NCSC02 · Clear the records and rights
تحقّق من البيانات والحقوق
احصر المصادر والمرفقات والتراخيص، وافصل الإذن بالتدريب عن الاسترجاع والتقييم. حدّد الأساس القانوني والشروط الإضافية للبيانات الحساسة وأكمل تقييم الأثر المطلوب قبل المعالجة، واستشر السلطة أولاً إذا بقي خطر مرتفع يستلزم ذلك.
When Before real data · Lead Data lead and privacy lead
Do this
Inventory each dataset, attachment, label, prompt and intended reuse. Separate training, fine-tuning, retrieval, evaluation and output display. Identify collection authority, licence, confidentiality, Article 6 basis and additional conditions where needed.
Safeguards to apply
Check health, uniquely identifying biometrics, genetic and other Article 9 information, Article 10 records, children and people at heightened risk. Remove unnecessary fields. Screen and complete a required DPIA before processing; consult the authority first if high residual risk remains.
Evidence and a useful test
Trace one sample back to lawful provenance. Test that an excluded medical attachment cannot enter logs, retrieval or the training export. Record national lists and consultation decisions.
Pause or reopen if
A necessary permission or legal condition is missing, a required DPIA is incomplete, or unresolved high residual risk requires prior consultation.
Working documents and sources
GDPR · UKGDPR · CNIL · ICOAI · EDPB2803 · Configure the cloud you actually buy
اضبط الاستضافة السحابية
سجّل المورّد والخطة والمنطقة ومواقع السجلات والنسخ الاحتياطية والدعم والوصول عن بُعد. قيّد الصلاحيات وطبّق مصادقة قوية وتحقّق من شروط المعالجة ونقل البيانات، ولا تبدأ مع تخزين خاص متاح للعامة.
When Procurement and hosting · Lead Technical lead and procurement
Do this
Name the contracting entity, product, paid plan, region and subprocessors. Map where prompts, files, weights, logs, telemetry, support and backups go, including disaster recovery and remote access. Set the division of responsibility between supplier and company.
Safeguards to apply
Use individual admin accounts, strong authentication, least privilege, restricted storage, encryption and managed secrets. Assess the actual transfer path, supplier role and applicable mechanism. A location selection alone leaves questions about other services and access.
Evidence and a useful test
Retain dated terms, subprocessor list, configuration export, transfer assessment and owner. Test a private object with an unauthenticated request and demonstrate that a developer cannot read production records without approval.
Pause or reopen if
Unknown material data paths, publicly readable private storage, uncontrolled admin access, or missing required processor/transfer terms.
Working documents and sources
GDPR · UKGDPR · CLOUD · ICO28 · TRANSFER04 · Put a controlled service between your app and the API
احمِ الاتصال بواجهة API
احفظ المفاتيح على الخادم وافحص صلاحية المستخدم والعميل والمستند والأداة في كل طلب. ضع حدوداً للإنفاق والوجهات ونفّذ حماية من تكرار العمليات، وأوقف الإطلاق إذا كان نص النموذج يستطيع تنفيذ إجراء غير مصرّح به.
When Build · Lead Engineering and security
Do this
Keep provider secrets on the server. Authenticate the user and independently enforce tenant, object and tool permissions on every request. Limit inputs, outputs, spend and execution time. Record provider model and configuration.
Safeguards to apply
Treat retrieved text, model output and external callbacks as untrusted. Validate output before rendering or execution. Use safe rendering, destination allowlists, signed callbacks where supported, replay protection and idempotency for consequential actions. Redact telemetry and debugging output.
Evidence and a useful test
Use fictional accounts A and B. Try a B document ID as A. Re-send a test request and confirm no duplicate refund. Rotate a test key, deny a forbidden destination and inspect an actual error log for secrets.
Pause or reopen if
A client can choose its own unverified tenant ID, model text can trigger an unauthorised tool, an exposed secret is live, or retry can duplicate a consequential action.
Working documents and sources
GDPR · UKGDPR · NCSC · OWASPAPI05 · Constrain retrieval and indexing
قيّد الاسترجاع والفهرسة
أدخل في الفهرس مصادر معتمدة فقط، مع مالك وإذن وقاعدة وصول وموعد مراجعة. اختبر البحث والمحادثة والمراجع والتصدير بحسابين وهميين، وتوقّف إذا ظهر محتوى عميل لآخر أو بقي مستند بعد سحب الإذن.
When Build or add company knowledge · Lead Engineering and data owner
Do this
Retrieval-augmented generation (RAG) finds documents and gives excerpts to a model. Index only approved sources with an owner, permission, expiry and access rule. Enforce those rules before retrieval and again for any onward action.
Safeguards to apply
Keep customer boundaries in the storage and query controls. Treat embeddings, snippets, caches and file names as potentially sensitive. Remove hidden text and secrets. Test what happens after a document is deleted or a person loses access.
Evidence and a useful test
With fictional markers, verify that A cannot retrieve B through search, chat, citations or export. Delete one source, refresh its index and cache, then confirm it is no longer retrievable within the approved deletion timetable.
Pause or reopen if
Cross-customer retrieval, unknown source rights, stale revoked content, or a document instruction capable of changing tool permissions.
Working documents and sources
GDPR · EDPB28 · NCSC06 · Approve the training run before it starts
وافق على التدريب قبل تشغيله
وثّق نسخة البيانات والنموذج والحقوق والتوسيم، وافصل بيانات التدريب عن التقييم. اختبر التسميم والحفظ واستخراج المعلومات واحمِ الأوزان والسجلات، ولا تنشر قبل حسم الحقوق والدور القانوني والمخاطر المتبقية.
When Train or fine-tune · Lead ML lead, data lead and legal reviewer
Do this
State what training changes and why an existing model or retrieval is inadequate. Freeze a lawful dataset version, licence and model version. Document filters, labels, human annotation access, compute and data locations. Keep training and evaluation records separate, and split by person, entity or time where needed to prevent leakage.
Safeguards to apply
Test poisoning, memorisation, extraction, unfair errors, secrecy and ability to honour rights. Restrict weights, checkpoints, adapters and experiment logs. Verify code and dependencies before loading. Record actual rights and practical deletion limits. Reassess EU model-provider and system-provider roles when modifying or publishing.
Evidence and a useful test
Retain hashes, source permissions, sampling method, held-out tests, annotation controls and model card. Run controlled synthetic-marker extraction tests. Record weaknesses and residual uncertainty, including why a pass is insufficient to establish anonymity.
Pause or reopen if
Unlawful or untraceable inputs, evaluation contamination, unexplained sensitive-data memorisation, unresolved high-risk processing, or publication beyond the assessed rights and role.
Working documents and sources
GDPR · CNIL · EDPB28 · ICOAI · GPAI · NCSC07 · Evaluate and authorise red-team tests
اختبر الخدمة ضمن نطاق مأذون
اختبر الخدمة المجمّعة بطلبات عدائية آمنة وسجلات وهمية أو مصرّح بها. اكتب النطاق والإذن وحدود الكلفة وإشارة التوقف، وأصلح العيوب وأعد الاختبار قبل الإطلاق دون استهداف خدمات غير مأذون بها.
When Offline validation, before live trial · Lead Security lead and authorised tester
Do this
First test the exact assembled service on held-out fictional or lawfully authorised records. Have a checker challenge unsafe requests, document instructions, customer boundaries, data extraction, misleading citations, long inputs, languages, outages and tool permissions.
Safeguards to apply
Set scope and written authority for each asset, time, tester, method, data and recipient. Get necessary cloud/SaaS permission. Set rate and spend limits, stop signal, evidence security and a process for unexpected real data. Test actual permissions and interfaces as well as the model.
Evidence and a useful test
Keep scenario, expected result, observed result, severity, evidence ID, defect owner and clean-version retest. Include false negatives and false positives with denominators and group context. Use a distinct challenge set after repair.
Pause or reopen if
Unauthorised target, real data exposure or service disruption outside scope, cross-tenant disclosure, critical uncontained defect or no independent check of a serious risk.
Working documents and sources
NCSC · CMA · GDPR08 · Plan A/B testing before assignment
خطّط لاختبار A/B
حدّد النسختين والتوزيع والعينة والمدة ومقاييس النفع والضرر وقواعد الإيقاف قبل إشراك الناس. افحص قانونية البيانات وقواعد التخزين على الأجهزة والإشعار وأي موافقة أو استثناء، ولا تعتبر العينة الصغيرة دليلاً حاسماً.
When Controlled live trial · Lead Product experiment owner and privacy lead
Do this
Define the question, version A and B, intended sample, assignment unit, exposure cap, duration, outcome, harm measures and analysis plan. A shadow test can check a new system without allowing its output to affect the person, but still requires a lawful data route.
Safeguards to apply
Check GDPR purpose, basis, notice and DPIA. Assess device storage/access separately under UK PECR or the relevant EU national rule. Check any narrow exception and its conditions. Keep safeguards for all groups, minimise identifiers and provide appropriate objection or withdrawal routes.
Evidence and a useful test
Before launch record eligibility, power or precision rationale, randomisation, exclusions and stop rules. Track harm, missing outcomes and complaints alongside benefit. Show counts and uncertainty; an inconclusive small sample stays inconclusive.
Pause or reopen if
Missing applicable notice, consent or exception conditions, unsafe effect on a person, material imbalance, outcome leakage, breached stop rule or collecting sensitive traits without a lawful route.
Working documents and sources
GDPR · PECR · ICOAB · EPRIV09 · Approve the exact release and practise recovery
أطلق النسخة التي اختبرتها
وافق على النسخة والإعدادات والاستخدام المحدّد، وتحقّق من الإشعارات ودليل الادعاءات وخطة الحوادث. افصل الإنتاج عن الاختبار وأثبت العودة إلى خدمة آمنة، ولا توافق ما دام شرط سابق أو اختبار حرج مفتوحاً.
When Pre-launch and launch · Lead Accountable founder and release lead
Do this
Release the tested version, configuration, provider plan and permitted uses. Verify relevant legal notices, claims evidence, sector conditions, applicable EU AI Act duties and the incident route. Start within a bounded audience and prove rollback.
Safeguards to apply
Separate test and production, restrict deployment and administrative changes, verify build and dependencies, protect production credentials and approve who may enable an automatic action. Set alerts for disclosure, unsafe outputs, failed handoff, latency and costs.
Evidence and a useful test
Use the sign-off form. Record evidence IDs, limits and named owners. Practise switching back to the prior safe service and contacting the duty lead. Conditional approval requires its safeguards already to be operating.
Pause or reopen if
A prerequisite, authorisation or critical retest remains open, no one can stop the service, or the release differs materially from the tested version.
Working documents and sources
GDPR · NCSC · AIA25 · AIA5010 · Monitor the system and act on change
راقب التغييرات والحوادث
راجع الأخطاء والشكاوى والتدخل البشري والتكاليف وتغييرات المورّد، وأعد التقييم عند تغيير النموذج أو الغرض أو السوق. قلّل السجلات واحفظ أدلة الحوادث بأمان، وميّز التزامات المعالِج والمتحكّم وقرار إبلاغ السلطة عن إبلاغ الأشخاص.
When Operate and scale · Lead Operations with privacy and engineering deputies
Do this
Monitor sampled outputs, complaints, urgent misses, overrides, retrieval failures, drift, spend and provider changes. Track by relevant language and context without unjustified sensitive-data collection. Reassess a new model, market, audience, supplier term or purpose before extending approval.
Safeguards to apply
Limit logging to necessary evidence with defined access and retention. Link rights requests to prompts, outputs, scores, source records and suppliers. On a suspected breach, contain, preserve evidence and promptly assess roles and notification. A processor and controller have different duties and awareness times.
Evidence and a useful test
Keep a change and incident log with decisions. Drill a weekend event and verify secure escalation. The controller records each personal data breach and the reporting decision; assess regulator and affected-person thresholds separately.
Pause or reopen if
Uncontained serious incident, repeated harm beyond threshold, vendor reuse or transfer change, ineffective human review or a new use beyond approval.
Working documents and sources
GDPR · UKGDPR · EDPBBREACH · ICOBREACH · NCSC11 · Prove portability and lawful retirement
اختبر النسخ الاحتياطي والخروج
احصر الصادرات والنسخ والأوزان والفهارس، واختبر الاستعادة وصلاحيات الوصول وإعادة تطبيق الحذف. تحقّق من الحقوق والعقود قبل البيع أو النقل، ولا تغلق الخدمة دون مسؤول للسجلات ودليل على ما أعاده المورّد أو حذفه.
When Back up, exit, sell or close · Lead Founder, operations and deal lead
Do this
Inventory exports, source records, weights, indexes, caches, logs, supplier copies and backups. Agree recovery and retention requirements based on business consequences. Test export to a usable format before dependence grows.
Safeguards to apply
Keep versioned backups in a separate security boundary appropriate to risk. Restrict restoration, reapply deletions and access revocations, preserve lawful holds and revoke secrets. Check licences, confidentiality, controller changes, contracts and approvals before sharing with a buyer or transferring assets.
Evidence and a useful test
Restore a fictional sample and verify access rules, excluded/deleted records and service integrity. Record supplier return/deletion evidence, unresolved copies, remaining contact and obligations.
Pause or reopen if
Export cannot be read, restore revives deleted information into ordinary use, the buyer lacks permission for the proposed transfer, or closure has no records custodian.
Working documents and sources
GDPR · UKGDPR · CLOUD · ICO28 · ICOERASEToto-Rex can make mistakes. Everything here is general information, not legal advice: check the primary source, and take advice from a qualified professional before you act.