Announcing US$ 3.2M pre-seed round · OneVC · Maya · Norte Ventures Read →
Back to blog

LGPD and generative AI:
what changes in the processing of personal data

In short

A credit team is testing an agent that reads customer records, payment history and service conversations to suggest each customer's limit. A customer asks for a review of a limit that went down. The request is backed by the LGPD, Brazil's data protection law, and the answer depends on knowing which personal data went into the model's context and where it came from. That knowledge is the role of the Company Brain, the layer that knows the company: what data exists, where it lives, how it relates and who can see what.

The LGPD applies to every AI flow that touches personal data

The General Personal Data Protection Law, Law 13,709/2018, regulates the processing of data about identified or identifiable natural persons. Processing includes collecting, storing, querying, classifying, sharing and deleting.

In a generative AI project, personal data can appear at four points: in the question, when someone types a customer's name; in the context, when the agent retrieves a record; in memory, when the conversation is kept; and in the answer, when it mentions a person. One of them is enough for the law to apply, and the analysis of each case is a job for legal and for the data protection officer, the DPO.

The law's principles change the design of a project with models

Article 6 of the LGPD lists the principles of processing. Seven of them weigh most in AI projects:

  • Purpose: data collected to handle a support ticket needs analysis before it feeds a prospecting agent.
  • Necessity: processing stays at the minimum the purpose requires, and the model receives only the fields the question asks for.
  • Transparency: data subjects are entitled to clear information about how their data is used, including by models.
  • Security: measures against unauthorised access to the data, including leaks through answers.
  • Prevention: measures to avoid harm before it happens, including prompt injection.
  • Non-discrimination: a model that reproduces historical patterns can discriminate, and its outputs need testing.
  • Accountability: demonstrating the measures taken requires a record of what the model read and answered.
The LGPD principles that weigh most in generative AI projects
Seven LGPD principles change the design of a project with models

Data subject rights become a technical requirement of the system

The data subject rights set out in the LGPD depend on the system knowing where each person's data is:

  • Access: stating which of the person's data the company processes, including in agent memory.
  • Correction: data corrected in the CRM also leaves the old versions in indexes and summaries.
  • Deletion: the request has to reach derived copies, such as summaries and embeddings.
  • Review of automated decisions: article 20 entitles data subjects to request a review of decisions made solely on the basis of automated processing that affect their interests, such as a credit profile, and to receive information about the criteria.

In the credit team, meeting the request means reconstructing which data went into the suggestion.

The model vendor, international transfer and the RIPD enter the analysis

Controller and processor

The controller makes the decisions about processing, and the processor handles data on its behalf. A model vendor called through an API is usually analysed as a processor. If it uses the content for its own purpose, such as training, the analysis changes, and the contract needs to address retention and deletion.

International transfer

When the model runs on a server outside Brazil, the personal data sent in the call is transferred to another country. The LGPD allows that transfer in specific cases, such as a country with recognised adequate protection or contractual clauses approved by the ANPD, the national data protection authority.

Impact assessment

The data protection impact assessment, the RIPD, describes high-risk processing and the measures to reduce that risk. The ANPD recommends preparing the RIPD before the controller starts processing and may require it when the basis is legitimate interest. AI uses that make decisions about people are natural candidates.

Sensitive data, retention and memory

In an agent's memory, the mention of a diagnosis becomes stored sensitive data. Retention needs a time limit, and the end of processing leads to deletion, except where the law provides otherwise.

The ANPD regulates and enforces compliance with the LGPD, with the power to apply sanctions.

Controller, processor, RIPD and international transfer under the LGPD with a model vendor
With a model vendor, the LGPD calls for defined roles, a contract and an analysis of international transfer

In the Company Brain, personal data stays inside the perimeter and reaches the model as a minimum slice

The Company Brain connects CRM, ERP, helpdesk and documents once, in a knowledge graph, a business ontology and a semantic layer. The databases stay in the customer's environment, and the model receives the context over MCP.

  • Necessity applied: the limit suggestion receives the payment history without the text of the conversations.
  • Inherited permissions: each person receives through the AI only what they already see in the source system.
  • Traceability: each answer points to its sources and each query is recorded, the basis for accountability.
  • Deletion at the source: the graph links each piece of data to its data subject, and what is deleted at the source stops appearing in later queries.

With a model running as an external service, the slice that is sent leaves the perimeter in that call and follows the vendor's terms. With a model on the company's own infrastructure, it stays inside too.

The Company Brain applying the LGPD with data inside the perimeter, a minimum slice and deletion at the source
The Company Brain helps apply the LGPD with a minimum slice, inherited permissions and a record of every query

Compliance starts with a map of personal data in each AI flow

The first step is to list the AI flows in use or in testing and mark where personal data comes in, with emphasis on sensitive data, decisions about people and transfers to vendors outside the country.

The flows that combine these factors go to legal and the DPO first, with legal basis, RIPD and retention defined before production. The map feeds the record of processing operations that the LGPD already requires.

Get the next articles on AI governance and security