Engenharia
Field note
Douglas H. M. FulberLer em português

Does a local LLM solve LGPD and attorney confidentiality for Brazilian law firms?

Running AI inside the firm cuts what goes to third parties, but does not satisfy LGPD or confidentiality alone. What the law asks and what stays with you.

The short answer

Not on its own. Running a large language model (LLM) on the firm's own infrastructure solves an important part of the problem, because client documents are no longer sent to an AI vendor, but Brazil's data protection law (LGPD) and attorney confidentiality still require a defined purpose, restricted access, security measures and a record of what is done with the data.

In other words, a local LLM changes where the data is processed. Who decides what goes into the system, who can query it and what happens when something goes wrong remain the firm's choices. This text lays out what the law says and what the technology can and cannot cover. It does not replace the firm's own legal analysis.

What LGPD requires from anyone using AI with client data

Law 13,709/2018 defines personal data as any information related to an identified or identifiable natural person. A firm's contracts, pleadings, powers of attorney and emails are full of this kind of data, and sometimes of sensitive data, such as health information or union membership.

When a lawyer pastes that material into an AI tool, personal data is being processed. That brings in the principles of article 6, among them:

Purpose and necessity. Processing must have a specific purpose and be limited to the minimum necessary. Pasting an entire case file to ask for a summary of one clause goes beyond what is necessary.

Security and prevention. Article 46 requires technical and administrative measures that protect data from unauthorized access and leaks, and paragraph 2 says this applies from the design stage of the service.

Accountability. The firm must be able to demonstrate what it did. Article 37 requires a record of processing operations, and article 48 requires notifying the national authority and the data subject of security incidents that may cause relevant risk or harm.

Two further points weigh on the choice of a cloud tool. When the firm uses a third-party service, that vendor acts as a processor and must follow the controller's instructions (article 39). And if processing happens outside Brazil, the international transfer is only allowed under the cases listed in article 33.

What attorney confidentiality adds

For lawyers, LGPD is not the only layer. The OAB Code of Ethics and Discipline states in article 35 that lawyers have a duty to keep confidential the facts they learn in the practice of the profession. Article 36 says this confidentiality is a matter of public order, does not depend on a request from the client, and that communications between lawyer and client are presumed confidential.

The Brazilian Bar Statute guarantees the inviolability of the law office, its work tools and the electronic and telematic correspondence related to the practice of law (article 7, II), and treats breaching confidentiality without just cause as a disciplinary offense (article 34, VII).

The practical difference is this: LGPD protects personal data, while confidentiality protects everything the lawyer learned because of the profession, including strategy, settlement amounts and company information, which is not always personal data. A firm's AI policy needs to cover both.

Where a local LLM really helps

A local LLM is a model run on a server or computer under the firm's control, without depending on a public API. The legal vertical designed by DOUVRAS starts from three architectural guarantees: local processing, so data does not leave the controlled environment; encryption in communications; and encrypted local backup, with keys held only by the firm.

This architecture directly addresses three points from the previous section:

Fewer third parties in the path. If the model runs in the firm's environment, the content of the documents is not handed to an AI vendor for processing. That shortens the chain of processors the firm has to control.

No international transfer for the AI. When the server is in Brazil and under the firm's control, the AI step no longer depends on the cases in article 33.

Control over what is kept. The firm decides whether and for how long questions and answers are logged, who can see those logs and where the backup lives.

What a local LLM does not solve

The technology does not decide for you. Even with everything running inside the firm, these remain open:

Who accesses what. If every intern can ask the assistant about any case, confidentiality has been weakened internally. The assistant must respect the same permissions the firm applies to its folders and systems.

What the data is used for. The purpose still has to be defined. An assistant for contract triage should not, without a conscious decision, start reading the firm's entire mailbox.

Security of the server itself. A badly configured computer inside the firm leaks too. Updates, passwords, remote access and backup are part of the project, not a detail.

Model errors. A local model makes mistakes like any other. Human review remains mandatory before any filing or opinion leaves the firm.

Documentation. To meet LGPD accountability, the firm must be able to show what the system does, with which data and under which controls.

A checklist before turning AI on at the firm

Before choosing a model or hardware, it is worth answering in writing:

Task. Which task the AI will do and which it will not do.

Sources. Which folders, systems and document types it may consult.

Users. Which profiles may use the assistant and for which clients or practice areas.

Logs. What is recorded (questions, answers, documents consulted) and for how long.

Review. Who reviews the output before it is used with the client or in a case.

Incidents. What happens in an incident and who notifies.

Criteria. What shows the system works and what leads to shutting it down.

These questions follow the same logic as the DOUVRAS AI agents and assistants service, which defines before work begins the source of each answer, the cost of an error, when the decision goes back to a person and who is responsible for the outcome.

Where DOUVRAS comes in

DOUVRAS works with professional services, such as firms and consultancies that sell trust and expertise. For private AI in law firms, we design the architecture, install and configure the model in the firm's environment, connect the assistant only to authorized sources and deliver a source-aware knowledge base, tests, guardrails, an escalation flow, logs and shutdown criteria.

DOUVRAS is not a law firm and does not issue opinions on LGPD. The technical side is ours. The legal decision on legal bases, contracts and internal policy stays with the firm and whoever advises it on that. If you first want to understand what private AI does day to day, see how to use AI in a law firm without exposing client data.

Frequently asked questions

Does using a local LLM make the firm LGPD compliant?

Not automatically. It reduces what is sent to third parties and avoids international transfer at the AI step, but purpose, access control, security, records and incident response remain the firm's obligations.

Does attorney confidentiality forbid lawyers from using AI?

The Code of Ethics imposes a duty to keep confidential the facts learned in the practice of the profession. How to use AI without breaching that duty is the firm's own assessment. Keeping processing in a controlled environment makes that assessment easier.

Are the documents stored inside the model?

In the architecture we use, the assistant consults the authorized documents at the moment of the question and indicates which document each answer came from. What is logged and for how long is defined in the project.

Does DOUVRAS handle the legal side of LGPD compliance?

No. We handle the architecture, the deployment and the technical documentation, which support the legal compliance work done by the firm.

Want to apply this in your business?

Tell us the problem. We reply on WhatsApp and, if it makes sense, schedule a meeting.

LGPDattorney confidentialitylocal LLMprivate AIlaw firms
All field notes
Does a local LLM solve LGPD and attorney confidentiality for Brazilian law firms? — DOUVRAS Labs