Anonymizing company data for an RL environment means removing every real person, organization, and confidential detail from the seed corpus while keeping the world coherent: each entity needs one consistent replacement across every email, chat thread, ticket, document, and record, so the tasks and rewards built on top of it still resolve. Placeholder redaction breaks that coherence, which is why environment builders link every mention of an entity across the corpus and replace it with a consistent synthetic identity, then keep a record of what changed.

Why reinforcement learning environments need de-identified company data

Environment builders seed reinforcement learning environments with real company data because agents have to learn to work inside the mess of an actual business. A real corporate history is full of half-finished threads, contradictory instructions, and decisions made in chat that never reached a document, and that texture is the reason environment builders seek out real company data. The usual seed sources are email archives, chat exports, support tickets, shared documents, and CRM and HR records, often acquired through AI data licensing: licensed from the companies that own them and resold to the teams that build environments.

None of that data can go into an environment as it arrives. Frontier labs won't accept an identifiable corpus, and the reasons why labs require de-identified data go beyond policy: models can memorize what they train on and reproduce it, so a real employee's phone number or a customer's complaint can resurface in an agent's output long after the environment ships. Company data also carries more than personal information. Customer names, contract terms, pricing, and internal deal discussions are confidential business information, and whoever trains on the corpus inherits the exposure if any of it survives. That makes data de-identification a precondition for using the corpus at all, not a cleanup pass at the end.

The hard part is what de-identification has to preserve. Company data de-identification for an environment is a stricter problem than it is for a static dataset, because an environment is a world an agent acts inside, and every task in it depends on who did what, to whom, and when. The identities have to go, but the relationships between them are the environment.

What makes an RL environment a coherent world

An RL environment is coherent when every fact an agent might look up resolves the same way, wherever it looks. For de-identified unstructured data, that property is referential integrity: each real entity maps to the same replacement everywhere it appears, so the links between records survive the transformation. Four things have to hold at once:

  • Across messages. Every mention of one person, in every email, chat message, and ticket comment, maps to the same replacement.
  • Across files. That replacement holds in PDFs, spreadsheets, and CSVs as well as in messages, so an attachment names the same person as the thread it arrived in.
  • Within an identity. A synthetic name's email address, chat handle, phone number, and nickname plausibly belong to it, so Dana Whitfield isn't reached at a mike.ortiz address.
  • Across an organization. Every form of a company's name maps to one synthetic organization, with email domains and addresses kept in step.

Placeholder redaction breaks all four. When every person becomes [NAME], the corpus can no longer tell anyone apart: the customer who opened a ticket and the employee who closed it collapse into one token. Naive per-file substitution fails more quietly. Each file gets plausible fake names, but Priya in the email thread becomes Marcus in the CRM export and Elena in the attached contract, so the world fragments into believable pieces that no longer describe the same events. Both are de-identification techniques with legitimate uses elsewhere, and neither keeps an environment intact.

The damage shows up in tasks. Suppose an agent must answer who approved the refund on an account. In the raw data, the answer is one manager, referenced in a ticket, an approval email, and a CRM note. Under placeholder redaction, the question has no answer; under per-file substitution, it has three. Only consistent replacement keeps exactly one, so the grader can still check it. The person who opened the ticket is still the person who closed it, and the CRM contact still matches the email sender.

SourcePlaceholder redactionConsistent replacement
Support ticketOpened by [NAME] at [COMPANY]. Refund approved by [NAME].Opened by Rosa Lindqvist at Halvern Supply. Refund approved by Theo Marsh.
Approval emailFrom [EMAIL]: "Approved. [NAME]"From theo.marsh@corvane.com: "Approved. Theo"
CRM noteContact [NAME], [COMPANY]. Refund signed off by [NAME].Contact Rosa Lindqvist, Halvern Supply. Refund signed off by T. Marsh.

How to de-identify a seed corpus without breaking the world

The order of operations decides whether a de-identified corpus still describes one world. Most of a seed corpus is free text, which is what makes de-identifying unstructured data harder than masking a database column: a name can sit in a subject line, a signature block, a spreadsheet cell, or the middle of a sentence, and nothing labels it. A dependable pipeline runs six steps in sequence.

  1. Inventory every source and format. Map what you hold, in which systems and file types, before transforming anything, so the scope of the work is known rather than estimated.
  2. Detect sensitive entities. Use named entity recognition to find people, organizations, contact details, and identifiers, then verify the candidates in a second pass to cut false positives before they become needless replacements.
  3. Link every mention to its entity. Resolve each detection back to the real person or organization it refers to, including nicknames, initials, and coreferences, so the whole corpus becomes one entity graph rather than a list of strings.
  4. Generate a synthetic identity for each entity. Create a replacement for each node in the graph and apply it everywhere, along with its dependent values, such as email domains and chat handles, and shift dates consistently.
  5. Remove confidential business information. Treat customer names, contract terms, pricing, and deal specifics as sensitive, not only personal data.
  6. Write the corpus back out in its original formats. Return emails as emails, chat exports as chat exports, and spreadsheets as spreadsheets, so the environment's tools read them unchanged.

