Governing an AI project means deciding which data may be used, where it is processed, who reviews the outputs and how incidents are handled, before going to production. In Tunisia, the legal starting point is Organic Law No. 2004-63 on the protection of personal data; the GDPR and the EU AI Act come on top as soon as your customers or users are in the European Union. Public frameworks (NIST AI RMF, ISO/IEC 42001, OWASP) then provide the method.
Summary
Language models change the nature of risk: data leaves the company with every API request, instructions can be hijacked by the content being processed (prompt injection), and AI agents can act on your systems. This article covers the relevant frameworks, a five-step method for setting up governance, the security risks specific to LLM-based applications, and the minimum rules of an AI usage policy.
1. Why AI projects carry specific risks
Traditional software runs rules written by developers. A language-model-based system interprets text, which opens up new risks:
- Data leaving the company: every request sends context (emails, documents, customer data) to the model provider, often outside Tunisia.
- Retention and reuse: depending on the provider's terms and the plan chosen, requests may be logged; read those terms before any professional use.
- Instruction hijacking: a document or email processed by the model may contain malicious instructions (prompt injection).
- Inaccurate answers: a model can state false information confidently; an answer sent without review commits the company.
- Automatic actions: an AI agent connected to tools can modify data, send messages or trigger payments.
The frameworks to know
| Reference | Type | What it provides | When it matters |
|---|---|---|---|
| Organic Law No. 2004-63 and INPDP | Tunisian law | Principles for processing personal data, data subject rights, supervisory authority | As soon as a project processes personal data in Tunisia |
| GDPR (Regulation (EU) 2016/679) | EU regulation | Legal basis, minimization, security, data subject rights, transfers outside the EU | Customers, users or partners in the EU |
| Regulation (EU) 2024/1689 on AI (AI Act) | EU regulation | Risk-based approach: prohibited practices, high-risk systems, transparency obligations | AI systems placed on the EU market or whose outputs are used there |
| NIST AI Risk Management Framework | Voluntary framework | Four functions for managing risk: govern, map, measure, manage | Structuring a project's risk analysis |
| ISO/IEC 42001:2023 | International standard | Certifiable AI management system | Organizations that want to formalize and audit their approach |
| OWASP Top 10 for LLM Applications | Security framework | The main vulnerabilities of LLM-based applications and countermeasures | Design and security review of any LLM application |
2. Classify data before choosing the architecture
Choosing between an external API, a cloud service and an in-house model depends first on how sensitive the data is. A simple classification is enough to start:
- Public: information already published (catalog, website); few restrictions.
- Internal: procedures, working documents; external APIs are possible with suitable contractual terms.
- Confidential: contracts, financial data, source code; strict minimization, an assessed provider, or in-house processing.
- Personal or sensitive: customer, candidate or employee data; review under Law 2004-63 (and the GDPR where applicable), anonymization or pseudonymization, and processing on controlled infrastructure where needed.
3. Securing applications built on language models
The OWASP Top 10 for LLM Applications lists the most common vulnerabilities. Four of them directly affect business projects:
Prompt injection
Processed content (email, PDF, web page) contains instructions that hijack the model. Keep instructions and data clearly separate, and never give the model more rights than it needs.
Sensitive information disclosure
The model reveals data it should not have seen or disclosed. Filter data upstream and limit the context to what the user is allowed to see.
Improper output handling
The model's response is used without checks (SQL query, command, message sent). Validate and escape any output before executing or publishing it.
Excessive agency
An agent has overly broad tools or permissions. Limit its tools, apply least privilege and require human approval for irreversible actions.
Setting up governance in 5 steps
Inventory the uses
List the AI tools already used in the company, including undeclared individual use.
Map the data
For each use: data processed, classification, processing location, provider and terms.
Assess the risks
Impact of an error, a leak or a hijack; rely on the NIST AI RMF functions.
Define rules and owners
Usage policy, human review, an owner per system, an incident procedure.
Monitor and review
Logs, periodic review of quality and incidents, updated rules.
4. The minimum rules of an AI usage policy
A short policy that is applied beats a long document that is ignored. At a minimum it should state:
- Which tools are approved, and for which kinds of data.
- Which data is banned from consumer tools: customer personal data, contracts, financial information, confidential source code.
- When human review is mandatory before sending or acting.
- Transparency: telling people when they are interacting with an AI system.
- Log retention and the procedure for reporting an incident.
5. AI agents: limit what they can do
An AI agent does not just answer: it uses tools and acts. The most effective rule is to make its sensitive decisions deterministic: the model proposes, rule-based code decides whether the action may go out without a person. That is the principle I applied to this site's AI assistant: any reply that mentions a price, a discount, a contract, a delivery commitment or sensitive data, or that contains a prompt injection attempt, is held until a human approves it, however confident the model is. For more on agents, see AI agents and their uses.
- Give the agent only the tools its task requires.
- Require human approval for irreversible or binding actions.
- Log every decision, every tool call and every approval.
- Test the agent with malicious content before going to production.
Key takeaways
- In Tunisia, Organic Law No. 2004-63 governs any personal data used by an AI project; the GDPR and the AI Act add to it for EU-related activity.
- Classify data before choosing between an external API, the cloud and in-house hosting.
- Address LLM-specific risks: prompt injection, information leaks, unchecked outputs, excessive agency.
- Make agents' sensitive decisions deterministic: the model proposes, rules and people decide.
- Write a short usage policy, then monitor and review it regularly.
Conclusion
Governance does not hold AI back: it is what turns isolated experiments into reliable systems that customers and employees can trust. It starts with simple decisions about data and human review, then takes shape with recognized frameworks. For the overall approach, read Integrating AI into a Tunisian business; for support, get in touch.
Sources
- Organic Law No. 2004-63 of 27 July 2004 on the protection of personal data (French text published by the INS, Tunisia)
- Regulation (EU) 2016/679 (GDPR) — EUR-Lex
- Regulation (EU) 2024/1689 on artificial intelligence — EUR-Lex
- NIST — AI Risk Management Framework (AI RMF 1.0)
- ISO/IEC 42001:2023 — Artificial intelligence management systems
- OWASP Top 10 for Large Language Model Applications



