Inspiration

When I asked an AI to polish a cold email to a professor, I knew sending my name, the professor's name, and our contact details to a cloud service was probably fine. It still felt uneasy. So I replaced every name with "XX", pasted the reply back, and filled the names in again by hand. It was tedious, and the whole burden of managing the risk was on me.

Reassurance like "your data is safe" does not remove that feeling. I wanted a chat where you can see what stays on your device and decide what goes to the cloud.

What it does

  • On-device chat by default. Messages are answered by Gemini Nano inside Chrome. The input box always says it only talks to the AI on your device.
  • Finds private details on the device. Regular expressions (emails, phone numbers, links, card numbers), pattern rules (names after "Prof.", "Dear …,", "I am …"; "… University"), and Gemini Nano for context-dependent names, organizations, places and health details.
  • Bump mode: a pause before anything leaves your device. A sidebar shows exactly what the cloud will see. Flip a switch per item, click a placeholder in the preview, select any text to hide it, or just say it: "also hide HCI", "the email is fine". Gemini Nano turns that instruction into structured changes, and the app applies only what it can verify.
  • Ask Gemini in the cloud with details hidden, or copy the masked text for another AI and paste its answer back.
  • Restore on your device. Flip "Restore my details" to swap the placeholders back to your real details, on your device. A receipt shows how many details never left your device.
  • Works without on-device AI too. If the browser cannot run Gemini Nano, every message goes through Bump mode first, and raw text is still never sent as is.

How we built it

React + TypeScript + Vite, deployed on Firebase Hosting. All AI calls go through Firebase AI Logic (firebase/ai) with the Gemini Developer API, protected by Firebase App Check (reCAPTCHA Enterprise in production, the debug provider on localhost).

The hybrid split is the core of the design:

Task Inference mode Why
Main chat answers ONLY_ON_DEVICE The raw message contains private details
Finding context-dependent private details ONLY_ON_DEVICE + JSON responseConstraint Works on the raw message
"Just say it" edits in Bump mode ONLY_ON_DEVICE + JSON responseConstraint Sees the raw message; code applies and validates the changes
Answering the masked message PREFER_IN_CLOUD Only placeholders leave the device; falls back to the device when the cloud is unreachable
Restoring the answer No AI Exact placeholder replacement in code

Every model that sees raw text uses ONLY_ON_DEVICE, so it throws instead of silently falling back to the cloud. The UI reads response.inferenceSource and labels every answer with where it was actually produced.

Challenges we ran into

  • Silent fallback. Hybrid modes are designed to switch automatically, which is great for developers but invisible to users. During testing, a cloud call blocked by App Check quietly fell back to Gemini Nano. Without showing inferenceSource, we would have believed the cloud answered. That is exactly why raw text uses ONLY_ON_DEVICE, and why every answer is labeled.
  • Trusting on-device findings. A small model can invent items. Every item Gemini Nano returns must quote the original text exactly, or it is dropped. Instruction edits come back as JSON and are applied only if they match real items.
  • Keeping placeholders intact. The cloud model sometimes rewrites placeholders. A short note asks it to keep them, the preview shows that note too, and restoring tolerates small changes such as [ name_2 ].
  • Language support. Gemini Nano's output languages do not include Korean yet, so the app and demo are in English.
  • App Check setup. reCAPTCHA v3 (classic) is deprecated for App Check, so we moved to reCAPTCHA Enterprise.

Accomplishments that we're proud of

  • Raw text never leaves the device in any environment, including browsers without on-device AI.
  • The cloud preview is the real payload: what you see is exactly what is sent, including the placeholder note.
  • On-device chat, detection and restoring work offline, and the same answer box shows the cloud's view and the restored view with one switch.

What we learned

Privacy is not only a technical property but also a feeling. Hybrid AI lets us choose where each step runs, and the user experience should make that choice visible. Technically, we learned how inference modes, structured output on the device, and App Check fit together in a real app.

What's next for PromptBump

  • A Chrome extension that adds Bump mode on top of any AI chat site
  • Protecting unpublished research ideas by abstracting them, not just masking names
  • More languages as on-device models support them

Built during the hackathon

All code was written during the hackathon period (Nov 2026). Development used Claude Code (an AI coding assistant) for writing code; I designed the product, the hybrid split and the privacy flow, and tested and decided every change. Firebase services used: AI Logic (Gemini Developer API, hybrid inference with Gemini Nano in Chrome), App Check (reCAPTCHA Enterprise), Hosting.

Built With

Share this project:

Updates

Submission history