AI and professional secrecy: which client data must never enter a prompt and how to work with safeguards
Pasting a case file into a general-purpose tool can be a disclosure of data to a third party and a breach of the duty of secrecy. Real anonymisation, processing agreements and internal policy: the framework for using AI without breaking client trust.

"Can I paste this brief into the AI so it improves it?" It is probably the most repeated practical question about artificial intelligence in legal practice. The short answer: it depends on what it contains, which tool it is and what contractual guarantees surround it. The deeper answer: the duty of professional secrecy and data protection law do not stop at the chatbot's door.
The duty does not disappear with a change of tool
The Code of Deontology of the Spanish Bar imposes on the lawyer the duty of professional secrecy over the facts and data known by reason of their professional activity. And Article 5 of Organic Law 3/2018 subjects controllers, processors and all persons involved in any phase of data processing to the duty of confidentiality, specifying in its second paragraph that this general obligation is complementary to the duties of professional secrecy.
Practical translation: when the lawyer introduces a client's information into an AI tool, they are carrying out data processing and, in most cases, a disclosure to a third party. The tool being powerful or convenient does not alter that legal qualification.
What must never enter without safeguards
Unless the tool offers guarantees equivalent to a data processing agreement, the following must not be introduced into a prompt:
- Identities and identifiers: names, ID numbers, addresses, phones, number plates, bank accounts, of the client or of any third party in the matter.
- The full account of the case if it allows reconstructing who is who by context, even after removing proper names.
- Procedural strategy, assessments and lawyer-client communications, the very core of professional secrecy.
- Privileged or sensitive company information, which may also have commercial or market relevance.
Truly anonymise, not cosmetically
The usual way out is anonymisation: replacing names with initials or roles ("the claimant", "the company") and removing any singularising data. But anonymisation only works if it is real: in a small town, a specific sector or a high-profile matter, four details are enough to re-identify people. If reasonable doubt about re-identification remains, the data is still personal and the risk, intact.
The safe route: tools with guarantees
The professional alternative is to work with tools in which the provider acts as a data processor under the contract required by the General Data Protection Regulation, with documented instructions, security measures and no use of the data to train third-party models. It is the criterion gathered in the CCBE guide on generative AI for lawyers and the one the firm's internal AI policy should gather, whose keys we develop in the guide on the AEPD's generative AI policy for firms.
The other front: the reliability of the result
Secrecy is not the only duty at stake. Generative AI can invent case law and references, and present them with total plausibility. The profession has already seen sanctions for filing false AI-generated case law, and verifying each citation against its official source is a non-delegable obligation: whoever signs the brief answers for its content. We explain our own working system in how we verify at Agente Lex.
Frequently asked questions
Can I use AI for drafting if I include no personal data? If the anonymisation is real and the content reveals neither strategy nor confidences, the risk is greatly reduced. But it is worth documenting that practice in the internal policy and reviewing what the provider does with the conversations.
Can I ask the client for consent? Consent can be a basis in some cases, but it must be informed and specific: the client must understand which tool it is, where their data goes and for what purpose. It is not a general wildcard.
Are the paid versions of general-purpose tools already safe? It depends on the specific contract and configuration: the existence of a processing agreement, the location of the data and the policy on training with user data must be verified. The subscription price, by itself, is not a legal guarantee.
We follow the practical and safe use of AI in legal practice in our Legal AI section.
Fuentes
- Organic Law 3/2018 of 5 December on Personal Data Protection and guarantee of digital rights (Article 5) (BOE). Accessed 21 October 2026.
The specific data in this article come from the official sources cited.