Inspiration
There is a ritual every team goes through. There is a document with the answer in it, and there is a policy saying not to send it anywhere. The usual resolution is to retype it, which loses the exact wording or to guess, which is worse. Meanwhile the whole point of a cloud model is that it has seen more text than you have.
I wanted the opposite of a privacy warning sticker: a checkpoint that actually stands between the document and the request. Not a redaction tool you run by hand, and not a "paste anything" wrapper that pretends the risk is gone. A thing that reads the document on your machine, decides what an identifier is, sends only what is safe to send, and puts the real values back into the answer when it comes home.
The name came from the same idea. To elide something is to leave it out of a printed account while keeping the record intact. The document stays readable, the sensitive part stays off the wire.
### What it does
Elide ships as two surfaces over one engine: a web workbench and a Chrome side panel.
1. Paste a document. Names, record and patient IDs, account and card numbers, postal addresses, email addresses and phone numbers are located and replaced with tokens such as ⟦NAME_1⟧, ⟦ID_1⟧, ⟦ADDR_1⟧, ⟦ACCT_1⟧ and ⟦CONTACT_1⟧. The map from token back to the real value never leaves the tab.
2. Ask a question. Only the redacted text and the question are sent. The cloud model answers a question about the document without ever receiving a name, a record number or an address. The exact outbound payload is inspectable in the crossing detail drawer.
3. Read the answer. The answer streams back containing tokens. Elide resolves them in place, locally and marks each restored value so you can see what was put back.
4. Check the ledger. Every crossing is recorded with counts, provenance, timings and the policy version that produced it. The team ledger in Firestore holds counts only. No text, no titles, no originals
### How it works: two tiers, one SDK
This is a hybrid AI build, and the hybrid is the point.
- The scrub pass runs in
InferenceMode.PREFER_ON_DEVICEthroughfirebase/ai, so Gemini Nano can read the document inside Chrome on the user's own machine. The model is asked for a single structured JSON response: type, exact span, replacement token, confidence. - The answer runs in
InferenceMode.ONLY_IN_CLOUDagainstgemini-3.5-flash-lite, because reasoning about a long clinical note is exactly what a cloud model is for. - Provenance comes from the SDK, fromresponse.inferenceSource, never from a timing heuristic. The product has three honest states:ON_DEVICE,IN_CLOUDandRULES_ONLY. Each one has its own stamp, its own label and its own column in the ledger.
Neither tier can do the job alone. A small on-device model is good at finding a name in a paragraph and bad at summarising a page of notes; a cloud model is the opposite. The scrub needs to be local because that is the only way it is a privacy boundary. The answer needs to be remote because that is the only way it is a good answer.
Underneath the model sits a deterministic backstop that runs first: email patterns, phone-shaped digit runs that fail the Luhn check, IBANs validated with the mod-97 algorithm, Luhn-valid 13 to 19 digit cards, the policy pattern library, and your own custom terms. Rules outrank model spans, longer spans win within an origin, and adjacent spans of the same type coalesce. The rules are not a fallback. They are the floor the model is allowed to improve on.
### The part I am proudest of: the fallback is visible
Most privacy tools only tell you what worked. Elide tells you what did not.
Take the device tier away and the scrub degrades to the cloud, or to rules alone with no network. The stamp above the result changes, the copy above the result changes, and the ledger records scrubInference: IN_CLOUD in a column headed Fallback. A privacy tool that hides its own fallback is lying to you, and a judge should be able to see the lie in one glance.
The landing page carries four honest limits in public, before the install button: an identifier Elide has never seen, images and PDFs, meaning that hides in plain prose, and the remote model's own retention. The claim above them is deliberately narrow:
Elide removes identifiers from text before it is sent to a cloud model, and restores them afterwards. It cannot guarantee that no re-identification is possible, because prose can imply identity without naming it. It does not control what the remote provider retains. It is a reduction in exposure, applied before the request, not a guarantee of anonymity.
### The ledger holds counts, not content
The team ledger is opt-in and append-only. The Firestore rules allowlist exactly seven keys (uid, counts, flagged, scrubInference, answerInference, policyVersion, createdAt), allowlist the six count keys inside counts, scope every read to the writing user, and deny update and delete outright. Three rejections were verified against the Firestore emulator on 25 November 2026: a create carrying an extra text field, a read of another user's crossing, and a delete. The ledger is the kind of record an auditor would accept, which means it cannot become a second copy of the document.
### The extension asks for almost nothing
The Chrome side panel requests sidePanel and storage. No tabs, no activeTab, no <all_urls>, no content scripts. Elide does not read the page you are on. It is a checkpoint you open, not a watcher you install. A panel that can see every site you visit is not a privacy product with a side panel, it is spyware with a side panel.
### What I learned
- Hybrid inference is not "on-device or cloud". It is two calls with two different jobs, and the interesting work is in the seam between them: what the local tier is trusted to decide, what the remote tier is trusted to decide, and what the user is told when one of them fails. - Provenance has to come from the platform. My first build inferred the source from how long a call took. That is a guess dressed as a fact. The SDK returns
inferenceSource; the moment I read the real value the stamp became trustworthy. - Rules are a floor, not a fallback. A checksum-validated card match and a model "I think this is a name" are not the same kind of claim, and the merge order should reflect that. - A policy is a product surface. "What counts as an identifier" is not a settings page, it is the product. Adding a pattern for a field your domain cares about took four lines of UI and changed what the tool could promise.
- Privacy UX is disclosure. The value was not in hiding more. It was in being precise about what was hidden, what was guessed at, and what was left behind.
### Challenges I hit
- The IBAN rule was wrong for the most common IBANs. The original pattern
\b[A-Z]{2}\d{2}(?:[ ]?[A- Z0-9]{4}){2,7}\bonly matches lengths that are a multiple of four, so Spanish, Polish, Swedish, Belgian, Cypriot and Luxembourg IBANs were caught while the standard 22-character GB, DE, NL and AT-22 IBANs were not. I found it by pasting a real GB IBAN and getting nothing back. The checksum was doing the real work all along; the pattern just needed to stop lying about what it could match. - The scrub tier had to survive losing the network mid-flight. The model is fetched with a dynamicimport('firebase/ai'), so a cold chunk that cannot load turns into a thrown exception rather than a degraded pass. The scrub now has to load its tier before the network is cut, and the failure path has to be a stated fallback rather than an empty screen. - The local ledger lives in memory. A page reload wipes it, which means the demo cannot reload between the two takes. That constraint shaped the capture script and the order the scenes are shot in. - The provenance stamp lied. The first build labelled a cloud answer as if it had run on device. The fix was two lines, but it is the kind of bug that destroys the entire premise of the product, so it now has its own test and the deployed site needs a redeploy.
- Naming a product for removal is hard. "Redact", "scrub" and "sanitise" all sound like cleaning. Elide sounds like a printing decision, which is exactly the analogy: the record stays intact, one part is left out of the public copy.
### What's next
- A shared team policy that travels through Remote Config without replacing local additions blindly. - A "why was this withheld" inspector that explains which rule or which model span produced each token. - Redaction for scanned PDFs, which today are flagged rather than processed.
### Built with
React 19, TypeScript in strict mode, Vite 7, Tailwind CSS 4, motion/react, Firebase AI Logic, Gemini Nano, Gemini, Firebase App Check, Firebase Remote Config, Cloud Firestore, Firebase Authentication, the Chrome Extension side panel API, Vitest, and Vercel.
### Licence
Apache-2.0.
Built With
- chrome
- chrome-side-panel
- cloud-firestore
- config
- data-loss-prevention
- firebase
- firebase-ai-logic
- firebase-app-check
- firebase-auth
- firebase-remote
- gemini
- gemini-nano
- hybrid-ai
- manifest-v3
- motion
- on-device-inference
- pii-redaction
- privacy
- react
- tailwindcss
- typescript
- vercel
- vite
- vitest