Inspiration

AI answers cite real pages that often do not say what the sentence claims: in a 2023 human audit of four popular generative search engines, only 74.5% of citations supported their associated sentence (Liu, Zhang and Liang, arXiv:2304.09848). Footing is a working web app that opens each cited page, checks it against its sentence, shows the page's own words, and labels where Nano or the cloud ran.

At 1 a.m. a student pastes an AI answer into her essay, citations and all. The third link doesn't say what her sentence claims, and her lecturer is the one who opens it. AI answers now come with links, and people treat the link as proof. Often the page is real and on topic but does not say what the sentence says: a figure changed, a clause added, a neighbouring fact. Nobody opens eight links per answer. We wanted a tool that does.

What it does

Paste an AI answer (or keep the real one already loaded) and press Check sources. For every sentence and the link it cites, Footing fetches the page, extracts the readable text and picks the three passages most likely to contain the claim. Then the hybrid split does the work it is built for:

  • On your laptop, Gemini Nano (through Firebase AI Logic, PREFER_ON_DEVICE) triages each readable page in about 1.7 s once warm (the first call of a run takes about 8 s): does any passage say this, and in which words? A Nano "no" that finds no related passage is shown as unconfirmed, with one click to confirm in the cloud; for those citations your sentence and the page text are not sent to any model server. A "no" that quotes related text goes to the cloud too. (The cited URL itself always passes through our small fetch proxy, which does no AI.)
  • In the cloud (ONLY_IN_CLOUD), a stronger Gemini model makes the final call: every time Nano thinks a source supports the sentence, the cloud checks whether the source says all of it or only part. PDFs and JavaScript-only pages go to the cloud too, because only the cloud can read them (a JavaScript-only page read through URL context is shown as unverified: there is no fetched text to check its quote against).
  • Code has the last word. Every quote either model offers must appear word for word in the fetched page. If not, the verdict is unverified, never supported. (That proves the words are in the page, not that the model read them right.)

Each citation gets a pencil tick as its verdict lands, with an ON DEVICE or IN CLOUD badge read from the response's inferenceSource. The total reads "k of n": of the n citations a model decided (a verdict whose quote was found in the page, or a cloud "no passage says it"), k are not fully said by their source. Click any citation to see your sentence beside the source's own words, the missing words circled, and the cloud model's one-line reason. Then Copy answer with flags and fix those sentences before anyone else finds them.

No Nano in your browser? Every check still runs in the cloud (up to 10 citations per answer automatically, more on a click), and a meter shows how many citations a Nano laptop would have read on-device first. On a Nano laptop, a route control (Auto, On-device only, Cloud only) forces either path; in a browser with no on-device model at all, On-device only reports "no on-device model in this browser" for each readable page, and the recorded Nano run at /about shows the on-device path.

Footing checks citations, not truth. It never searches the web for a better answer; it opens the exact link the AI gave you and asks whether that page says that sentence.

How we built it — how Firebase AI Logic is used

  1. getAI(app, { backend: new GoogleAIBackend() }): one client for both models.
  2. Triage, on device: getGenerativeModel(ai, { mode: InferenceMode.PREFER_ON_DEVICE, onDeviceParams: { promptOptions: { responseConstraint } } }). A binary JSON verdict (SUPPORTS / NOT_SUPPORTED) plus a quote. While the model is still downloading, Footing's router sends each citation to the cloud judge instead.
  3. Judge, cloud: getGenerativeModel(ai, { mode: InferenceMode.ONLY_IN_CLOUD, inCloudParams: { generationConfig: { responseSchema } } }): SUPPORTS / PARTIAL / NOT_SUPPORTED + quote + reason; PDFs as inline data; JS-only pages through the URL context tool.
  4. inferenceSource on every response drives the badge on every citation and the route log, and only a reply reported as on-device can settle a citation on the laptop.
  5. App Check (reCAPTCHA Enterprise, enforced in production; the debug provider is localhost-only) protects AI Logic and our fetch proxy. Remote Config holds model names, the citation cap, the Nano timeout and the router's passage limits. Firestore rules are deny-all; the planned verdict cache was cut, so no verdicts are stored.

Around that: Next.js (App Router) + TypeScript on Vercel; a small SSRF-guarded fetch proxy (no inference, because the hosted page cannot fetch cross-origin sources); Readability + BM25 passage picking; PDF text via unpdf; Vitest (194 tests) and a live Playwright E2E (12 tests).

The split is by capability, not policy: PDFs and tools are cloud-only on the Web SDK, so they go to the cloud; Nano keeps the narrow job we measured: on the fresh 20 it missed no supported claim (0 false negatives) but said "supports" too often (7 false positives: claims labelled partial or unsupported), so the cloud confirms every yes. The cloud saving is small and we say so: Nano kept 1 of those 20 off the cloud (8 of the frozen 30). Remove Firebase and you would need to stitch together an on-device runtime binding, a key-holding cloud proxy, a PDF-capable cloud path, bot protection, remote config and fallback orchestration.

Challenges we ran into

  • Nano could not decide "partly supported". On 30 labelled claims its three-way verdict scored 21/30 (70%) against our own 80% bar. We kept the product and changed Nano's job: it triages (binary cut of the same run, scored after the fact on the same 30: 24/30; a binary-only re-run with a fixed prompt on 22 Nov also scored 24/30, on /eval), and the cloud decides PARTIAL. Raw rows are in the repo (evidence/p0c/).
  • Honest numbers. On a fresh held-out set of 20 claims (labelled and committed before any model saw them), Nano's binary triage matched the label on 13/20 (65%), and the cloud model's three-way verdict on 14/20 (70%). Nano settled only 1 of those 20 on the laptop and escalated 19. The 24/30 on the original 30 is not held-out: an earlier prompt was scored on it.
  • Free-tier rate limits. The free tier returned 429s and 5xx errors during our runs (logged in evidence/quota/observed-2026-11-22.json); a refused call now retries by itself. Our first labelled set is 18 natural AI-answer sentences plus 12 constructed cases (5 cited to the wrong page, 4 contradicted, 3 with an appended clause), with provenance per row.
  • The first on-device call starts a model download. We show its progress and fall back to the cloud so a judge is never stuck.
  • App Check with no debug token. We verified production works in a fresh Chrome profile with no token, and that a tokenless request to the proxy returns 401.

Accomplishments that we're proud of

  • A deterministic quote gate: no verdict reads "supported" unless its quote is verbatim in the page. 194 passing tests; the gate and the SSRF guard are covered.
  • Real, measured, reproducible numbers on a held-out set, including the ones that are not flattering; /eval shows every number with its raw rows.
  • Latency per claim (M1 Max, Chrome 157): on device p50 1699 ms, p95 2067 ms; cloud p50 4095 ms, p95 11476 ms (evidence/bench.json).
  • Live: https://footing.edycu.dev with App Check enforced, Lighthouse perf/a11y/SEO 1.0 on the live URL, a landing page and a pitch deck, and a README that states what CI did and did not run.

What we learned

On-device models were usable for a narrow yes/no triage (no missed supports on 20 fresh claims, but 7 false "supports") and poor at graded judgement. The honest hybrid is a router with an audit trail: let the small model cheaply settle what it can, escalate the rest, and let deterministic code verify every quote. Measuring first changed the architecture.

What's next for Footing

A browser-extension build that checks the answer where it already appears; more source types (paywalled pages by user-supplied text); a larger labelled set with two human labellers; surfacing Nano's confidence so more pairs can settle on the device.

Try it

Built With

Share this project:

Updates

Submission history