-
-
The first screen: a real council press release, before and after.
-
iPhone app: the same press release on the device (9.5 s) and in the cloud (1.5 s).
-
A letter with personal details is stopped by the privacy guard: nothing is sent.
-
A real GOV.UK press release explained, with all 20 of its numbers kept.
-
Measured, not claimed: accuracy, completeness and reading age, on the device and in the cloud.
-
History mode: how Lincoln's Gettysburg Address persuades.
-
How it decides where each text runs, and why. Personal details never reach the cloud.
Inspiration
In April, I wrote an essay at King's College London about whether people should have to pass a test to vote. I found myself coming back to a more practical question: how easy do we make it for people to get informed in the first place? Bills, speeches and leaflets are long, full of jargon, and mix facts with spin, so most people rely on someone else's summary, which usually comes with someone else's opinion. The people who most need a plain version are first-time and young voters, people who find long official text hard (for example with dyslexia), and people reading in a second language. That's why I built Plain Politics. If you're reading a council plan or a campaign leaflet, you can quickly see what it says, who it affects, and which claims you can check for yourself. It never tells you what to think, and because what you read about politics is personal, it keeps your reading on your own device whenever it can. I care about this because I think democracy works better when people can read what their politicians actually wrote, not just what someone else says it means.
What it does
An 18-year-old, about to vote for the first time, is handed a council press release: 165 words of official language about a housing plan. They paste it into Plain Politics and press Explain. About two seconds later the first words appear, written by Gemini Nano on their own laptop, and a front page builds up: "Brookfield will build 1,200 new homes by the river, but people disagree on whether it is a good idea." Then what the plan says, two claims worth checking and where to check them, who it affects, the jargon in everyday words, and the questions to ask. The sticker says Ran on your device · Gemini Nano · nothing sent: what they read about politics stayed with them.
That is the whole idea: political text in plain words, private first. It also helps anyone who finds official text hard, like people with dyslexia or people reading in a second language.
Why now. The UK's Representation of the People Bill would give the vote in all UK elections to 1.7 million 16- and 17-year-olds (UK government figure, Feb 2026). It has passed the House of Commons and is now in the House of Lords. In Scotland and Wales, 16-year-olds can already vote in their own parliaments' elections. That is a lot of people reading political text for the first time.
Hybrid, for a reason. Under UK and EU data protection law (GDPR Article 9), personal data revealing someone's political opinions is "special category data", which needs extra protection, and what you read about politics can reveal what you think. So Plain Politics decides before anything leaves your device where it may run: Gemini Nano in Chrome or Apple Intelligence on iPhone first, Gemini in the cloud through Firebase AI Logic only when the device can't (an older laptop, a long bill, a video), and never the cloud for a text with personal details. When you check a claim, the cloud sees one public sentence, not your article. Honestly: on the device today means desktop Chrome on a capable computer (Microsoft Edge works too, with its own built-in model), or an iPhone with Apple Intelligence (iPhone 15 Pro or newer); everyone else gets the cloud, still behind the privacy guard, and the sticker always says which.
Real texts too: besides made-up samples, one click loads a real GOV.UK press release (the April 2027 minimum wage rates), and the extension explains any real page.
Also in it: Check this claim · Spot the spin · Compare two texts · History mode for real speeches · read a leaflet photo, a speech video or a YouTube link · works offline · five languages · read aloud, reading age, easy reading · share as a front page · a Chrome extension and an iPhone app.
The details
Every explainer is laid out like a newspaper front page: In one sentence, What it says, Claims worth checking, Who it affects, Words explained, Questions to ask, in English, Italian, French, Spanish or German. You can paste a news article, a speech, a bill or a manifesto, read one from a photo of a leaflet, a speech video, a recording or a YouTube link, or click the toolbar icon on any news page.
Three tools need no AI at all: the privacy guard, Spot the spin and the reading age are plain code on the device, so they work in any browser, offline, and give the same result every time.
Spot the spin: marks loaded words in the original (emotional words, sweeping words, us and them, pressure, soft promises, no source), with a plain reason for each kind. Always on the device, no AI, the same result every time; it notes that every side uses these words.
Compare two texts: two parties' plans side by side: where they agree, where they differ (an A and a B line per topic), who each would affect, claims from both. It treats both the same and never says which is better.
History mode for real speeches (Lincoln 1863, Pankhurst 1913, Roosevelt 1941): adds How it tries to persuade (named techniques, each with a quote) and Historical context, marked as the AI's general knowledge.
Check this claim: says what kind of claim it is and where the evidence would be, with Google Fact Check Explorer and Search buttons. It never guesses true or false. Only the claim itself (one sentence) can go to the cloud.
Privacy guard: a pattern check on the device finds personal details (emails, UK and international phone numbers, home addresses, postcodes, card, bank and National Insurance numbers, dates of birth, and a name given as "my name is…" in all five languages) while leaving public places like 10 Downing Street alone. Contacts an organisation publishes (a press office's number, an enquiries@ or gov.uk email, the "Promoted by … at" line every UK election leaflet must carry) count as public, so real press releases and leaflets go through. A text with personal details is blocked from the cloud: it runs on the device, or nothing is sent until one button removes them, and the warning shows exactly what it found.
Works offline: install it like an app; with no connection, explainers run on the device.
Share as a front page (a picture for WhatsApp or Instagram), a print edition, read aloud, a reading age for the original and the explainer (it says so when the original was already easy), larger text and an easy-reading mode for dyslexia, and a private library.
Where it ran: every explainer gets a sticker, RAN ON YOUR DEVICE · GEMINI NANO · NOTHING SENT or RAN IN THE CLOUD · GOOGLE GEMINI · FIREBASE AI LOGIC, with the seconds it took, and a route strip: Your text → Privacy guard → Your device / Cloud.
iPhone app: the same explainer, privacy guard, Spot the spin and Listen, running on Apple Intelligence first and Gemini in the cloud as backup. Every word follows the phone's text size, up to the largest accessibility size.
How we built it
What runs where, and why. Hybrid is the point, not a fallback: political reading is private, so the device goes first, and the cloud makes it work for everyone else.
| What | Where it runs | Why |
|---|---|---|
| The explainer | Device first (Gemini Nano in Chrome, Apple Intelligence on iPhone); Gemini in the cloud through Firebase AI Logic only if the device can't, or if it fails partway (the app then hands over to the cloud itself, once) | Reading stays private where it can; still works on any browser or phone |
| A text with personal details | Device only, or nothing is sent until you remove them | Names and addresses never reach a server |
| No connection | Device only | It still works on a train or with Wi-Fi off |
| A long bill, a speech video, a YouTube link | Cloud | Too big for the on-device model |
| A leaflet photo | Device first; asks before using the cloud | A photo can hold more than you meant to share |
| Check this claim | Device first; in the cloud, only that one sentence | Your article never leaves for a fact check |
| Privacy guard, Spot the spin, reading age | Device, no AI | Instant, the same every time, works anywhere |
- Firebase AI Logic hybrid inference is the core, on two platforms:
- Web (Chrome): Gemini Nano in Chrome first, Gemini in the cloud as backup. A tested routing function (
src/route.ts) picks the mode for every request:prefer_on_devicein Auto;only_on_deviceoffline, for "This device only", and for any text where the privacy guard found personal details;only_in_cloudfor "Cloud only", long texts, unsupported languages, and video. The stamp readsinferenceSource, so it always says honestly where the answer came from. Photos go to Chrome's on-device model as images; if it can't take them, the reader is asked before anything goes to the cloud. - iPhone (SwiftUI): a hybrid session with Apple's on-device model (Apple Intelligence, Foundation Models) as primary and Gemini as secondary; the stamp reads the response's model version. The privacy guard, routing, prompts and Spot the spin are ported to Swift and checked against the same cases as the web (93 checks).
- Web (Chrome): Gemini Nano in Chrome first, Gemini in the cloud as backup. A tested routing function (
- Same prompts everywhere: the device and the cloud get the same instructions, so they give the same sections. The rules keep it neutral, limited to what the text says, and copying every number exactly.
- Speed, measured: the device is slower than the cloud, and that is the price of privacy, so the app shows it honestly on every answer.
| Balanced unless noted | On the device | In the cloud |
|---|---|---|
| Chrome on a MacBook, Gemini Nano vs Gemini (20 Nov; Quick / Balanced / Detailed) | 7.8 / 15.3 / 25.2 s | about 1.6 s (median of 45 cloud runs, 1.2-2.4 s) |
| iPhone app, council press release (iOS simulator on a MacBook, 27 Nov) | 9.5 s | 1.5 s |
| iPhone app, campaign speech (26 Nov, 2 runs) | 8.3-8.6 s | 2.5-3.8 s |
| Apple's on-device model on a Mac, every sample (37 runs of the accuracy check) | median 9.4 s (7.0-20.5) | |
| Microsoft Edge on a Windows PC, its own built-in model (the real press release) | 23.1 s |
On the device the first words appear after about 2 s, so it never looks stuck; the model is warmed up in the background.
- App Check (reCAPTCHA) protects every AI call, and starts only on first use, so opening the page sets no Google cookie. Remote Config holds the cloud model, the device text limit and the claim-check mode. Anonymous Auth + Firestore power the private library (with an offline copy), with rules that check every field. Hosting serves the site and its offline service worker.
- Chrome extension (Manifest V3): reads the page with
activeTabonly, and shows the app in Chrome's side panel in an iframe allowed to use the on-device model. - Design: a "Broadsheet" design system (
STYLE.md): black ink on warm paper, a blackletter masthead, ballot-paper touches (mark the level of detail with an X; a sticker says where it ran), and no party colour, because the app takes no side. Rust means only "pay attention". - Measured, not claimed: accurate, complete, plainer, on every built-in sample, with three small checks anyone can rerun from the repo (
tools/):- Accurate: every number in an explainer is looked up in the original. With the final rules, four cloud runs (45 explainers: Today, History, Compare and a real GOV.UK press release) found 262 of 262, every explainer with all its sections. Earlier versions slipped 4 times, always the same way ("cut in half" became "50 percent"); the rule is now repeated where that happened. A hand check found each number with the right thing (every fare and budget with the right party).
- Complete: the key facts a reader must not lose, listed for each sample before checking: 90% kept in the cloud on Balanced (a detail like "eight storeys" can drop out; Detailed keeps more).
- Plainer: the explainers' reading age is 12.5 in the cloud against 14.9 for the originals (the real press release: 16 → 13). A text that is already plain stays plain, and the app says so rather than claim a drop.
- On the device too: the same checks on Apple's on-device model, the iPhone app's first choice, with the app's own Swift prompt, four runs: 181 of 184 numbers in the original (all three extras were the same correct definition, "score: a period of 20 years"), every section there, 88% of key facts, a reading age of 10.5, about 10 s. It is plainer but slips more: once it wrote that the minimum wage will reach two thirds of median earnings, when the press release says it won't.
- Limits, honestly: these check numbers, listed facts and sentence length, not every shade of meaning; Gemini Nano in Chrome can't be driven by a script, so its timings come from runs by hand (table above).
- Quality: Lighthouse 100 / 100 / 100 / 100 on a phone (98-99 for speed on desktop); accessibility checked with axe-core on every screen a visitor sees, in light and dark, on a laptop and a phone: 0 problems; 50 unit tests and 93 iPhone checks; an end-to-end browser check of every feature before each release; AI-assisted code reviews (Claude Code) that found privacy edge cases, all fixed with tests. TypeScript + Vite and Swift. I used Claude Code as my coding assistant.
Challenges we ran into
The model sometimes changed how numbers were expressed, for example turning a percentage into a count. The privacy guard also blocked public election leaflets at first, because it treated published contact details as private. And early on-device runs were slow to start, so I warmed up the model in the background. Those fixes made the explainers more faithful to the source, made the app work with real election leaflets, and got the first words on screen sooner.
Others we found and fixed:
- A code review found two ways personal details could still reach the cloud (checking a claim after switching to Cloud only, and a name given in one text of a comparison). Both now stay on the device, with tests.
- reCAPTCHA set a Google cookie on every visit, even for people who never used the cloud; App Check now starts only when needed.
- The on-device models write plainer than the cloud (reading age 10.5 vs 12.5) but follow the finer rules less strictly: Apple's model sometimes writes "he" for a candidate whose gender the text never gives, although the prompt says not to guess. The cloud follows it; the sticker always says which one wrote the explainer.
- A lesson about small models: when a prompt rule gave an example with a name in it, Apple's on-device model copied that name into the explainer of a bill that names nobody. Our own check caught it the same night; the prompts now give patterns, never example names, and a test makes sure no example name comes back.
- Google's cloud model sometimes stopped mid-answer when overloaded, so the app retries and says so.
- A live check in Microsoft Edge ran the explainer on Edge's own built-in model, while our sticker said "Gemini Nano". The sticker now names the model by browser, with a test.
Accomplishments that we're proud of
- Private first on two platforms: political reading stays on your own device whenever it can, and texts where the privacy guard finds personal details are blocked from the cloud until you remove them.
- Neutral by design, down to the colours, and it shows you the spin without telling you what to think.
- It always tells you where it ran and how long it took.
- A complete product: offline, installable, accessible (Lighthouse 100), five languages, with an extension and an iPhone app.
- Real people tried it: my parents and some of my friends tested the website and told me where they thought it could be useful. My dad asked for an easier way to start over and explain a new text, so I added an Explain another text button that same evening. My mum described the layout as "clear and visual". Their feedback helped me see what was already working and what I could make easier to use.
What we learned
In my first on-device test, the app confidently turned "at least 35% of the homes" into "at least 350 homes". What surprised me was that the answer still sounded convincing. So I made it a rule to keep the original numbers, and built a check that compares the numbers in each explainer with its source.
What's next for Plain Politics
I don't want this to end with the hackathon. Next, I want to test it properly with first-time voters, because they're the people I built it for.
- A proper study with first-time voters: how well they understand a real text with and without Plain Politics.
- A small open model (Gemma) fine-tuned for neutral explainers, so it runs privately in any browser and on any phone.
- An Android app with Gemini Nano, and the iPhone app on the App Store.
- Live sources for claim checks, and Spot the spin word lists in more languages.
Built With
- apple-intelligence
- chrome
- claude-code
- cloud-firestore
- firebase-ai-logic
- firebase-app-check
- firebase-authentication
- firebase-hosting
- firebase-remote-config
- foundation-models
- gemini
- gemini-nano
- service-worker
- swift
- swiftui
- typescript
- vite