What the AI really sees with Shield: the code table and the three rules

What reaches the AI provider, what stays on your computer, the Shield codes, and the three rules that limit leaks.

By RAGbase Published on Updated on 5 min read

When a lawyer uses Claude with RAGbase Shield, what does the AI provider actually read? This post answers with two tables. It also explains the three rules that decide whether Shield can protect you or not.

What leaves, what stays

Reaches Anthropic, the provider of ClaudeStays on your computer
Masked text with codes (PERSONNE_A, SOCIETE_A, IBAN_1)Real names and real numbers
Facts, dates (except dates of birth), amounts, legal reasoningThe code-to-name table (the “vault”), encrypted
Courts, laws and articles citedThe vault encryption key
The dossier code (DOSSIER_1) and masked file namesThe real dossier name and folder path
Your questionThe local journal (events, codes and counts only)

Source: Shield README, table “What reaches the AI provider, what stays with you”.

Shield sends nothing to RAGbase and sends no usage statistics. Shield makes no network call. The AI, on the other hand, runs at the provider.

The code table

What is maskedCode
PersonPERSONNE_A, PERSONNE_B, …
CompanySOCIETE_A, …
Postal addressADRESSE_1, …
Email, phoneEMAIL_1, TEL_1
IBAN, payment cardIBAN_1, CARTE_1
French social security number (NIR)NIR_1
SIREN, SIRET, EU VAT numberSIREN_1, SIRET_1, TVA_1
Case references (RG, pourvoi, Portalis, ECLI)RG_1
Other identifiers (ISIN, LEI, passport, licence plate, IP address)IDENT_1
Websites and URLs (except well-known public sites)SITE_1
Date of birthNAISSANCE_1

Source: Shield README, table “Codes”.

Three things to know about these codes.

One code per person and per dossier. “M. Mercadier”, “Thibault Mercadier” and “MERCADIER Thibault” all become PERSONNE_A. So the AI can follow a person from one document to the next.

Codes in order, not a computation. The first name becomes PERSONNE_A, the second PERSONNE_B. A code is never computed from the name. Without the vault, it says nothing.

What Shield does not mask. Courts, institutions (Cour de cassation, CNIL, URSSAF), laws, codes, articles, months and days stay readable. The AI needs them to reason about the law.

What the AI cannot do

The AI cannot ask Shield for the real names. No tool gives them back to it. Only your computer puts them back.

In the Claude app, Shield is a program that runs on your computer. Its tools take dossier codes and document codes, never raw text. Claude reads the masked documents, then saves its draft with Shield. Shield writes the document, with the real names, into the “Shield - sorties” subfolder of the client folder. Claude only gets the answer “saved” and a file code. When you restore, Shield also lists the codes it does not know, for example a code the AI invented.

The three rules

Shield protects only what goes through it. Hence three rules, to remember and to give to the team.

Rule 1: choose the folder in the Shield window. Do not add it to the conversation

A file attached or a folder added to the conversation reaches Anthropic before Shield can act. In a new conversation, write “Protect a folder with Shield” and choose the folder of one client in the Shield window. Shield gives it a code (DOSSIER_1) and reads the documents. Then ask Claude, for example: “Read the documents of DOSSIER_1 and draft submissions. Save the final document with Shield.”

Rule 2: do not paste raw text into the chat box

Text typed or pasted straight into the conversation is not masked: for a document, go through the protected folder. To talk about a person in the chat, write their code (PERSONNE_A), not their name.

Rule 3: text already sent cannot be recalled

If a name was sent by mistake, Shield cannot undo it. You can delete the conversation in the AI app. How long it is kept then depends on the provider’s terms. From now on, write the person’s code, not the name.

Two traps to know

The work folder of the conversation is not protected. The folder control near the message field gives Claude the real content. Only a folder chosen in the Shield window is protected.

Detection is never complete. A rare name, a foreign name, a nickname or a typo can slip through. Read the sensitive passages again: a name on its own can be missed. Read the final document again too.

Try Shield

Shield is free and open source. On the Install page, click “Add Shield to Claude on Mac” or “Add Shield to Claude on Windows”. In the Claude app, click “Sync”, “Add”, then “Continue”. Nothing else to install. You need the Claude app, with a paid Claude plan. To see the masking without installing anything, try the demo. The limits of Shield are on the Limits and compliance page.

Sources

  • RAGbase Shield README (README.md), tables “What reaches the AI provider” and “Codes”.
  • Shield FAQ (docs/FAQ.md) and privacy model (docs/PRIVACY_MODEL.md).
  • The Install and FAQ pages of this site.
Tags: How it worksCodesUsage

Frequently asked questions

Can I attach a file to the chat?
No. A file attached to the conversation reaches Anthropic, the provider of Claude, before Shield can act. The same goes for a folder added to the conversation. Write "Protect a folder with Shield" and choose the folder in the Shield window.
I pasted text with a real name into the chat. What now?
Shield cannot recall text already sent. You can delete the conversation in the AI app; how long it is kept then depends on the provider's terms. From now on, write the person's code, not the name.
How do I talk about a person in the chat?
Write their code, for example "Draft a formal notice to PERSONNE_B", or their role, such as "the landlord": Claude reads the documents with the codes and finds the right one. Do not type the real name: text typed into the conversation is not masked.
RAGbase
RAGbase Shield team

RAGbase builds RAGbase Shield, a free, open-source tool (Apache-2.0) for local, reversible pseudonymisation, and private AI systems installed at law firms.

Back to the blog