Connecting AI to people context (with LGPD doubled up)
How to make AI work with real people data, choosing the right path by the data's format, and why the security check in HR is doubled up: here it isn't just the company's sensitive data, it's the personal data of real people.
You ask AI what the real turnover rate was last quarter. It answers with an analysis full of nice-sounding people-management terms, and made up. AI never opened your payroll system or your termination database, so it guesses a plausible number for your sector, which isn't yours.
You ask AI to cross-reference payroll cost, which is structured data in the ERP, with the salary-adjustment policy, which is plain text, to know if next year's budget closes. It comes back with a confident answer, but it treated the ERP as text to search by meaning and the policy as a spreadsheet, missing the tiered adjustment rule. The real budget overrun was hidden in a clause it never actually read.
You ask AI to assess the risk of a labor lawsuit by cross-referencing the employee's warning history, structured in the HR system, with the employment contract, which is plain text in a PDF. It comes back with a confident opinion, but it treated the history as text to search by meaning and the contract as a spreadsheet, missing the clause that changed everything. The point that decided the case disappeared because neither source was read the right way.
You ask AI to cross-reference employer branding, measured in structured application-per-channel metrics, with the employer-brand perception report in a PDF full of charts. It comes back with a nice-looking summary, but it read the PDF as plain text and lost the chart, and treated the channel metric as if it needed search by meaning. The channel that actually brought in good candidates got lost in the confusion.
You ask AI to cross-reference the turnover rate, which lives structured in the payroll system, with the termination policy, which is plain text in a PDF, to understand why a specific area is losing people. It comes back with an answer full of people-management jargon, but it treated the policy as if it were a spreadsheet and the payroll as if it needed search by meaning. The team that was actually losing the most people got lost in the confusion, because neither source was read the right way. And before you even connect the named termination database, with name, national ID, reason, there's still a bigger question missing: can this data leave the company without anonymization, and is it sensitive personal data, for example if the reason involves health or leave?
You ask AI which squad has the highest talent retention, cross-referencing the headcount dashboard, which is structured data, with the quarterly climate report in a PDF full of charts that HR sends. It comes back with a nice-looking number, but it read the PDF as plain text and lost the table, and treated the dashboard as if it needed search by meaning instead of calculating. The squad that actually retained talent was in a dashboard column it never added up correctly.
You ask AI to explain where the hiring funnel gets stuck the most, cross-referencing the ATS export, which is rows and columns, with the candidate-feedback report in a PDF that HR puts together every quarter. It comes back with a consultant-style answer, but it treated the ATS as text to search by meaning and the PDF full of charts as a plain spreadsheet, missing the conversion-by-stage table. The real bottleneck was in the technical interview, hidden in a table it never read as an image.
You ask AI to find where time-to-hire blows up the most, cross-referencing the time-per-stage system in the ATS, which is structured data, with the hiring-quality report in a PDF full of charts that HR sends you every week. It comes back with an answer full of efficiency jargon, but it treated the PDF as plain text, missing the time table, and treated the structured system as if it needed search by meaning. The bottleneck that was causing the most delay was in a table it never read as an actual image.
You ask AI to list which HR processes are most exposed under LGPD, cross-referencing the personal-data access matrix, which is rows and columns, with the candidate data-retention policy, which is plain text, and the audit report in a PDF full of charts. It comes back with a generic list, but it mixed up all three sources: it treated the matrix as text, the policy as a spreadsheet, and the PDF lost the severity table. The actually improper access was in a policy it never read for meaning.
You ask AI to find which stage of technical onboarding generates the most support tickets, cross-referencing the structured access-system log with the onboarding-satisfaction report in a PDF full of charts. It comes back with a guess that sounds like it knows what it's talking about, but it treated the log as text to search by meaning and the PDF as a plain spreadsheet, missing the chart. The stage that most tripped up new hires was in a table in the report it never read as an image.
You ask AI to find where candidates most abandon the hiring process, cross-referencing the ATS funnel data, which is structured, with the candidate-experience research report in a PDF full of heat-map charts. It comes back with a recruiting cliche, but it treated the funnel as plain text and the PDF as a spreadsheet, missing the heat map that showed the real drop-off point. The middle step of the process, where the candidate actually got stuck, disappeared because neither source was read the right way.
You ask AI which competitor is stealing your best talent, combining the exit-interview report, a PDF full of charts, with the headcount spreadsheet by area in one go. It comes back with a nice-looking answer, but it mixed the two up: it treated the PDF with charts as plain text and lost the table, and treated the spreadsheet as if it needed search by meaning. The area that was losing the most people to the competitor was hidden in a spreadsheet row it never read as an actual table.
Here's something worth noticing: the problem is almost never that AI is bad at math. The problem is it's answering off the top of its head, having never opened your people's real data. It's like hiring the best HR consultant on the market, sitting them in your office, and never giving them access to your ATS, your payroll, your termination history. They'll talk a good game and get it badly wrong, because they're guessing. Connecting AI to people context is exactly what takes it out of the generic. Except here, connecting it wrong cuts deeper than in any other area, because it's not leaking a number, it's leaking a person's life.
The core idea of this lesson. AI is only truly useful when it works with real people data, and the FORMAT of the data decides the path. Structured data (payroll, ATS, time-tracking system) often doesn't even call for vector search: AI reasons over the schema, the statistics, and a sample. Text documents (policy, contract, employee handbook) call for RAG, search by meaning. Reports with charts and tables (a climate survey in PDF, a headcount dashboard) break traditional RAG, and that's where reading the page as an image comes in. But in HR there's a difference that changes everything: before anything else, the security check is DOUBLED UP. It isn't "the company's sensitive data", it's the personal data of an identifiable person, and sometimes truly sensitive personal data, under LGPD.
01The format of people data decides the path
The first thing that changes everything is to stop treating "HR data" as one single thing. There's no single path for connecting AI to your people. What exists is the data's format, and the format dictates the road.
Think with me about three types of information that live in every HR department. There's structured data, which lives in rows and columns: the export from the ATS or from Gupy, the payroll, the time-tracking system. There's the plain-text document: the termination policy, the employee handbook, the CLT and internal rules, the employment contract. And there's the visual report: the climate survey in PDF with a heat map by area, the headcount dashboard with a colored table.
These are three different natures, and each calls for a different tool. Trying to force all three down the same path is mistake number one. The @datasciencebrain study hits exactly this point: the data's format decides the memory architecture, not the other way around.
02Structured data: AI reasons over the schema, it doesn't need vectors
This is where the most common mistake of anyone who just learned RAG lives: thinking ALL data needs to become vector search. It doesn't. And in HR, a good chunk of your information already lives structured, in rows and columns, straight from the payroll system or the ATS.
When the data is a headcount export or a turnover-by-area table, AI gains almost nothing from turning every cell into a meaning coordinate. What it needs is to understand the STRUCTURE: what the columns are, what each one means, the total row count, the sum of each column, the value range. Instead of "searching for similar chunks", it reasons over the schema, over the statistics (average, sum, max, min), and over a sample of a few representative rows.
Think about the practical difference. To answer "which area has the highest turnover", AI doesn't need a fuzzy semantic search. It needs to look at the payroll table, sort the termination column, and read the first row. That's reasoning over structured data, not vector search. It's cheaper in tokens, more precise, and it doesn't carry the risk of the search pulling up the wrong person's history.
The takeaway is direct: before you build a whole RAG for your people data, ask whether the data isn't already structured. If it is, the path is to give AI the schema, the statistics, and a sample, and let it calculate. Fair enough?
03Document and visual report: two paths that don't mix
Now the other two formats, which a lot of people treat the same way and shouldn't.
The text document is the natural territory of RAG, exactly like you saw in the RAG and agent memory lesson (2.4). The termination policy, the employee handbook, the employment contract: all of that is plain text, and AI finds the right answer by searching for meaning. You ask "what's the notice period in this policy" and the meaning search pulls the right passage, even if the policy says "transition period" instead of "notice period". For text, RAG solves it.
The visual report is where the trap lives. Take your climate survey's PDF: it has a heat map by area, a table of eNPS by seniority, numbers aligned in columns, a legend that changes the meaning of the chart next to it. If you feed this PDF into a traditional RAG, it extracts the text and SCRAMBLES everything: the heat map becomes a soup of loose numbers, the table disappears, the relationship between the area and the index gets lost. Traditional RAG breaks on the visual report, and the worst part is it breaks silently: it hands you a number that looks right and is wrong, pointing to the problem in the wrong area.
The way out is to read the page as an IMAGE. Models with vision (multimodal) look at the PDF like a photo of the page, see the table as a table, the heat map as a chart, and preserve the relationship between the area and the index. It's the difference between blindly transcribing a climate survey and actually looking at it.
04Doubled-up security: here it's genuinely personal data
Everything we've seen so far is about getting AI to be right. Now the point that, in HR, can knock you down in a different way than in finance: what leaves the company isn't just a number, it's a person.
The instant you connect AI to your team's data, the security check is DOUBLED UP compared to any other area. It isn't "the company's sensitive data", like a price or a margin. It's data that identifies a specific person: name, national ID, performance review, termination reason. And sometimes it's truly SENSITIVE personal data, as defined in article 11 of LGPD: health, maternity leave, orientation, among others. This type of data calls for a level of care that not even financial data always requires.
There are three layers of protection that go together, and here they're even stricter. The first is anonymization: swap a person's name for a code before sending it to AI, mask the national ID, aggregate by area instead of exposing the individual, whenever the question can be answered in aggregate form. The second is choosing where it runs: sensitive personal data calls for a model running locally or in a closed environment, never the public cloud without anonymizing first. The third is the gateway, the gate that sits between you and the model and BLOCKS what can't pass through, logging everything that did, because in an LGPD audit that log is what proves you handled the data with care.
This gateway is the same concept as the Stack plus AI Gateway you saw in the Machine Room, and it connects directly to the execution-governance lesson (4.4). Here the difference is named after a labor lawsuit, an ANPD fine, and broken trust with your own team. Leaking an employee's sensitive data isn't like leaking a margin number: it's a person's life exposed.
05Putting it all together: from generic data to your people's data
Now you can see the whole picture. Connecting AI to people context is what takes it out of the generic, it's what makes it stop guessing and start answering with your ATS, your payroll, your climate survey right in front of it. But connecting is a double-edged sword that cuts deeper in HR: connect it wrong and it either leaks information that identifies a person, or it invents a finding that looks true about a real person.
The mental sequence that protects you is always the same, with one extra step at the end. First, look at the FORMAT of the data and choose the path: structured becomes reasoning over the schema, text becomes RAG, visual report becomes reading as an image. Second, before you plug anything in, run the doubled-up security check: does this data identify a person, is it sensitive data under article 11, does it need anonymizing, does it run locally or in the cloud, is the gateway in the middle. Format first, security always, and in HR that security is never optional or "case by case".
Whoever understands this order stops treating AI as a magic box that guesses findings about your team and starts treating it as an analyst you give access to, with rules, over what it can see about real people. Fair enough?
Do it now
Take a real case from your HR where AI answered off the top of its head and got it wrong, or one where you haven't even tried using AI yet: your real task.
- List 3 data sources that would contain the right answer (ATS, payroll, climate survey, termination policy, employment contract).
- For each source, classify the FORMAT: structured (rows and columns), text document, or visual report (table and chart on a page).
- Mark the path for each: structured leads to reasoning over the schema, text leads to RAG, visual report leads to reading as an image.
- Run the DOUBLED-UP security check on each source in one line: does this data identify a person? Is it sensitive personal data (health, leave, among others under art. 11)? Does it need anonymizing? Does it run in the cloud or does it call for a closed environment?
- Point out which of the three sources is the most sensitive and write, in one sentence, what the gateway should block in it.
You've just designed your AI's connection to your people through the right path and with the doubled-up security gate in place. You're ahead of whoever just dumps the climate survey into a chat and prays.
Practice
1. You need AI to answer 'which area has the highest turnover' from your payroll export. What's the most suitable path?
2. Why does feeding the climate survey's PDF (with heat map and tables) into a traditional RAG tend to point to the wrong area?
3. Before connecting AI to HR data involving an employee's health or leave, what's the correct posture?
</content>
For the board
On the diagnosisit is guessing because it never opened your ATS, your payroll, your history.
On formatpayroll is structured and calls for reasoning over columns. A visual report breaks traditional RAG in silence.
On securitythis is genuinely personal data. The check comes before any connection, not after the scare.
Thanks for the feedback. It helps sharpen the next lesson.