Entity linking has to happen before replacement, and across the whole corpus rather than file by file. A pipeline that replaces as it goes can only make local decisions. It sees "Sam" in a chat message and has no way to know whether that's Samantha Reyes in finance or Sam Okafor on the customer side, so it guesses, and each guess is made in isolation. Building the graph first means every replacement decision is made with the full picture, which is the difference between a coherent world and a pile of individually plausible fragments.

The Tonic Advantage: the same synthetic identity everywhere an entity appears. Tonic.ai's company data de-identification service covers the detection, linking, and replacement steps of this sequence across a whole corpus. It's built on Tonic Textual's detection models, which run across email, Slack exports, PDF, Word, Excel, CSV, PowerPoint, and scanned images. Identity Synthesis, Tonic's proprietary approach to entity resolution and synthesis, then links each detected mention to the real person or organization it belongs to, builds a map of who is who, and generates replacements from that map rather than file by file. The same person keeps the same synthetic name and the same shifted birth date in an email signature, a Slack message, and a spreadsheet row, and every form of an employer's name maps to one synthetic organization with its email domain kept in step. Identity Synthesis maintains referential integrity across the corpus, and every engagement produces a record of what was detected and what was replaced, so you have the evidence to show it.

Keeping tasks, answer keys, and verifiers valid after de-identification

An environment adds a layer a static dataset doesn't have: tasks, ground-truth answers, and reward checks that all reference specific entities and facts. When you're de-identifying training data for a fine-tuning corpus, the job is done once the text is safe and still reads naturally. In an environment, a verifier that checks whether the agent emailed the right account manager is a match against facts in the world, and if those facts change underneath it, the reward signal breaks without raising an error.

The safest order is to de-identify the corpus first and author tasks against the de-identified version. Answer keys then reference synthetic names from the start. If tasks were already written on raw data, every answer key, grader string, and expected tool call has to be re-mapped through the same entity map used on the corpus. Miss one and the environment rewards the wrong behavior: an agent that correctly names the synthetic approver fails a check still looking for the real one.

The facts tasks depend on have to survive too. Amounts, dates, intervals, and sequences are often the substance of a task, such as a refund issued nine days after the complaint. Shifting dates by a consistent offset hides the real timeline while preserving the intervals and ordering a multi-step task relies on. Shifting each date independently scrambles them.

A handful of edge cases account for most broken tasks:

  • Names in structured fields, attachment filenames, and form labels, where text-focused detection may never look.
  • Nicknames and initials that must resolve to the same identity as the full name.
  • Organization name variants, from the legal entity to internal shorthand, that must map to one replacement.
  • A real name that doubles as a common word, such as a person named Hope or a company named Summit, where detection has to rely on context.

Verifying a de-identified corpus before the environment ships

A de-identified corpus is ready when three distinct measures hold up, and each one catches a different failure:

  • Detection recall is the share of sensitive mentions the pipeline found. It's the privacy measure: a missed mention leaves real PII in the world.
  • Precision is the share of detections that were actually sensitive. Low precision means over-redaction, which strips out the context the environment needs.
  • Replacement consistency measures whether what was detected was replaced coherently, with each entity mapped to one identity everywhere it appears.

Consistency is measurable rather than a matter of impression. PrivacyBench scores the whole job on raw email, Slack, and document exports, from extraction through write-back, and Tonic.ai tested its own pipelines alongside agent pipelines built on frontier LLMs. In Tonic.ai's PrivacyBench benchmark, Tonic.ai's Identity Synthesis pipeline led seven pipelines at 95.3% end to end, and replaced what it detected coherently 94.3% of the time, against 87.5% for the next-best pipeline. The benchmark's datasets and scoring code are public, so you can score your own pipeline against the same data.

Residual risk needs its own review. In a richly linked world, quasi-identifiers can combine to point back to the source even when every name is gone. A logistics firm in a named city with a dated acquisition can identify the company, and a job title plus a team size can identify a person. Checking for re-identification means looking at what the corpus reveals in combination, not only at individual fields.

Process evidence makes those results credible to whoever receives the corpus: a de-identification protocol agreed before the work begins, human review of the output, and a record of what was detected and what replaced it. Tonic.ai performs company data de-identification as an independent third party. Tonic.ai certifies the work on every dataset it de-identifies, with additional third-party certification available.